Skip to content

ExplorationStrategy ​

Abstract base class for exploration strategies.

Exploration strategies determine when and how to explore (random actions) vs exploit (greedy actions based on Q-values).

Source

Methods ​

get_exploration_value ​

python
get_exploration_value(steps: int) -> float | None

Get the current exploration value (for example, epsilon) for logging.

Parameters:

  • steps (int) – The current step count.

Returns:

  • float | None – The exploration value, or None if not applicable.

Source

should_explore ​

python
should_explore(steps: int) -> bool

Determine whether to take an exploratory action.

Parameters:

  • steps (int) – The current step count.

Returns:

  • bool – True if a random action should be taken, False otherwise.

Source

should_reset_noise ​

python
should_reset_noise(steps: int, num_environments: int) -> bool

Determine whether to reset noise in noisy layers.

Parameters:

  • steps (int) – The current step count.
  • num_environments (int) – The number of parallel environments.

Returns:

  • bool – True if noise should be reset, False otherwise.

Source

should_reset_noise_after_sync ​

python
should_reset_noise_after_sync() -> bool

Determine whether to reset noise after syncing weights from learner.

Returns:

  • bool – True if noise should be reset after sync, False otherwise.

Source