|
QDpy
|
A bounded Box actor for evolutionary, on-policy, and deterministic control. More...
Public Member Functions | |
| save (self, path) | |
| Store a versioned continuous actor without optimizer state. | |
| load (cls, path, *, device="cpu", seed=0) | |
| Load a continuous actor without constructing its environment. | |
| Public Member Functions inherited from qdpy.rl.policy._FlatPolicy | |
| act (self, observation, deterministic=True) | |
| Choose a deterministic action or sample from the actor. | |
A bounded Box actor for evolutionary, on-policy, and deterministic control.
Apply tanh and scale each output into its environment action interval. Hidden layers use ReLU. A stochastic actor learns a state-independent diagonal Gaussian scale in the coordinates before tanh. Its log standard deviation is clamped to [-12, 2] for float32 sampling. A deterministic actor always uses the squashed mean, including when ``deterministic=False``. :param observation_space: Numeric Gymnasium Box with a fixed shape. :param action_space: Floating-point Gymnasium Box with finite bounds. :param config: Optional :class:`PolicyConfig` with hidden-layer widths. :param stochastic: Include a trainable log standard deviation per coordinate. :param seed: Nonnegative seed for initialization and stochastic actions. :param device: Torch CPU or CUDA device.
| qdpy.rl.policy.ContinuousPolicy.load | ( | cls, | |
| path, | |||
| * | , | ||
| device = "cpu", | |||
| seed = 0 ) |
Load a continuous actor without constructing its environment.
Restore the actor, action bounds, shape, and floating-point dtype.
Reimplemented in qdpy.rl.masqd.TeamPolicy, and qdpy.rl.sac.SACPolicy.
| qdpy.rl.policy.ContinuousPolicy.save | ( | self, | |
| path ) |
Store a versioned continuous actor without optimizer state.
Write a portable numeric NPZ file at the supplied path.
Reimplemented in qdpy.rl.masqd.TeamPolicy, and qdpy.rl.sac.SACPolicy.