pacai.agents.dummy

 1import pacai.core.action
 2import pacai.core.agent
 3import pacai.core.gamestate
 4
 5class DummyAgent(pacai.core.agent.Agent):
 6    """
 7    An agent that only takes the STOP action.
 8    At first this may seem useless, but dummy agents can serve several purposes.
 9    Like being a stand-in for a future agent, fallback for a failing agent, or a placeholder when running a replay.
10    """
11
12    def get_action(self, state: pacai.core.gamestate.GameState) -> pacai.core.action.Action:
13        return pacai.core.action.STOP
class DummyAgent(pacai.core.agent.Agent):
 6class DummyAgent(pacai.core.agent.Agent):
 7    """
 8    An agent that only takes the STOP action.
 9    At first this may seem useless, but dummy agents can serve several purposes.
10    Like being a stand-in for a future agent, fallback for a failing agent, or a placeholder when running a replay.
11    """
12
13    def get_action(self, state: pacai.core.gamestate.GameState) -> pacai.core.action.Action:
14        return pacai.core.action.STOP

An agent that only takes the STOP action. At first this may seem useless, but dummy agents can serve several purposes. Like being a stand-in for a future agent, fallback for a failing agent, or a placeholder when running a replay.

def get_action(self, state: pacai.core.gamestate.GameState) -> pacai.core.action.Action:
13    def get_action(self, state: pacai.core.gamestate.GameState) -> pacai.core.action.Action:
14        return pacai.core.action.STOP

Get an action for this agent given the current state of the game. This is simplified version of get_action_full(), see that method for full details.