|
QDpy
|
A bounded continuous actor that takes a target behavior descriptor. More...
Public Member Functions | |
| descriptor_domain (self) | |
| act (self, observation, descriptor) | |
| Take a deterministic action toward a target descriptor. | |
| specialize (self, descriptor, *, device=None) | |
| Fold a fixed target into the first affine layer of an independent actor. | |
| save (self, path) | |
| Export the conditioned actor and descriptor normalization bounds. | |
| load (cls, path, *, device="cpu") | |
| Rebuild a conditioned inference policy from its saved NPZ. | |
A bounded continuous actor that takes a target behavior descriptor.
Concatenate a flattened observation and an affine-normalized target. :param observation_space: Fixed numeric Gymnasium Box. :param action_space: Finite floating-point Gymnasium Box. :param descriptor_domain: Finite (low, high) pairs in physical coordinates. :param config: Architecture of the ReLU MLP as a :class:`PolicyConfig`. :param seed: Nonnegative initialization seed. :param device: Torch CPU or CUDA device.
Definition at line 46 of file descriptor_policy.py.
| qdpy.rl.descriptor_policy.DescriptorConditionedPolicy.act | ( | self, | |
| observation, | |||
| descriptor ) |
Take a deterministic action toward a target descriptor.
Return an action in the original environment's shape and dtype.
Reimplemented in qdpy.rl.mome_p2c.PreferenceConditionedPolicy.
Definition at line 79 of file descriptor_policy.py.
| qdpy.rl.descriptor_policy.DescriptorConditionedPolicy.descriptor_domain | ( | self | ) |
Return the descriptor bounds in the same units accepted by act.
Definition at line 74 of file descriptor_policy.py.
| qdpy.rl.descriptor_policy.DescriptorConditionedPolicy.load | ( | cls, | |
| path, | |||
| * | , | ||
| device = "cpu" ) |
Rebuild a conditioned inference policy from its saved NPZ.
Load weights, input shapes, and normalization from a numeric artifact.
Definition at line 119 of file descriptor_policy.py.
| qdpy.rl.descriptor_policy.DescriptorConditionedPolicy.save | ( | self, | |
| path ) |
Export the conditioned actor and descriptor normalization bounds.
Write a versioned numeric NPZ for inference without an environment.
Definition at line 108 of file descriptor_policy.py.
| qdpy.rl.descriptor_policy.DescriptorConditionedPolicy.specialize | ( | self, | |
| descriptor, | |||
| * | , | ||
| device = None ) |
Fold a fixed target into the first affine layer of an independent actor.
Return a :class:`ContinuousPolicy` with the archive policy architecture.
Reimplemented in qdpy.rl.mome_p2c.PreferenceConditionedPolicy.
Definition at line 88 of file descriptor_policy.py.