garage.np.exploration_policies.add_gaussian_noise module

Gaussian exploration strategy.

class AddGaussianNoise(env_spec, policy, max_sigma=1.0, min_sigma=0.1, decay_period=1000000)[source]

Bases: garage.np.exploration_policies.exploration_policy.ExplorationPolicy

Add Gaussian noise to the action taken by the deterministic policy.

Parameters:
  • env_spec (EnvSpec) – Environment spec to explore.
  • policy (garage.Policy) – Policy to wrap.
  • max_sigma (float) – Action noise standard deviation at the start of exploration.
  • min_sigma (float) – Action noise standard deviation at the end of the decay period.
  • decay_period (int) – Number of paths over which to linearly decay sigma from max_sigma to min_sigma.
get_action(observation)[source]

Get action from this policy for the input observation.

Parameters:observation (numpy.ndarray) – Observation from the environment.
Returns:Actions with noise. List[dict]: Arbitrary policy state information (agent_info).
Return type:np.ndarray
get_actions(observations)[source]

Get actions from this policy for the input observation.

Parameters:observations (list) – Observations from the environment.
Returns:Actions with noise. List[dict]: Arbitrary policy state information (agent_info).
Return type:np.ndarray
reset(dones=None)[source]

Reset the state of the exploration.

Parameters:dones (List[bool] or numpy.ndarray or None) – Which vectorization states to reset.