QDpy
Loading...
Searching...
No Matches
qdpy.rl.cma_mega.CMAMEGATD3ES Class Reference

Illuminate a continuous-control archive with TD3 and black-box measure gradients. More...

Inheritance diagram for qdpy.rl.cma_mega.CMAMEGATD3ES:
qdpy.rl.search.NeuralMAPElites

Public Member Functions

 stats (self)
 centre (self)
 train (self, max_env_steps)
 Spend an additional hard environment-step budget on the current arborescence.
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

Illuminate a continuous-control archive with TD3 and black-box measure gradients.

Implement the TD3 and ES variant of CMA-MEGA from Tjanaka et al.

Score the centre, then perturb it in mirrored Gaussian directions.
One set of complete probes estimates all descriptor gradients and
feeds the TD3 replay. Estimate the reward gradient through Q1 on
states sampled from replay. Branch along combinations of unit
gradients, adapt CMA from archive improvement and move the centre by
rank-weighted recombination. Offer the TD3 greedy policy once per
generation and update the TD3 learner for the next generation.

:param env_factory: Fresh single-environment Gymnasium factory with Box
    observations and finite floating-point Box actions.
:param archive: Empty best-only scalar Grid or CVTGrid maximizing return.
:param descriptor: Map a complete Episode to its descriptor coordinates.
:param td3: Optional TD3Config.
:param batch_size: Number of CMA branches plus one greedy injection.
:param es_samples: Even number of mirrored ES perturbations.
:param es_sigma: Perturbation standard deviation in flat actor coordinates.
:param sigma0: Initial Gaussian scale in gradient coefficient space.
:param step_size: Rank-weighted centre ascent step size.
:param gradient_batch_size: Number of replay states for the reward gradient.
:param critic_steps: Number of TD3 updates after each full generation.
:param policy: Optional actor PolicyConfig.
:param evaluation_episodes: Number of complete episodes per policy or probe.
:param max_episode_steps: Safety step cap per episode.
:param seed: Private search and environment-reset seed.
:param device: Torch device.
:param on_step: Optional archive and stats callback after complete archive scoring.

Definition at line 40 of file cma_mega.py.

Member Function Documentation

◆ centre()

qdpy.rl.cma_mega.CMAMEGATD3ES.centre ( self)
Return a copy of the current centre's flat parameters.

Definition at line 111 of file cma_mega.py.

◆ stats()

qdpy.rl.cma_mega.CMAMEGATD3ES.stats ( self)
Return cumulative counters and the number of transitions in replay.

Reimplemented from qdpy.rl.search.NeuralMAPElites.

Definition at line 106 of file cma_mega.py.

◆ train()

qdpy.rl.cma_mega.CMAMEGATD3ES.train ( self,
max_env_steps )

Spend an additional hard environment-step budget on the current arborescence.

Return cumulative stats. Retry interrupted policies with fresh resets.

An incomplete policy evaluation contributes its collected transitions
to replay. The pending proposal is retried on the next train call.
Only complete groups feed ES estimates, CMA ranks, or the archive.

Reimplemented from qdpy.rl.search.NeuralMAPElites.

Definition at line 215 of file cma_mega.py.


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