ray.rllib.utils.exploration.stochastic_sampling.StochasticSampling#
- class ray.rllib.utils.exploration.stochastic_sampling.StochasticSampling(action_space: gymnasium.spaces.Space, *, framework: str, model: ModelV2, random_timesteps: int = 0, **kwargs)[source]#
Bases:
Exploration
An exploration that simply samples from a distribution.
The sampling can be made deterministic by passing explore=False into the call to
get_exploration_action
. Also allows for scheduled parameters for the distributions, such as lowering stddev, temperature, etc.. over time.Methods
Initializes a StochasticSampling 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.