QDpy
Loading...
Searching...
No Matches
qdpy.rl.dads.DADS Class Reference

Discover predictable skills and use model-predictive control in skill space. More...

Inheritance diagram for qdpy.rl.dads.DADS:
qdpy.rl.sac.SAC

Public Member Functions

 predict_successor (self, observation, skill)
 Estimate the next Box observation using the mean dynamics of a skill.
 plan (self, observation, score, *, horizon=2, skill_steps=4, samples=32, refinements=3, temperature=.25, seed=0)
 Search a bounded number of imagined skill sequences with MPPI-style refinement.
Public Member Functions inherited from qdpy.rl.sac.SAC
 stats (self)
 train (self, max_env_steps)
 Spend an additional environment-step budget, retaining replay and optimizers.

Detailed Description

Discover predictable skills and use model-predictive control in skill space.

Train with the conditional transition likelihood ratio as intrinsic reward.

A uniform skill stays fixed for each training episode. Learn a mixture
over state differences and estimate the skill-marginal transition density
using independent skills from the same prior. SAC uses that likelihood
ratio as its reward. The replay-based training schedule reuses QDpy SAC.

:param env_factory: Callable creating fresh Gymnasium Box/Box environments.
:param skill_bounds: Finite (low, high) pairs for the exported continuous skills.
:param state_scale: Positive per-observation scales for dynamics learning.
:param policy: Actor architecture as a PolicyConfig.
:param config: Optimizer, replay and mixture settings as a DADSConfig.
:param max_episode_steps: External horizon, treated as a truncation.
:param seed: Private initialization, training and reset seed.
:param device: PyTorch device.

Definition at line 131 of file dads.py.

Member Function Documentation

◆ plan()

qdpy.rl.dads.DADS.plan ( self,
observation,
score,
* ,
horizon = 2,
skill_steps = 4,
samples = 32,
refinements = 3,
temperature = .25,
seed = 0 )

Search a bounded number of imagined skill sequences with MPPI-style refinement.

Parameters
observationInitial Box observation.
scoreCallable taking each path of skill-boundary observations and returning a scalar.
horizonNumber of skills per candidate sequence.
skill_stepsPredicted transitions per skill.
samplesNumber of candidate sequences per refinement.
refinementsNumber of Gaussian proposal rounds.
temperaturePositive score temperature for the weighted proposal update.
seedPrivate planning seed.
Returns
DADSPlan containing the best sampled sequence and model work counts.
Plan in the learned mean dynamics. Rerun after real observations arrive.

Definition at line 214 of file dads.py.

◆ predict_successor()

qdpy.rl.dads.DADS.predict_successor ( self,
observation,
skill )

Estimate the next Box observation using the mean dynamics of a skill.

Parameters
observationCurrent environment observation.
skillContinuous skill in physical skill coordinates.
Returns
One predicted successor.
Predict one step without interacting with an environment.

Definition at line 193 of file dads.py.


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