random#
Source code: tianshou/exploration/random.py
- class GaussianNoise(mu: float = 0.0, sigma: float = 1.0)[source]#
The vanilla Gaussian process, for exploration in DDPG by default.
- class OUNoise(mu: float = 0.0, sigma: float = 0.3, theta: float = 0.15, dt: float = 0.01, x0: float | ndarray | None = None)[source]#
Class for Ornstein-Uhlenbeck process, as used for exploration in DDPG.
Usage:
# init self.noise = OUNoise() # generate noise noise = self.noise(logits.shape, eps)
For required parameters, you can refer to the stackoverflow page. However, our experiment result shows that (similar to OpenAI SpinningUp) using vanilla Gaussian process has little difference from using the Ornstein-Uhlenbeck process.