garage.tf.policies.uniform_control_policy
¶
Uniform control policy.
- class UniformControlPolicy(env_spec)¶
Bases:
garage.tf.policies.policy.Policy
Policy that output random action uniformly.
- Parameters
env_spec (garage.envs.env_spec.EnvSpec) – Environment specification.
- property state_info_specs¶
State info specification.
- Returns
- keys and shapes for the information related to the
module’s state when taking an action.
- Return type
List[str]
- property state_info_keys¶
State info keys.
- Returns
- keys for the information related to the module’s state
when taking an input.
- Return type
List[str]
- property env_spec¶
Policy environment specification.
- Returns
Environment specification.
- Return type
- property observation_space¶
Observation space.
- Returns
The observation space of the environment.
- Return type
akro.Space
- property action_space¶
Action space.
- Returns
The action space of the environment.
- Return type
akro.Space
- get_action(observation)¶
Get single action from this policy for the input observation.
- Parameters
observation (numpy.ndarray) – Observation from environment.
- Returns
Action dict: Predicted action and agent information. It returns an empty
dict since there is no parameterization.
- Return type
numpy.ndarray
- get_actions(observations)¶
Get multiple actions from this policy for the input observations.
- Parameters
observations (numpy.ndarray) – Observations from environment.
- Returns
Actions dict: Predicted action and agent information. It returns an empty
dict since there is no parameterization.
- Return type
numpy.ndarray
- reset(do_resets=None)¶
Reset the policy.
This is effective only to recurrent policies.
do_resets is an array of boolean indicating which internal states to be reset. The length of do_resets should be equal to the length of inputs, i.e. batch size.
- Parameters
do_resets (numpy.ndarray) – Bool array indicating which states to be reset.