QDpy
Loading...
Searching...
No Matches
qdpy.rl.reppo.RePPO Class Reference

Discover a small population of diverse PPO policies with no required archive. More...

Public Member Functions

 stats (self)
 policies (self, *, seed=0, device=None)
 Copy each actor so callers can evaluate or save it independently.
 train (self, max_env_steps)
 Collect and optimize on-policy rollouts under an additional hard step cap.

Detailed Description

Discover a small population of diverse PPO policies with no required archive.

Optimize PPO policies using task and per-coordinate behavior advantages.

:param env_factory: Factory returning a fresh single Gymnasium environment.
:param feature: Callback (observation, action, successor, info) returning one
    bounded behavior signal per coordinate after each transition.
:param feature_bounds: Finite increasing pairs in callback output units.
:param population_size: Number of independent actors and value functions.
:param ppo: PPOConfig with the rollout size, discount and optimizer settings.
:param policy: PolicyConfig used by each actor and its two value networks.
:param neighbors: Number of closest other policies used in the interaction.
    Defaults to all other policies up to eight.
:param bandwidth: Gaussian scale in logit-transformed behavior units.
:param repulsion_cap: Norm cap for behavior advantage weights. Zero gives independent PPO.
:param quality_offset: Positive quality offset after subtracting the lowest population return.
:param ema: Moving average rate for completed episode statistics.
:param max_episode_steps: Horizon used when the environment runs longer.
:param seed: Nonnegative seed for independent member optimizers and rollouts.
:param device: Torch device.

Definition at line 146 of file reppo.py.

Member Function Documentation

◆ policies()

qdpy.rl.reppo.RePPO.policies ( self,
* ,
seed = 0,
device = None )

Copy each actor so callers can evaluate or save it independently.

Return policies in population order using the existing numeric actor format.

Definition at line 201 of file reppo.py.

◆ stats()

qdpy.rl.reppo.RePPO.stats ( self)
Return cumulative steps, completed episodes, and optimizer counts.

Definition at line 195 of file reppo.py.

◆ train()

qdpy.rl.reppo.RePPO.train ( self,
max_env_steps )

Collect and optimize on-policy rollouts under an additional hard step cap.

Rotate leftover steps among policies. Restart environments per call.

An unfinished episode still contributes to PPO with bootstrapping.
Only completed episodes contribute to the population summaries.

Definition at line 212 of file reppo.py.


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