DummyCartPolePolicy

class maze.core.agent.dummy_cartpole_policy.DummyCartPolePolicy

Dummy structured policy for the CartPole env.

Useful mainly for showcase of the config scheme and for testing.

compute_action(observation: Dict[str, numpy.ndarray], maze_state: Optional[Any] = None, policy_id: Union[str, int] = None, deterministic: bool = False) → Dict[str, Union[int, numpy.ndarray]]

Sample an action.

compute_top_action_candidates(observation: Dict[str, numpy.ndarray], num_candidates: int, maze_state: Optional[Any] = None, policy_id: Union[str, int] = None, deterministic: bool = False) → Tuple[Sequence[Dict[str, Union[int, numpy.ndarray]]], Sequence[float]]

implementation of Policy interface

needs_state()bool

This policy does not require the state() object to compute the action.