QDpy
Loading...
Searching...
No Matches
qdpy.rl.ccqd.CCQD Class Reference

Combine live representations with archived decision heads and measure the resulting policies. More...

Public Member Functions

 stats (self)
 representation_counts (self)
 train (self, max_env_steps)
 Train on an additional hard environment-step budget.
 policy_for (self, individual, *, device=None)
 Recover a complete measured actor from the decision archive.
 best_policy (self, *, device=None)
 Recover the highest-return archived policy.
 audit (self, max_env_steps, *, seed=0)
 Remeasure archived full policies with separate reset and interaction budgets.

Detailed Description

Combine live representations with archived decision heads and measure the resulting policies.

Cooperatively evolve fixed-layout deterministic Box policies.

Each representation has a greedy actor and policy-conditioned twin
TD3 critics. The critics consume raw decision-head weights as context,
with shared environment replay. At each generation archived heads
pair with current representations. Decision variation uses Iso+LineDD
or actor gradients. The fixed reporting archive stores the measured
full policy weights, so changing a representation cannot mutate
previously measured policies.

:param env_factory: Factory for a single Gymnasium environment.
:param archive: Empty parentless maximizing Grid or CVTGrid.
:param descriptor: Callback mapping a complete episode to its measured descriptors.
:param policy: PolicyConfig with at least one hidden layer.
:param td3: TD3Config for all representation learners.
:param representations: Number of live policy representations.
:param batch_size: Completed policies per generation, at least the number of representations.
:param critic_steps: TD3 minibatch updates per representation per eligible generation.
:param pg_steps: Gradient updates of each gradient offspring.
:param iso_sigma: Independent Iso+LineDD noise for genetic heads.
:param line_sigma: Shared direction noise for genetic heads.
:param max_episode_steps: Hard maximum steps per episode.
:param seed: Separate seed streams for initialization and rollouts.
:param device: CPU or CUDA Torch device.

Definition at line 141 of file ccqd.py.

Member Function Documentation

◆ audit()

qdpy.rl.ccqd.CCQD.audit ( self,
max_env_steps,
* ,
seed = 0 )

Remeasure archived full policies with separate reset and interaction budgets.

Return fresh measured placements without updating replay or the decision archive.

Definition at line 323 of file ccqd.py.

◆ best_policy()

qdpy.rl.ccqd.CCQD.best_policy ( self,
* ,
device = None )

Recover the highest-return archived policy.

Return an independently exportable actor after at least one archive admission.

Definition at line 316 of file ccqd.py.

◆ policy_for()

qdpy.rl.ccqd.CCQD.policy_for ( self,
individual,
* ,
device = None )

Recover a complete measured actor from the decision archive.

Return a portable ContinuousPolicy with the original measured weights.

Definition at line 309 of file ccqd.py.

◆ representation_counts()

qdpy.rl.ccqd.CCQD.representation_counts ( self)
Count archived full policies associated with each representation slot.

Definition at line 208 of file ccqd.py.

◆ stats()

qdpy.rl.ccqd.CCQD.stats ( self)
Return cumulative costs, including all representation learner updates.

Definition at line 203 of file ccqd.py.

◆ train()

qdpy.rl.ccqd.CCQD.train ( self,
max_env_steps )

Train on an additional hard environment-step budget.

Retain replay from budget-cut episodes and retry their candidates.

Definition at line 279 of file ccqd.py.


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