algorithms.util.action_perturbator.IdentityAction

class algorithms.util.action_perturbator.IdentityAction[source]

Bases: ActionPerturbator

Returns the same action (no perturbation).

__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