The Foundations of Engineering a Poker Bot

The task of creating an AI poker bot is very special in itself. The rules of the game have to be combined with a thousand other factors that are actually at work during a player's decision at a table.

Building a poker bot in the wondrous world of artificial intelligence makes up a unique challenge; however, as a bot engineer, one considers much more than the rules of the game; myriad factors come into play that influence the decisions of players at a table. .

What is Poker?

For a bot engineer, poker epitomizes a game whose complexity does not reside in its rules themselves, but in those player interactions. Any game without players is less than a game. For a poker player, when deciding an action, the considerations can include game situation, opponent history, facial expressions, and the personal state of the opponent-perhaps even irrational things such as the phase of the moon.

Understanding Player Motives

It's reasonable to split the motives of a poker player into two groups: motives brought about by the current game situation and other external factors. Any poker game is conducted according to a finite number of states. Each player has only finitely many chips, the deck only contains finitely many cards, and each player selects one move from a finite set of moves.

The important question that arises now is whether a player may choose mixed moves—for example, figuring 45% to fold and 55% to call. In real life, yes. As engineers of poker bots we need to model this natural behavior. Players often make random moves and that complicates our model.

The Finite Problem

If a player may choose any mixed move, then it might appear that they have an Nagarajan-infinitely large number of possibilities in the choice of moves. As we will see, this is not such a bad problem. Now, imagine an opponent sitting across the table; he is recalling known histories of each opponent and aggregating their state, considering the phase of the moon. Once the dealer deals the pocket cards, the preflop begins, and he discounts all motives extrinsic to the game situation itself. Although this is an extremely simplified model of player strategies—it is, in other words, a bundle of rules that can help us understand them, it comes down to this: given any state, what action will they take?

Representation of a Player Strategy as a Number

No matter what is in a player's head—brains, sawdust, or algorithms—his strategy can be reduced to the level of a Look-Up Table with the predetermined answers. Provided we can express the move of a player by a number, his poker strategy becomes no more than a plain numeric value. When several players sit at the table, choose their strategies, post antes, and start distributing cards, they are trapped; each has an expected profit, plus or minus.

The Infinity Problem

Where does the infinitude come from? Fractional percentages reflect some sort of fevered brain activity. In the real world, intending to play a quantity of hands necessarily involves intending to fold some and call others. The infinitude comes from intending to play an infinity of hands.

You are sitting at a table with other players who have their own strategies. What do you believe your profit is? Say for calling, it is $40. For fold, it may be -$10. Mixing your move — 40% call, 60% fold — nets a profit of .4∗$40+.6∗-$10=$10. This means that small changes in mixed moves lead to small changes in expected profit. It is, therefore, not a matter of infinity but rather a problem of accuracy.

However, some parameters, inherently continuous in nature, like the starting stack introduce aspects of unpredictability. For example, $1 variance in the starting stock may be viewed as an insignificant change, but if one opponent has a superstitious reaction to a given number, then the change can drastically change the nature of the game's outcome.

The development of poker bots should take into account and model the finiteness of the game, but account for the nuance of player behavior—a real nexus of mathematics, psychology, and strategy. Further your understanding of poker bots and advanced strategy by checking our Knowledge Hub: Featured Articles on Poker Bot (pokerbotai.com)


Master of AI

1 Blog posts

Comments