Policy

class phantom.policy.Policy(observation_space, action_space)[source]

Base Policy class for defining custom policies.

Parameters:
  • observation_space (Space) – Observation space of the policy.

  • action_space (Space) – Action space of the policy.

abstract compute_action(observation)[source]
Parameters:

observation (Any) – A single observation for the policy to act on.

Return type:

Any

Returns:

The action taken by the policy based on the given observation.