algorithms.util.action_perturbator.ActionPerturbator

class algorithms.util.action_perturbator.ActionPerturbator[source]

Bases: object

__init__()

Methods

__init__()

perturb(action[, clip])

Add a noise to the proposed action.

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