QDpy
Loading...
Searching...
No Matches
qdpy.rl.pbt.PBTMAPElites Class Reference

Alternate independent SAC training, population replacement, and archive variation. More...

Inheritance diagram for qdpy.rl.pbt.PBTMAPElites:
qdpy.rl.search.NeuralMAPElites

Public Member Functions

 stats (self)
 population_configs (self)
 initialization_step_limit (self)
 generation_step_limit (self)
 train (self, max_env_steps)
 Train whole population generations within a hard additional step budget.
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

Alternate independent SAC training, population replacement, and archive variation.

Population-Based Training MAP-Elites following Pierrot and Flajolet (ICLR 2023).

Each population slot owns a SAC learner, replay buffer, and random
streams. After measuring the initial population, each generation
replaces low-ranked agents with top-ranked donors, injects agents
from the archive into middle ranks, and trains each slot separately.
Iso+LineDD offspring combine complete trainable agent states.
Replay holds only exploratory training transitions.

:param env_factory: Factory for a continuous Box Gymnasium environment.
:param archive: Empty one-elite Grid or CVTGrid for measured policies.
:param descriptor: Episodic descriptor callback as in NeuralMAPElites.
:param sac: Base SACConfig used for each agent.
:param hyperparameter_ranges: Optional mapping of SAC field names to
    inclusive (min, max) mutation ranges. Supports actor, critic and
    temperature learning rates, gamma, tau, and target_entropy.
    Omit to vary the actor and critic learning rates by factors of
    0.5 through 2. An empty mapping disables hyperparameter resampling.
:param population_size: Number of independent SAC agents.
:param elite_count: Number of top-ranked eligible population donors.
:param exploit_count: Number of lowest-ranked slots replaced from donors.
:param archive_replacements: Number of middle-ranked slots replaced from archive elites.
:param training_steps_per_agent: Environment training steps per agent per generation.
:param offspring: Number of additionally scored genetic offspring per generation.
:param kwargs: Native policy architecture, episode, mutation, and seed settings.

Definition at line 80 of file pbt.py.

Member Function Documentation

◆ generation_step_limit()

qdpy.rl.pbt.PBTMAPElites.generation_step_limit ( self)
Return the worst-case cost of a complete train-and-score generation.

Definition at line 169 of file pbt.py.

◆ initialization_step_limit()

qdpy.rl.pbt.PBTMAPElites.initialization_step_limit ( self)
Return the worst-case cost of scoring the initial population and offspring.

Definition at line 164 of file pbt.py.

◆ population_configs()

qdpy.rl.pbt.PBTMAPElites.population_configs ( self)
Return the current frozen SACConfig of each population slot.

Definition at line 159 of file pbt.py.

◆ stats()

qdpy.rl.pbt.PBTMAPElites.stats ( self)
Return cumulative environment steps and population activity.

Reimplemented from qdpy.rl.search.NeuralMAPElites.

Definition at line 154 of file pbt.py.

◆ train()

qdpy.rl.pbt.PBTMAPElites.train ( self,
max_env_steps )

Train whole population generations within a hard additional step budget.

Return cumulative statistics. Unspent steps are local to this call.

Reimplemented from qdpy.rl.search.NeuralMAPElites.

Definition at line 244 of file pbt.py.


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