ray.rllib.utils.exploration.random.Random#
- class ray.rllib.utils.exploration.random.Random(action_space: gymnasium.spaces.Space, *, model: ModelV2, framework: str | None, **kwargs)[source]#
Bases:
Exploration
A random action selector (deterministic/greedy for explore=False).
If explore=True, returns actions randomly from
self.action_space
(via Space.sample()). If explore=False, returns the greedy/max-likelihood action.Methods
Initialize a Random Exploration object.
Hook for preparations before policy.compute_actions() is called.
May add optimizer(s) to the Policy's own
optimizers
.Returns the current exploration state.
Handles necessary exploration logic at the end of an episode.
Handles necessary exploration logic at the beginning of an episode.
Handles post-processing of done episode trajectories.
Sets the Exploration object's state to the given values.