|
QDpy
|
Learn diverse teams with diagonal CEM, archive reanchoring, and per-role TD3 critics. More...
Public Member Functions | |
| stats (self) | |
| train (self, max_env_steps) | |
| Run team evaluations under an additional hard environment-step cap. | |
| 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. | |
Learn diverse teams with diagonal CEM, archive reanchoring, and per-role TD3 critics.
Run MASQD on joint continuous observations and actions. Use a Gymnasium environment that returns one team reward per step. The first axis of its observation and action Boxes identifies agents. Team rewards must be nonnegative for exponential similarity shaping. The same transitions feed independent role-specific TD3 minibatches. :param env_factory: Factory for a single joint Gymnasium environment. :param archive: Empty best-only Grid or CVTGrid that maximizes team return. :param descriptor: Function of a completed team Episode. :param td3: Optional TD3Config for all role critics and the target actor. :param population_size: Even number of policies in a CEM population. :param warmup_generations: Number of CEM batches evaluated before updates. :param anchor_interval: Generations between resets to a randomly sampled elite. :param initial_sigma: Per-parameter Gaussian standard deviation after reanchoring. :param minimum_sigma: Standard-deviation floor for the diagonal CEM distribution. :param descriptor_sigma: Reanchoring noise in normalized descriptor units. :param gradient_steps: Policy-gradient updates per refined team. Zero runs CEM only. :param critic_steps: TD3 updates per generation after replay warm-up. :param length_scale: Reward similarity length scale in normalized descriptor units. :param relabel_probability: Probability of replacing the target with achieved behavior. :param policy: Shared encoder widths as a PolicyConfig. :param fitness: Optional episode-based fitness function. Defaults to team return. :param evaluation_episodes: Number of complete episodes per measured team. :param max_episode_steps: Per-episode safety horizon. :param seed: Nonnegative search, network, and simulator reset seed. :param device: CPU or CUDA Torch device. :param on_step: Optional callback receiving the archive and cumulative stats.
| qdpy.rl.masqd.MASQD.stats | ( | self | ) |
Return cumulative interactions, optimizer counts, and completed generations.
Reimplemented from qdpy.rl.search.NeuralMAPElites.
Reimplemented in qdpy.rl.miqd.MIQD.
| qdpy.rl.masqd.MASQD.train | ( | self, | |
| max_env_steps ) |
Run team evaluations under an additional hard environment-step cap.
Resume queued policies. Retry a cut candidate from a fresh reset.
Reimplemented from qdpy.rl.search.NeuralMAPElites.