garage.np.policies.uniform_random_policy
¶
Uniform random exploration strategy.
-
class
UniformRandomPolicy
(env_spec)[source]¶ Bases:
garage.np.policies.policy.Policy
Action taken is uniformly random.
- Parameters
env_spec (EnvSpec) – Environment spec to explore.
-
get_action
(self, 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
(self, 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
-
property
env_spec
(self)¶ Policy environment specification.
- Returns
Environment specification.
- Return type
garage.EnvSpec
-
property
observation_space
(self)¶ Observation space.
- Returns
The observation space of the environment.
- Return type
akro.Space
-
property
action_space
(self)¶ Action space.
- Returns
The action space of the environment.
- Return type
akro.Space