QDpy
Loading...
Searching...
No Matches
qdpy.rl.dynamics_aware.DynamicsAwareQD Class Reference

Discover policies with an imagined repertoire and verify them in the environment. More...

Inheritance diagram for qdpy.rl.dynamics_aware.DynamicsAwareQD:
qdpy.rl.search.NeuralMAPElites qdpy.rl.gda_qd.GDAQD qdpy.rl.reset_free_qd.ResetFreeQD

Public Member Functions

 stats (self)
 train (self, max_env_steps)
 Spend the environment budget on complete true evaluations and collect transition replay.
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

Discover policies with an imagined repertoire and verify them in the environment.

Dynamics-Aware QD following Lim et al. (ICRA 2022).

Real evaluations of all policies supply transition data for the
dynamics ensemble. Each model-search cycle evaluates its candidates
with ensemble-mean rollouts and builds a separate imagined repertoire.
A subset of that repertoire is transferred for true evaluation.

:param env_factory: Factory for a continuous Gymnasium environment.
:param archive: Empty best-only Grid or CVTGrid for verified policies.
:param descriptor: Function of a completed real or imagined Episode.
    Imagined episodes have empty info mappings.
:param model_reward: Compute an imagined reward from the observation,
    physical action, and successor, all in environment coordinates.
:param model_terminated: Optional function of the same inputs to stop
    imagined episodes early. Otherwise they run to max_episode_steps.
:param ensemble_size: Number of Gaussian transition models, at least two.
:param model_policy: Optional PolicyConfig for transition-network widths.
:param model_learning_rate: Positive Adam learning rate.
:param model_updates: Minibatch updates per member before each imagined cycle.
:param model_batch_size: Random replay samples per member update.
:param min_model_steps: Minimum number of true transitions in replay before model fitting.
:param replay_capacity: Maximum number of observed transitions in replay.
:param imagined_candidates: Number of model-scored proposals per cycle.
:param sample_dynamics: Sample a model and its predicted Gaussian at
    each imagined step. By default use the ensemble mean.
:param max_transfers: Limit on true evaluations from each imagined repertoire,
    ordered by increasing model disagreement. None transfers all.
:param kwargs: NeuralMAPElites policy, fitness, budget horizon, warm-up,
    evaluation episodes, optional callback, and seeding settings.

Definition at line 76 of file dynamics_aware.py.

Member Function Documentation

◆ stats()

qdpy.rl.dynamics_aware.DynamicsAwareQD.stats ( self)
Return cumulative real and imagined evaluation costs.

Reimplemented from qdpy.rl.search.NeuralMAPElites.

Reimplemented in qdpy.rl.gda_qd.GDAQD, and qdpy.rl.reset_free_qd.ResetFreeQD.

Definition at line 148 of file dynamics_aware.py.

◆ train()

qdpy.rl.dynamics_aware.DynamicsAwareQD.train ( self,
max_env_steps )

Spend the environment budget on complete true evaluations and collect transition replay.

Return cumulative statistics, retaining queued transfers for the next call.

Reimplemented from qdpy.rl.search.NeuralMAPElites.

Reimplemented in qdpy.rl.reset_free_qd.ResetFreeQD.

Definition at line 240 of file dynamics_aware.py.


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