QDpy
Loading...
Searching...
No Matches
qdpy.rl.qdhuac.QDHUAC Class Reference

Combine a categorical critic and several updates per transition with DNS. More...

Inheritance diagram for qdpy.rl.qdhuac.QDHUAC:
qdhuac._TD3Control

Public Member Functions

 stats (self)
 population (self)
 train (self, max_env_steps)
 Train and evaluate candidates subject to an additional hard interaction budget.
 policy_for (self, individual, *, device=None)
 Rebuild a saved genome as an independent bounded Gaussian actor.
 best_policy (self, *, device=None)
 Export the highest-return measured survivor.

Detailed Description

Combine a categorical critic and several updates per transition with DNS.

Evolve a population of continuous policies using replay-based updates.

The same critic processes current and successor state-action pairs in
one batch. It bootstraps categorical returns from the detached
successor predictions, then uses its mean return in the SAC actor loss.
Replay priorities use errors in the expected return. Each generation
combines genetic mutation, policy gradients, and a shared actor
snapshot. Complete measured candidates compete by dominated novelty.

:param env_factory: Factory for a single Gymnasium Box environment.
:param descriptor: Callable mapping a complete Episode to a finite descriptor vector.
:param config: SACConfig for replay, entropy, and network settings.
:param policy: PolicyConfig for the Gaussian actors.
:param return_bounds: Finite lower and upper values of the categorical support.
:param atoms: Number of support values.
:param updates_per_transition: Critic updates per recorded step after warm-up.
:param priority_exponent: Prioritized replay exponent. Zero gives uniform replay.
:param population_size: Maximum number of measured DNS survivors.
:param batch_size: Number of rollouts contributing to a population update.
:param novelty_neighbors: Number of fitter neighbors for dominated novelty.
:param gradient_steps: Learner updates on each gradient offspring.
:param iso_sigma: Independent Gaussian variation scale.
:param line_sigma: Shared Iso+LineDD direction scale.
:param max_episode_steps: Per-episode cap, treated as truncation.
:param seed: Seed for actor initialization, rollouts, replay, and variation.
:param device: CPU or CUDA.

Definition at line 174 of file qdhuac.py.

Member Function Documentation

◆ best_policy()

qdpy.rl.qdhuac.QDHUAC.best_policy ( self,
* ,
device = None )

Export the highest-return measured survivor.

Return an independent actor from the last completed generation.

Definition at line 342 of file qdhuac.py.

◆ policy_for()

qdpy.rl.qdhuac.QDHUAC.policy_for ( self,
individual,
* ,
device = None )

Rebuild a saved genome as an independent bounded Gaussian actor.

The returned actor supports the standard numeric save/load interface.

Definition at line 335 of file qdhuac.py.

◆ population()

qdpy.rl.qdhuac.QDHUAC.population ( self)
Return detached copies of measured policies for reporting or export.

Definition at line 255 of file qdhuac.py.

◆ stats()

qdpy.rl.qdhuac.QDHUAC.stats ( self)
Return cumulative training cost and learner activity.

Definition at line 246 of file qdhuac.py.

◆ train()

qdpy.rl.qdhuac.QDHUAC.train ( self,
max_env_steps )

Train and evaluate candidates subject to an additional hard interaction budget.

Retain replay for a cut prefix and retry its candidate at the next call.

Definition at line 301 of file qdhuac.py.


The documentation for this class was generated from the following file: