QDpy
Loading...
Searching...
No Matches
qdpy.rl.qdos.QDOSPolicy Class Reference

Two portable inference networks and a fixed skill duration. More...

Public Member Functions

 reset (self)
 Drop the pending skill at an episode boundary.
 select_skill (self, observation, deterministic=True)
 Select one bounded code without changing the held skill.
 act_skill (self, observation, skill, deterministic=True)
 Execute a caller-selected code independently of the high-level actor.
 act (self, observation, deterministic=True)
 Choose or continue a skill and decode one physical action.
 save (self, path)
 Export both actors and the skill horizon in one numeric file.
 load (cls, path, *, device="cpu", seed=0)
 Restore the two actors without an environment or training data.

Detailed Description

Two portable inference networks and a fixed skill duration.

Compose primitive actions from a state-to-skill policy and a frozen decoder.

Call reset() when the simulator resets. Between resets, act() chooses
a code every skill_horizon calls and holds it fixed for the decoder.
Each inference session needs its own policy instance and episode state.

Definition at line 75 of file qdos.py.

Member Function Documentation

◆ act()

qdpy.rl.qdos.QDOSPolicy.act ( self,
observation,
deterministic = True )

Choose or continue a skill and decode one physical action.

Accept the original observation shape and return a bounded Box action.

Definition at line 113 of file qdos.py.

◆ act_skill()

qdpy.rl.qdos.QDOSPolicy.act_skill ( self,
observation,
skill,
deterministic = True )

Execute a caller-selected code independently of the high-level actor.

Decode one physical action for a skill vector with entries in [-1, 1].

Definition at line 101 of file qdos.py.

◆ load()

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

Restore the two actors without an environment or training data.

Load the actor pair and initialize new seeded inference generators.

Definition at line 134 of file qdos.py.

◆ reset()

qdpy.rl.qdos.QDOSPolicy.reset ( self)

Drop the pending skill at an episode boundary.

Start the next action with a freshly selected skill.

Definition at line 89 of file qdos.py.

◆ save()

qdpy.rl.qdos.QDOSPolicy.save ( self,
path )

Export both actors and the skill horizon in one numeric file.

Write learned weights and spaces. The saved policy starts a new episode.

Definition at line 124 of file qdos.py.

◆ select_skill()

qdpy.rl.qdos.QDOSPolicy.select_skill ( self,
observation,
deterministic = True )

Select one bounded code without changing the held skill.

Inspect the high-level policy's choice for an observation.

Definition at line 95 of file qdos.py.


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