algorithms.util.action_perturbator.MultiDimActionPerturbator¶
- class algorithms.util.action_perturbator.MultiDimActionPerturbator(noise: float, probability: float)[source]¶
Bases:
ActionPerturbator
Custom algorithm, with a probability to noise each dimension.
Methods
- perturb(action, clip=True)[source]¶
Add a noise to the proposed action.
- Parameters:
action (np.ndarray) – A 1D vector of values representing the action.
clip – Controls whether to clip the noised values in [0,1].
- Returns:
A vector of noised values, with the same shape as action.
- Return type:
np.ndarray