agents

agents.basic

Basic agents are included in this module:
texasholdem.agents.basic.call_agent(game)[source]

A player that calls if another player raised or checks.

Parameters:

game (TexasHoldEm) – The TexasHoldEm game

Returns:

CALL if someone raised, else CHECK

Return type:

Tuple[ActionType, None]

texasholdem.agents.basic.random_agent(game, no_fold=False)[source]

A uniformly random player

  • If someone raised, CALL, FOLD, or RAISE with uniform probability

  • Else, CHECK, (FOLD if no_fold=False), RAISE with uniform probability

  • If RAISE, the value will be uniformly random in [min_raise, # of chips]

Parameters:
  • game (TexasHoldEm) – The TexasHoldEm game

  • no_fold (bool) – Removes the possibility of folding if no one raised, default False.

Returns:

Returns a uniformly random action from the

available moves.

Return type:

Tuple[ActionType, int]