Action Noise

class stable_baselines3.common.noise.ActionNoise[source]

The action noise base class

reset()[source]

call end of episode reset for the noise

Return type:

None

class stable_baselines3.common.noise.NormalActionNoise(mean, sigma)[source]

A Gaussian action noise

Parameters:
  • mean (ndarray) – the mean value of the noise

  • sigma (ndarray) – the scale of the noise (std here)

class stable_baselines3.common.noise.OrnsteinUhlenbeckActionNoise(mean, sigma, theta=0.15, dt=0.01, initial_noise=None)[source]

An Ornstein Uhlenbeck action noise, this is designed to approximate Brownian motion with friction.

Based on http://math.stackexchange.com/questions/1287634/implementing-ornstein-uhlenbeck-in-matlab

Parameters:
  • mean (ndarray) – the mean of the noise

  • sigma (ndarray) – the scale of the noise

  • theta (float) – the rate of mean reversion

  • dt (float) – the timestep for the noise

  • initial_noise (Optional[ndarray]) – the initial value for the noise output, (if None: 0)

reset()[source]

reset the Ornstein Uhlenbeck noise, to the initial position

Return type:

None

class stable_baselines3.common.noise.VectorizedActionNoise(base_noise, n_envs)[source]

A Vectorized action noise for parallel environments.

Parameters:
  • base_noise (ActionNoise) – ActionNoise The noise generator to use

  • n_envs (int) – The number of parallel environments

reset(indices=None)[source]

Reset all the noise processes, or those listed in indices

Parameters:

indices (Optional[Iterable[int]]) – Optional[Iterable[int]] The indices to reset. Default: None. If the parameter is None, then all processes are reset to their initial position.

Return type:

None