|
QDpy
|
Train a single goal-conditioned policy with model-free QDAC. More...
Additional Inherited Members | |
| 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. | |
Train a single goal-conditioned policy with model-free QDAC.
Optimize rewards and skill matching without an archive.
One desired skill is sampled per episode and held until reset. The
callback feature(observation, action, info) returns the physical feature
vector for the current transition, before the environment step. The
observation and info come from reset or the previous step. The action is
the physical action about to be applied. Features outside skill bounds
are allowed and are normalized without clipping.
:param env_factory: Callable producing fresh single Box Gymnasium environments.
:param feature: Pre-action feature callback returning one value per skill coordinate.
:param skill_bounds: Finite physical (low, high) pairs defining the normalization.
:param skill_sampler: Optional callable taking a numpy.random.Generator
and returning a physical goal inside the bounds. By default, goals
are uniform in the Box. The same prior is used for replay relabeling.
:param policy: Optional PolicyConfig specifying actor widths.
:param config: QDACConfig with the optimization and constraint settings.
:param max_episode_steps: External horizon. Time-limit rows are masked
in both Bellman losses, as in the reference implementation.
:param seed: Nonnegative seed for initialization, environments, skills, and replay.
:param device: Torch CPU or CUDA device.