garage.np.policies.fixed_policy
¶
Policy that performs a fixed sequence of actions.
- class FixedPolicy(env_spec, scripted_actions, agent_infos=None)[source]¶
Bases:
garage.np.policies.policy.Policy
Policy that performs a fixed sequence of actions.
- Parameters
- 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
- reset(do_resets=None)[source]¶
Reset policy.
- Parameters
do_resets (None or list[bool]) – Vectorized policy states to reset.
- Raises
ValueError – If do_resets has length greater than 1.
- get_action(observation)[source]¶
Get next action.
- Parameters
observation (np.ndarray) – Ignored.
- Raises
ValueError – If policy is currently vectorized (reset was called with more than one done value).
- Returns
- The action and agent_info
for this time step.
- Return type