ray.rllib.utils.exploration.exploration.Exploration
ray.rllib.utils.exploration.exploration.Exploration#
- class ray.rllib.utils.exploration.exploration.Exploration(action_space: <MagicMock name='mock.Space' id='140492834250560'>, *, framework: str, policy_config: dict, model: ray.rllib.models.modelv2.ModelV2, num_workers: int, worker_index: int)[source]#
Bases:
objectImplements an exploration strategy for Policies.
An Exploration takes model outputs, a distribution, and a timestep from the agent and computes an action to apply to the environment using an implemented exploration schema.
Methods
__init__(action_space, *, framework, ...)- param action_space
The action space in which to explore.
before_compute_actions(*[, timestep, ...])Hook for preparations before policy.compute_actions() is called.
get_exploration_action(*, ...[, explore])Returns a (possibly) exploratory action and its log-likelihood.
get_exploration_optimizer(optimizers)May add optimizer(s) to the Policy's own
optimizers.get_state([sess])Returns the current exploration state.
on_episode_end(policy, *[, environment, ...])Handles necessary exploration logic at the end of an episode.
on_episode_start(policy, *[, environment, ...])Handles necessary exploration logic at the beginning of an episode.
postprocess_trajectory(policy, sample_batch)Handles post-processing of done episode trajectories.
set_state(state[, sess])Sets the Exploration object's state to the given values.