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).
Methods
get_exploration_value
python
get_exploration_value(steps: int) -> float | NoneGet 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.
should_explore
python
should_explore(steps: int) -> boolDetermine 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.
should_reset_noise
python
should_reset_noise(steps: int, num_environments: int) -> boolDetermine 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.
should_reset_noise_after_sync
python
should_reset_noise_after_sync() -> boolDetermine whether to reset noise after syncing weights from learner.
Returns:
bool– True if noise should be reset after sync, False otherwise.