garage.np.exploration_policies.exploration_policy module

Exploration Policy API used by off-policy algorithms.

class ExplorationPolicy(policy)[source]

Bases: abc.ABC

Policy that wraps another policy to add action noise.

Parameters:policy (garage.Policy) – Policy to wrap.
get_action(observation)[source]

Return an action with noise.

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

Return actions with noise.

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

Get parameter values.

Returns:Values of each parameter.
Return type:list or dict
reset(dones=None)[source]

Reset the state of the exploration.

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

Set param values.

Parameters:params (np.ndarray) – A numpy array of parameter values.