QDpy
Loading...
Searching...
No Matches
qdpy.rl.brpg.BRPGMAPElites Class Reference

Evolve continuous actors using separate reward and behavior gradients. More...

Inheritance diagram for qdpy.rl.brpg.BRPGMAPElites:
qdpy.rl.descriptor_search.DCRLMAPElites qdpy.rl.descriptor_search._DescriptorMAPElites qdpy.rl.search.NeuralMAPElites

Public Member Functions

 stats (self)
Public Member Functions inherited from qdpy.rl.descriptor_search._DescriptorMAPElites
 conditioned_policy (self, *, device=None)
 Rebuild an independent copy of the shared conditioned actor.
 train (self, max_env_steps)
 Spend a hard budget on archive candidates and any replay-only actor episodes.
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

Evolve continuous actors using separate reward and behavior gradients.

Behavior-Regulated Policy-Gradient MAP-Elites for bounded Box actions.

Supply a Markov feature for each transition, in the physical coordinates
of the reporting grid. A completed episode's descriptor is the mean of
those features. The reward critic trains on the original step rewards.
A separate estimator learns normalized successor features. The shared
actor and elite PG mutations remove parts of the reward gradient that
conflict with behavior compliance. Genetic proposals and actor injection
use the same schedule as DCRL-MAP-Elites.

:param env_factory: Factory for a single Gymnasium environment.
:param archive: Best-only single-objective Grid or CVTGrid, as in DCRL.
:param feature: Callable ``feature(obs, action, next_obs, info)``. Return a
    finite vector within ``archive.features_domain`` on every transition.
:param behavior_steps: Estimator updates per offspring generation.
:param behavior_gamma: Successor-feature discount in [0, 1).
:param descriptor_tolerance: Behavior error tolerance in normalized space.
:param behavior_prior: Positive behavior error scale in normalized space.
:param goal_relabel_fraction: Expected fraction of transitions relabeled
    with uniform goals during learner updates.
:param gradient_ema: Exponential averaging rate for gradient norms.
:param kwargs: DCRL policy, variation, evaluation, and TD3 settings.
    ``critic_steps`` controls reward updates before a single actor update.

Definition at line 173 of file brpg.py.

Member Function Documentation

◆ stats()

qdpy.rl.brpg.BRPGMAPElites.stats ( self)
Return cumulative search, reward-critic, and behavior-estimator costs.

Reimplemented from qdpy.rl.descriptor_search._DescriptorMAPElites.

Definition at line 228 of file brpg.py.


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