|
QDpy
|
Build and screen an imagined repertoire from the live state before executing skills. More...
Public Member Functions | |
| stats (self) | |
| __enter__ (self) | |
| close (self) | |
| Release the continuing environment and end this search session. | |
| train (self, max_env_steps) | |
| Advance the continuing environment by at most the 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. | |
Build and screen an imagined repertoire from the live state before executing skills.
Single-environment variant of Lim et al.'s Reset-Free QD.
Each round refits the dynamics ensemble from actual transitions and
builds a fresh imagined repertoire from the current state. Only
candidates with a full imagined path inside the safety margin can
be transferred. Rank eligible niches by descriptor novelty relative
to the measured archive, then by quality and lower disagreement.
If search cannot transfer, predict the measured skills from the
current state and try the one that improves the final safety margin
most. Use the fallback controller during model warm-up and when there
is no viable recovery skill. Predictions are heuristics.
:param env_factory: Factory for a single continuing Gymnasium environment.
:param archive: Empty best-only Grid or CVTGrid with one maximized fitness.
:param safety_margin: Callback (observation) returning a finite signed distance
or score. Negative values mark unsafe states, zero lies on the boundary.
:param fallback_action: Callback (observation) returning a physical Box action
for warm-up or recovery. It should help return to a region with positive margin.
:param warmup_action: Optional action callback for collecting diverse initial
transitions inside the safe region. Defaults to fallback_action.
:param safety_buffer: Nonnegative minimum predicted margin at all skill steps.
:param skill_steps: Number of environment steps per completed skill.
:param kwargs: DynamicsAwareQD model, policy, fitness, descriptor, and seed
settings. Evaluation uses one continuous execution per transfer.
Open the search with a context manager or call close() after training.
Consecutive train calls share the same simulator and observation.
Terminated or truncated environments end the session.
Definition at line 49 of file reset_free_qd.py.
| qdpy.rl.reset_free_qd.ResetFreeQD.__enter__ | ( | self | ) |
Allow the continuing session to be closed on context exit.
Definition at line 104 of file reset_free_qd.py.
| qdpy.rl.reset_free_qd.ResetFreeQD.close | ( | self | ) |
Release the continuing environment and end this search session.
Close the live environment once. Archived policies remain available.
Definition at line 114 of file reset_free_qd.py.
| qdpy.rl.reset_free_qd.ResetFreeQD.stats | ( | self | ) |
Return an immutable snapshot of live and imagined interaction costs.
Reimplemented from qdpy.rl.dynamics_aware.DynamicsAwareQD.
Definition at line 100 of file reset_free_qd.py.
| qdpy.rl.reset_free_qd.ResetFreeQD.train | ( | self, | |
| max_env_steps ) |
Advance the continuing environment by at most the additional step budget.
Return cumulative statistics and leave the session open for the next call. Reserve a full skill horizon before model-based selection. An insufficient remainder stays unused. Warm-up and fallback actions are recorded in transitions and training costs but have no archive score. A failed step or callback closes the session and propagates.
Reimplemented from qdpy.rl.dynamics_aware.DynamicsAwareQD.
Definition at line 244 of file reset_free_qd.py.