garage.np.exploration_policies.exploration_policy
¶
Exploration Policy API used by off-policy algorithms.
-
class
ExplorationPolicy
(policy)¶ Bases:
abc.ABC
Policy that wraps another policy to add action noise.
Parameters: policy (garage.Policy) – Policy to wrap. -
get_action
(self, observation)¶ 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
(self, observations)¶ 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
-
reset
(self, dones=None)¶ Reset the state of the exploration.
Parameters: dones (List[bool] or numpy.ndarray or None) – Which vectorization states to reset.
-
get_param_values
(self)¶ Get parameter values.
Returns: Values of each parameter. Return type: list or dict
-
set_param_values
(self, params)¶ Set param values.
Parameters: params (np.ndarray) – A numpy array of parameter values.
-