lit_sb3.core.noise
source module lit_sb3.core.noise
Classes
-
ActionNoise — The action noise base class.
-
NormalActionNoise — A Gaussian action noise.
-
OrnsteinUhlenbeckActionNoise — An Ornstein Uhlenbeck action noise, this is designed to approximate Brownian motion with friction.
-
VectorizedActionNoise — A Vectorized action noise for parallel environments.
source class ActionNoise()
source method ActionNoise.reset() → None
Call end of episode reset for the noise.
source class NormalActionNoise(mean: np.ndarray, sigma: np.ndarray, dtype: DTypeLike = np.float32)
Bases : ActionNoise
A Gaussian action noise.
Parameters
-
mean : np.ndarray — Mean value of the noise
-
sigma : np.ndarray — Scale of the noise (std here)
-
dtype : DTypeLike — Type of the output noise
source class OrnsteinUhlenbeckActionNoise(mean: np.ndarray, sigma: np.ndarray, theta: float = 0.15, dt: float = 0.01, initial_noise: np.ndarray | None = None, dtype: DTypeLike = np.float32)
Bases : ActionNoise
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 : np.ndarray — Mean of the noise
-
sigma : np.ndarray — Scale of the noise
-
theta : float — Rate of mean reversion
-
dt : float — Timestep for the noise
-
initial_noise : np.ndarray | None — Initial value for the noise output, (if None: 0)
-
dtype : DTypeLike — Type of the output noise
Methods
-
reset — Reset the Ornstein Uhlenbeck noise, to the initial position.
source method OrnsteinUhlenbeckActionNoise.reset() → None
Reset the Ornstein Uhlenbeck noise, to the initial position.
source class VectorizedActionNoise(base_noise: ActionNoise, n_envs: int)
Bases : ActionNoise
A Vectorized action noise for parallel environments.
Parameters
-
base_noise : ActionNoise — Noise generator to use
-
n_envs : int — Number of parallel environments
Methods
-
reset — Reset all the noise processes, or those listed in indices.
source method VectorizedActionNoise.reset(indices: Iterable[int] | None = None) → None
Reset all the noise processes, or those listed in indices.
Parameters
-
indices : Iterable[int] | None — The indices to reset. Default: None. If the parameter is None, then all processes are reset to their initial position.
source attribute VectorizedActionNoise.base_noise
source attribute VectorizedActionNoise.noises