QDpy
Loading...
Searching...
No Matches
qdpy.rl.qsd_pbt.QSDPBT Class Reference

Discover policies with different behaviors at comparable quality levels. More...

Public Member Functions

 stats (self)
 train (self, max_env_steps)
 Continue training under an additional hard environment-step budget.
 policies (self, *, seed=0, device=None)
 Copy numeric actors for independent use and serialization.
 evaluate (self, *, episodes_per_policy=8, seed=1337, deterministic=False)
 Audit the current population on common held-out reset seeds.

Detailed Description

Discover policies with different behaviors at comparable quality levels.

Synchronous PPO variant of Quality-Similar Diversity with independent actors.

:param env_factory: Return a fresh single Gymnasium environment with Discrete or MultiDiscrete actions.
:param descriptor: Read a complete Episode and return a fixed finite descriptor vector.
:param descriptor_size: Number of descriptor coordinates.
:param population_size: Number of independent policies and critics.
:param ppo: PPOConfig for task advantages, minibatches, and learning rate.
    Its rollout length must cover max_episode_steps.
:param policy: PolicyConfig for portable actors and the critic networks.
:param initial_weight: Starting strength of the diversity advantage.
:param decay_steps: Weight decay timescale in per-policy training steps.
:param quality_offset: Add this constant to observed episode returns in the
    adaptive schedule. Choose an offset giving nonnegative adjusted quality.
:param ema: Moving average rate for measured episode return and descriptors.
:param history: Optional callback (observation, past_actions, past_rewards) returning
    a finite descriptor-critic context with history_size entries. Omit it
    to use the flattened state and normalized episode time.
:param history_size: Context width when a custom history callback is supplied.
:param max_episode_steps: Maximum duration of a complete episode.
:param seed: Independent actor, optimizer, and reset streams.
:param device: Torch device.

Definition at line 135 of file qsd_pbt.py.

Member Function Documentation

◆ evaluate()

qdpy.rl.qsd_pbt.QSDPBT.evaluate ( self,
* ,
episodes_per_policy = 8,
seed = 1337,
deterministic = False )

Audit the current population on common held-out reset seeds.

Evaluate complete episodes with independent reset and action streams.

Definition at line 317 of file qsd_pbt.py.

◆ policies()

qdpy.rl.qsd_pbt.QSDPBT.policies ( self,
* ,
seed = 0,
device = None )

Copy numeric actors for independent use and serialization.

Return one portable CategoricalPolicy per population member.

Definition at line 306 of file qsd_pbt.py.

◆ stats()

qdpy.rl.qsd_pbt.QSDPBT.stats ( self)
Return cumulative interactions and the current population estimates.

Definition at line 193 of file qsd_pbt.py.

◆ train()

qdpy.rl.qsd_pbt.QSDPBT.train ( self,
max_env_steps )

Continue training under an additional hard environment-step budget.

Use balanced synchronous blocks. Episode prefixes train only the task critic and actor.

Definition at line 282 of file qsd_pbt.py.


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