Agents
Agents are a relatively new feature and currently the package comes with two basic agents.
call_agent() or random_agent()
Agents are implemented as functions and take a game as input and output an action of the current player:
action, total = call_agent(game)
assert action == ActionType.CALL
assert total == None
Basic Agents
Call Agent
The call_agent() predictably returns a CALL action
if anyone raised or a CHECK action if not.
Random Agent
The random_agent() chooses an action uniformly at random from the available moves.
Note
This includes a FOLD action if no one raised. To disable this you can pass in a
no_fold=True argument when calling it. For example, random_agent(game, no_fold=True).