QDpy
Loading...
Searching...
No Matches
qdpy.rl.ppga.PPGA Class Reference

Branch from PPO objective and descriptor directions and walk with xNES. More...

Inheritance diagram for qdpy.rl.ppga.PPGA:
qdpy.rl.search.NeuralMAPElites qdpy.rl.ebc.GAILEBC qdpy.rl.wqdil.WQDIL

Public Member Functions

 stats (self)
 generation_step_limit (self)
 train (self, max_env_steps)
 Run complete PPGA generations within an additional environment step limit.
Public Member Functions inherited from qdpy.rl.search.NeuralMAPElites
 policy_for (self, individual, *, device=None, seed=0)
 Rebuild an independent inference actor from an archived genome.
 best_policy (self, *, device=None, seed=0)
 Rebuild the best archived actor for inference or export.

Detailed Description

Branch from PPO objective and descriptor directions and walk with xNES.

Continuous-action PPGA following Batra et al. (ICLR 2024).

Each descriptor is the episode mean of a caller-supplied timestep
measure. Independent PPO learners estimate normalized directions from
the same starting actor. The emitter evaluates the center and xNES
branches with fresh episodes, updates annealed thresholds, and walks
the center using another PPO learner with a weighted reward.

:param env_factory: Factory for a single Gymnasium environment with a
    numeric Box observation space and bounded floating-point Box action space.
:param archive: Empty scalar, best-only Grid or CVTGrid for measured policies.
:param measure: Callable of (observation, action, successor, info) in
    environment coordinates, returning one value per archive dimension.
:param ppo: Optional PPOConfig shared by the gradient and walking stages.
:param gradient_updates: PPO collections per objective or measure direction.
:param walk_updates: PPO collections per search-policy walk.
:param population_size: Number of xNES branches per iteration.
:param sigma0: Initial xNES standard deviation in coefficient space.
:param threshold_min: Initial cell threshold in episodic return units.
:param learning_rate: Annealing rate for threshold updates, in (0, 1].
:param policy: Optional PolicyConfig for the continuous actor.
:param evaluation_episodes: Complete episodes per candidate score.
:param max_episode_steps: Truncation horizon for training and evaluation.
:param seed: Seed for policies, coefficients, and environment resets.
:param device: PyTorch device.
:param on_step: Callback of (archive, stats) after each measured policy.

Definition at line 62 of file ppga.py.

Member Function Documentation

◆ generation_step_limit()

qdpy.rl.ppga.PPGA.generation_step_limit ( self)
Return the worst-case number of environment steps in one generation.

Definition at line 136 of file ppga.py.

◆ stats()

qdpy.rl.ppga.PPGA.stats ( self)
Return cumulative policy and interaction statistics.

Reimplemented from qdpy.rl.search.NeuralMAPElites.

Reimplemented in qdpy.rl.wqdil.WQDIL.

Definition at line 131 of file ppga.py.

◆ train()

qdpy.rl.ppga.PPGA.train ( self,
max_env_steps )

Run complete PPGA generations within an additional environment step limit.

Return cumulative stats. Unspent steps from a call are not carried forward.

Reimplemented from qdpy.rl.search.NeuralMAPElites.

Definition at line 245 of file ppga.py.


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