NoisyNetsStrategy
python
NoisyNetsStrategy(actor_reset_frequency: int = 0) -> NoneNoisy Networks exploration strategy.
Exploration is inherent in the noisy layers - no explicit epsilon needed. The noise provides natural exploration, which diminishes as the network learns to set noise parameters to zero for reliable actions.
Initialize the NoisyNetsStrategy.
Parameters:
actor_reset_frequency(int) – How often to reset noise in the actor (0 = everynum_environmentssteps).
Methods
get_exploration_value
python
get_exploration_value(steps: int) -> float | NoneNoisy nets don't have an explicit exploration value like epsilon.
Parameters:
steps(int) – The current step count.
Returns:
float | None– None (no explicit exploration rate).
should_explore
python
should_explore(steps: int) -> boolNoisy nets never explicitly explore - the noise in the network provides exploration.
Parameters:
steps(int) – The current step count.
Returns:
bool– Always False (greedy action selection, noise provides exploration).
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 based on the reset frequency.
should_reset_noise_after_sync
python
should_reset_noise_after_sync() -> boolNoisy nets MUST reset noise after syncing weights from learner. This ensures noisy weights are re-calculated from the new parameters.
Returns:
bool– True.
Values
actor_reset_frequency
python
actor_reset_frequency = actor_reset_frequency