pymasep.engine.external_controller
Classes
External controller to receive action from an interface (local or remote) |
Module Contents
- class pymasep.engine.external_controller.ExternalController(environment)
Bases:
pymasep.common.ControllerExternal controller to receive action from an interface (local or remote)
- Parameters:
environment – environment for the controller
- engine = None
- action_choice(observation, agent)
Choose the action. Get it from the action message in the current_event of the engine.
If the current coordination method is MULTIPLAYER_COORDINATION_TURN, Act only if it is the turn of the agent that sends the action message. Otherwise, the agent can act whenever he wants.
- Parameters:
observation (pymasep.common.State) – The observation used to choose the action.
agent (pymasep.common.Agent) – The agent who chooses the action.
- Returns:
The action chosen for the agent.
- Return type: