QDpy
Loading...
Searching...
No Matches
qdpy.rl.qdac.SkillConditionedPolicy Class Reference

Bounded stochastic continuous actor conditioned on a desired behavior. More...

Public Member Functions

 skill_bounds (self)
 config (self)
 device (self)
 act (self, observation, skill, deterministic=True)
 Select a deterministic or sampled action at a desired skill.
 save (self, path)
 Save the actor, physical bounds, and architecture to an NPZ file.
 load (cls, path, *, device="cpu", seed=0)
 Restore a conditioned actor without an environment or feature function.

Detailed Description

Bounded stochastic continuous actor conditioned on a desired behavior.

Combine a Box observation and a desired skill to select an action.

The actor concatenates the flattened observation with the skill mapped
into [-1, 1]. The saved actor requires only an observation and a skill
in physical units. It can be loaded without the environment or trainer.

:param observation_space: Fixed-shape numeric Gymnasium Box.
:param action_space: Finite floating-point Gymnasium Box.
:param skill_bounds: Ordered physical (low, high) pairs for skill coordinates.
:param config: Optional actor architecture as a PolicyConfig.
:param seed: Nonnegative initialization and inference seed.
:param device: Torch CPU or CUDA device.

Definition at line 57 of file qdac.py.

Member Function Documentation

◆ act()

qdpy.rl.qdac.SkillConditionedPolicy.act ( self,
observation,
skill,
deterministic = True )

Select a deterministic or sampled action at a desired skill.

Return a physical Box action given an observation and a physical goal.

Definition at line 105 of file qdac.py.

◆ config()

qdpy.rl.qdac.SkillConditionedPolicy.config ( self)
Return the policy architecture.

Definition at line 88 of file qdac.py.

◆ device()

qdpy.rl.qdac.SkillConditionedPolicy.device ( self)
Return the actor's Torch device.

Definition at line 93 of file qdac.py.

◆ load()

qdpy.rl.qdac.SkillConditionedPolicy.load ( cls,
path,
* ,
device = "cpu",
seed = 0 )

Restore a conditioned actor without an environment or feature function.

Load an exported actor and start a fresh stochastic generator.

Definition at line 119 of file qdac.py.

◆ save()

qdpy.rl.qdac.SkillConditionedPolicy.save ( self,
path )

Save the actor, physical bounds, and architecture to an NPZ file.

Export the conditioned actor for independent inference.

Definition at line 111 of file qdac.py.

◆ skill_bounds()

qdpy.rl.qdac.SkillConditionedPolicy.skill_bounds ( self)
Return the original physical bounds as an immutable tuple.

Definition at line 83 of file qdac.py.


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