1 Introduction
The computation of Nash equilibria in multiplayer games is a central problem in computational game theory (see, for example,
[9] and the papers described therein). Many algorithms exist, with different strengths and weaknesses, suitable for a variety of different forms of game (for example, see the software package Gambit, [5]). In this paper, we study a simple class of toy poker games  three player Kuhn poker with cards and pot size  and focus on computing the equilibrium solutions as and vary. The structure of the system of polynomial equations and inequalities that determines the equilibrium solutions is very simple, and we have developed an algorithm that exploits this.Three player Kuhn poker has previously been studied with and , which is one of the simplest multiplayer toy poker games that can be used to test the performance of equilibrium finding algorithms and more general game playing agents [7, 8]. We show in this paper that the structure of the equilibrium solution curve as a function of is complex, and that for the initial pot size is a special case for which a range of equilibrium solutions is possible. We also find that increasing to five and beyond leads to a significant increase in the complexity of the equilibrium solution curve.
It is worth making some comments about the philosophy behind our investigation. We believe that toy poker games such as those examined in this paper are interesting in their own right. They are mathematical objects of surprising complexity, given their simple definition. There is also value in studying and understanding the simplest nontrivial multiplayer games as a basis for understanding more complex multiplayer games with greater significance to the real world. In addition, poker (Texas Holdem in particular) is one of the world’s most popular games, and is often cited as a challenge problem in game theory and computer science (for example, [3]). Although an equilibrium solution of two player, limit Texas Holdem has recently been computed, [4]
, and an AI based on a combination of equilibrium finding and neural network evaluation performs at a superhuman level in two player, no limit Texas Holdem,
[6], the multiplayer versions of these games have not been studied in as much detail, [7].In Section 2, we describe the class of game, three player Kuhn poker with
cards, that we will study in this paper (most easily understood with reference to the decision tree shown in Figure
LABEL:fig_decision), and formulate the mathematical problem that determines the equilibrium solutions. We also note the dominated strategies that can be eliminated, and determine the smallest pot size for which a nontrivial solution exists. In Section 3, we introduce a regularized version of the equilibrium equations, and describe our implementation of the arclength continuation method that we use to solve it. After verifying our method on a related game that has an analytical solution, namely simplified Kuhn poker (SKP, [1]), the results of which are discussed in Section 4, we move on to study numerical solutions of the full problem for various in Section 5. We discuss our results further and indicate some extensions of this work that we will pursue in the future in Section 6.2 Three player Kuhn poker with cards
In the version of three player Kuhn poker that we study in this paper, the deck contains different cards numbered from to . A single card from the deck is dealt at random to each player without replacement. The pot contains units (each player is assumed to have contributed units to the pot). The possible betting sequences are shown in Figure LABEL:fig_decision. The first action is made by Player 1, who can either bet one unit or check. The next action is made by Player 2, who can either call the bet of one unit or fold after Player 1 bets, and either check or bet one unit after Player 1 checks. The action then moves to Player 3, and continues in the same manner. The game ends after either three checks or after all players have either bet, called or folded. If two players fold, the remaining player wins the pot of units. If two or three players do not fold, the remaining player who holds the card with the largest numerical value wins the pot of units along with any bets or calls made by themselves and the other players.
In this game, each player can choose between exactly two options (bet or check, call or fold) at each decision node at which they act. We denote by the frequency at which an aggressive action (bet or call) is taken by Player for , , at the four nodes that they control (see Figure LABEL:fig_decision) with each of the possible cards, so that , , . The frequencies at which Player chooses a passive action (check or fold) are therefore . We will also use the notation with , , whenever convenient for the presentation of our results.
The value of the game to Player is for , or . Note that this is a zero sum game, so . An analytical expression for these three functions can be calculated, either by hand or using computer algebra, in terms of the frequencies , or calculated numerically from the game tree for a given set of numerical values of . In this paper, we have used computer algebra (specifically, the Symbolic Math Toolbox in MATLAB) to determine and its derivatives analytically, and will discuss the limitations of this approach below. Note that each of the polynomial functions is linear in each of the frequencies .
Since Player seeks to maximise , an equilibrium set of betting frequencies, satisfies
(1) 
This set of equations and inequalities (which can be rewritten as a variational inequality, although we will not do so here) takes this simple form because the decision tree has just two branches at each node. It is (1) that we study in this paper. We seek equilibrium solutions and wish to determine how they vary with pot size, .
In [1], we studied simplified Kuhn poker (SKP), in which there are just eleven nontrivial betting frequencies, and hence eleven conditions in (1). The equilibria of SKP can be found by using computer algebra to consider each of the possible combinations of conditions in (1). As the number of conditions in (1) increases, analysis of the equilibrium solutions rapidly becomes intractible using this exhaustive method. In order to study larger games, such as three player Kuhn poker (), which has a system of 48 conditions in its raw state that can be reduced to 23 conditions by eliminating dominated strategies (see [8]), and also the game for , a numerical method must be used. We propose a regularized version of (1) that transforms the problem into a system of nonlinear equations, which can be solved using Newton’s method and arclength continuation (see Section 3).
Before proceeding, note that there are some dominated strategies that we can remove.

A player holding the best card, with value , will always bet or call at nodes 3 to 12.

A player holding the worst card, with value , will always fold at nodes 4 to 12.

A player holding the second worst card, with value , will always fold at nodes 6, 9 and 12.
This fixes twenty two of the betting frequencies, which leaves equilibrium betting frequencies to be determined by (1). When , it is also straightforward to show that checking with the second best card, with value , dominates betting at nodes 1, 2 and 3. We will not enforce this in the results shown below.
Whatever the value of , we find that an equilibrium strategy consists of bets with some high value cards and some low value cards at nodes 1, 2 and 3 (value bets and bluffs) and calls with some mid to high value cards at the other nodes (bluff catching). In addition, some fraction of the high value cards is checked at nodes 1 and 2 in order to call with them at nodes further down the decision tree (sandbagging). It is straightforward to show that when , sandbagging and value betting occurs only with the highest value card, , and bluff catching only with the second highest value card, , but that bluffing may be with either of the two lowest value cards, or , depending on the size of the pot, . We will see below that, as the number of cards in the deck, , increases, the structure of these ranges (value betting, bluffing, sandbagging, bluff catching) becomes more complex, and the multiplicity of the equilibrium solutions can become as high as twenty four for some values of (see Figure 12). We also find that there is a new type of bet, which acts as a bluff against one player and a value bet against the other, that obviously cannot exist in two player games.
Finally, we can use a simple argument to determine the smallest value of the pot size, , for which any player can make a profit at equilibrium. There are deals for which a given player holds the lowest value card and deals for which a given player holds the lowest value card and the highest value card is not dealt. Bluffing with the lowest value card is potentially profitable if the money won when no strongest card is dealt and every player folds is greater than the money lost when a player with the strongest card calls, which gives , and hence , where
Our numerical results confirm that is indeed the pot size below which no profit is possible; more specifically, for all equilibrium solutions with , , and with , .
3 The regularized game and numerical method
Consider the system of nonlinear equations
(2) 
where is a positive regularization parameter and is a differentiable, monotonically increasing function that has
(3) 
with positive constants. This asymptotic behaviour is crucial for our method to work, for reasons explained in Appendix A. In all of the calculations discussed in this paper, we have used
(4) 
which has (as shown in Figure 1).
Using the single suffix notation for the solution, it is convenient to rewrite (1) as
(5) 
and hence the regularized system as
(6) 
In order to solve (6) using Newton’s method and arclength continuation, we treat the pot size
as an additional unknown and solve for the vector
Starting from two initial solutions, and , we solve for a sequence of solutions , for , , augmenting the system (6) with the condition
(7) 
where is a sequence of step sizes whose selection we discuss below. Equation (7) ensures that the size of the change in the solution vector from the solution at the previous step, , projected in the direction tangent to the curve of solutions, is . At each step, we solve (6) and (7) using Newton’s method, with an initial guess extrapolated quadratically from the previous three solutions. We precalculate the Jacobian analytically using the Symbolic Math Toolbox in MATLAB.
By regularizing the problem using the small parameter , we transform it into a system of nonlinear equations. Although solving such systems is, in principle, more straightforward than solving systems of variational inequalities, we know that the solution when is not smooth, and expect that regularization will lead to solutions smoothed over a scale determined by the size of . This means that, during the arclength continuation described above, there will be small regions where the solution changes rapidly. The sequence of step sizes, , must therefore be chosen adaptively to take this into account. This is done by reducing and recomputing if either Newton’s method fails to converge or is larger than , otherwise slightly increasing , but not beyond a maximum value of . In this manner, the sequence adapts to the contours of the solution curve.
In order to find the initial solutions and , we used the MATLAB solver fsolve, an implementation of the trustregion dogleg algorithm, to solve (6) with and , taking an initial guess for
drawn at random from a uniform distribution over
. This algorithm is able to find the solution using a poor initial guess in a manner that is not possible using Newton’s method. We then use parameter continuation to reduce to the required value. We find the second initial solution using fsolve with , taking the solution at as the initial guess. From these two initial solutions, we can proceed with arclength continuation using Newton’s method.Finally, for betting frequencies controlled by the same player with the same card that also lie in the same branch of the decision tree, for example, the betting frequencies of Player 1 at Nodes and , we differentiated with respect to both betting frequencies in (1). This eliminates some equilibrium solutions that are not perfect in the subgame associated with the node lower down the tree. For example, if Player 1 always bets with card at Node , . However, the expression for associated with the frequency of betting with card at node has a factor of , and is therefore zero if , since Player 1 never reaches Node 4 with card in this case. The equilibrium will therefore not necessarily be correct in this case for the subgame at Node 4. By also differentiating with respect to , i.e. using , we remove the factor of , and the equilibrium is then valid in the subgame at node 4. In our numerical investigation, we found that if we neither removed the dominated strategies listed earlier, nor performed these extra differentiations, spurious solutions, which use noncredible threats, could be computed. If either the dominated strategies are removed, or the extra differentiations are performed, these spurious solutions are eliminated. In the numerical results discussed below, we both removed the dominated strategies and performed the extra differentiation, since both steps are welljustified, but using either alone produces essentially the same results.
4 Test Case: Simplified three player Kuhn poker
In order to illustrate how solutions of the regularized system (2) converge to those of the original system (1) as , and also to verify our method against a known, analytical solution, we consider SKP, as studied in [1]. In order to do this within the framework of three player Kuhn poker with cards, we set and force the betting and calling frequencies with the card of value to be zero. Note that the cards referred to as A, K, Q and J in [1] correspond to , , and in the notation that we use here.
The expectation of Player 1 is shown in Figure 2 for various values of the regularization parameter, , along with the exact solution. Firstly, we can see that the use of arclength continuation has allowed us to compute all of the equilibrium solutions, including the multiple equilibrium solutions that exist for some ranges of values of the pot size, . Secondly, note that this expectation, which is an excellent indicator of the structure of the equilibrium solutions, showing clearly where multiple equilibrium solutions exist, is accurately reproduced by the regularized system as . On the main scale shown, the numerical solution is indistinguishable from the analytical solution for . If we zoom into a region where the exact expectation is not smooth, we can see how the numericallycalculated expectation becomes progressively more acccurate as decreases. Finally, we can see that at and , where we know from the analytical solution that a range of different expectations is possible, regularization allows the expectations smoothly to connect in a single curve. Figure 3 shows that similar observations can be made about a typical betting frequency.
Figure 4 shows both the analytical equilibrium betting frequencies and , which correspond to Player 1’s calling frequency at Node 4 and Player 2’s calling frequency at Node 5 with a card of value (a K), and those determined numerically with . Also shown are the analyticallydetermined upper and lower bounds on and for the range of values of for which only is determined uniquely at equilibrium. As we can see, the regularized version of the problem selects unique values of and (see Appendix A for more discussion of this).
5 Numerical Results
In this section, we will use the regularized problem with to investigate the equilibrium solutions of three player Kuhn poker with cards. In each case, we find a connected branch of equilibrium solutions. We have not attempted to find solutions not connected to this branch, and, although it seems plausible that no other solutions exist (this is the case for SKP), we have not attempted to investigate this further, preferring to focus on the structure of the branch of equilibrium solutions that we have computed.
We calculated the equilibrium solutions for many different values of with as large as . For example, Figure 5 shows the expectations of each player when there are ten cards in the deck (). This is a good way to visualize the solution structure, since different expectations in this plot must correspond to distinct equilibrium solutions.
The most striking feature is the complexity of this solution curve, with up to fifteen distinct equilibrium solutions coexisting for some values of the pot size, . Another surprising feature is that, for sufficiently large , Player 2 becomes the biggest loser at equilibrium, with both and positive. For lower values of , , so the later the player acts (poker players say, the better the position of the player), the greater their profit at equilibrium. This switch to for greater than about is hard to explain and is a feature that exists when there are five or more cards (but not in standard three player Kuhn poker, which is played with four cards).
Although the structure of the equilibrium solutions is clearly very complex for larger values of , these games have little relevance to poker as played in the real world. Even with very aggressive betting on each street in games such as limit Texas Holdem, Seven Card Stud, Razz, Triple Draw and others, the pot to bet ratio, , rarely reaches double figures. We therefore concentrate here on interesting features of the equilibrium solutions of three player Kuhn poker with and .
5.1 Three player Kuhn poker ()
Figure 6 shows the computed expectations for three player Kuhn poker (). As we shall see, compared to games with more cards, the equilibrium solution structure is quite simple; even simpler than the solution structure of SKP, [1]. There are four values of , clearly visible in Figure 6, where a range of expectations is possible for two of the three players, including the case , which is the usual pot size for three player Kuhn poker (each player antes one unit before play begins), and which was studied in [8]. The analytical solutions found in [8] are consistent with the solutions that we have computed.
Figure 6 does indicate that (along with the other three values of shown) is a special case. There is also a small range of values of for which distinct multiple equilibrium solutions exist, although they have very similar expectations (almost indistinguishable in Figure 6). These can be seen more clearly close to in Figure 7, which shows the equilibrium betting frequencies as a function of .
We can see from Figure 7 that for , Players 1 and 2 check all their holdings at equilibrium, and the game revolves around Player 3 betting and the other players deciding whether to call with the second best card (Nodes 4, 5, and 6). Note that Nodes 7 to 12 are not reached at equilibrium for . As increases past three, Player 2 starts to bet at a nonzero frequency (Node 2), and for larger values of , Player 1 becomes active at Node 1. The solution structure when is relatively simple because there is a clear distinction between bluffing cards (1 and 2), a single value card (4) and a single calling card (3). The only tension in the system is between value betting and sandbagging with the best card (4).
5.2 Three player Kuhn poker with cards
Figure 8 shows the equilibrium expectation when . We can see that the addition of an extra card significantly increases the complexity of the structure of the solution curve (compare Figure 8 with Figure 6). There are several ranges of values of for which there exist distinct, mutiple equilibrium solutions with a multiplicity of up to five, as opposed to three for , and with differences in expected value that are more striking than those shown in Figure 6.
Figure 9 shows the equilibrium betting frequencies when . Although there remains a clear distinction between value betting, bluffing and calling ranges, the behaviour at Node 1 is more complex than when , with the value betting frequency of Player 1 with card 5 varying in an irregular manner for , perhaps because now each player’s value betting range may include the best two cards. When only the best card is ever value bet at equilibrium.
For a new strategy emerges. The players, starting with just Player 1 when , can, at equilibrium, make a bet with a midvalue card that is a bluff against one opponent and a value bet against the other. This happens for a very small range of values of when , so we will illustrate this for a game with more cards in the deck, , where this phenomenon can be seen more clearly, as shown in Figure 10. The case is also of interest because this is a game that can be played with a single suit of a real deck of cards.
Figure 10 displays an equilibrium solution in a new format, for a single value of . Each bar represents one of the cards, arranged from left to right with the highest value card at the right. The black part of each bar indicates the betting frequency at that node with that card. For example, in Figure 10, at Node 2, which is controlled by Player 2, all of the best seven cards are bet with some nonzero frequency at equilibrium, balanced by some bluffs with the card of value 2. The bars at some of the subsequent nodes are shortened to indicate that some fraction has been bet at an earlier node. For example, at Node 5, Player 2 always calls with the three highest value cards, but the bars are shortened to indicate the fraction of those cards that are checked at equilibrium at Node 2. The cards with values 5, 6 and 7 do not appear in this equilibrium strategy at Node 5 since they are always bet by Player 2 at Node 2.
In contrast to this clear bifurcation into value betting and bluffing ranges at Node 2, consider Node 3, controlled by Player 3, and the subsequent Nodes 4 and 5, where Players 1 and 2 must choose a calling strategy. Player 3 bets the cards of value 5 and 6 at a nonzero frequency at equilibrium, which forms a small but distinct range between the value betting and bluffing ranges. These bets are for value against Player 1 (Player 1 can call with worse at Node 4, but never folds a better card) and are bluffs against Player 2 (Player 2 never calls with worse at Nodes 5, but sometimes folds a better card). These twoway bets are a feature that can have no counterpart in two player games.
Although plots such as Figure 10 work well as a method of displaying a single equilibrium solution, they do not give any sense of how the equilibrium strategy varies along the solution curve. A better display method would be a succession of these plots. Since this would require far too many plots to include here, we have created videos for several different values of that illustrate the equilibrium solutions in the format of Figure 10, with one frame for each solution, moving along the solution curve in equal steps of arclength (
), linearly interpolating the numericallycalculated solution to achieve this. The videos are play at four frames per second by default, and are available online
^{1}^{1}1The link to the videos is https://drive.google.com/open?id=1cv1ew4VqVd7Q56_Qa9comE01KzBqol, where CSV data files can also be found..Finally, we can illustrate the complexity of the structure of the equilibrium solution curve by plotting the computed expectations for various values of . Figure 11 shows our results for to . The solution curves are hard to distinguish on this scale, so we have plotted Figure 12, which is a close up in the neighbourhood of when , showing the expectation of Player 3. In the neighbourhood of there can be up to twenty four distinct, coexisting equilibrium solutions.
Figure 13 shows the expectations for some larger values of . Comparing this to Figure 11 we can see that each curve has a smaller range of values at each value of , which suggests that, as increases, although there is still a complex solution structure, each equilibrium solution for a given value of leads to a similar expectation. In Figure 14 we can see that, if we zoom in on the expectation for (a game that could be played with two suits of a deck of cards), on this fine scale, the structure of the solution is still complex, despite the tightening of the range of values of the expectation.
The case is the largest game that we are able to compute with the memory that we have available (about 10Gb of RAM when ) so this method is not scaleable to even moderately large games. The bottleneck is the use of symbolic algebra to compute the expectations and their derivatives, which leads to very large MATLAB function files that use large amounts of memory when evaluated. After these functions have been computed, however, the method is very efficient. Data files containing the equilibrium solutions in CSV format are available online, along with the video files discussed earlier, for a range of values of .
6 Conclusions
In this paper, we introduced a new method to compute equilibrium solutions of extensive form, multiplayer toy poker games with no more than two branches at each decision node. After regularizing the game, we computed equilibrium solutions as a function of pot size, , using Newton’s method and arclength continuation. We used symbolic algebra in MATLAB to precompute the expectations and their derivatives. This leads to a numerical bottleneck in memory, as the symbolically computed functions are not memory efficient, and the largest game that we are able to deal with involves just twenty six cards. This problem can be overcome by computing the expectations and their derivatives directly from the game tree (with some loss of computational efficiency). The polynomial functions that define the expectaions, , are linear in each betting frequency, so, rounding error notwithstanding, derivatives can be computed accurately using finite differences since perturbations of unit size lead to exact derivatives. For this to be done efficiently, we must use a compiled language and an algorithm that uses the structure of the game tree to minimize computation. This is currently under investigation.
The numerical method discussed in this paper can be used equally well in the equivalent game with four or more players. We have investigated this using our current approach, but the memory requirements are very severe, and it is not feasible to compute solutions of even, for example, the four player game with six cards, so we will discuss these games in a later paper. Another extension to these games that would make them more relevant to standard limit poker is to allow up to three branches at each node (i.e. after a bet, a player is able to fold, call or raise). We have developed an extension of our regularization method that works for games with more than two branches per decision node, for which the mathematical formulation is more complicated than that given by (1), but again, we need to avoid using symbolic algebra, and this will form the subject of a later paper.
It is worth noting that, as discussed in [2], finding the equilibrium solutions of a three player game is an important first step in understanding the game, but, unlike the case of two player, zero sum games, simply using an equilibrium strategy (which equilibrium strategy if more than one exists?) does not guarantee unexploitability. Although the location of the equilibrium strategies likely indicates the approximate region of parameter space in which players should choose their strategies, the dynamic interaction of the players from hand to hand is likely to be chaotic, and dynamic strategies optimal.
Finally, an interesting technical question is whether the large limit of the games discussed here maps onto an equivalent game. The equivalent game is obvious for the half street, two player version of the game: Player 2 has continuous value betting and bluffing ranges, whilst Player 1 has a continuous calling range. Even for the two player game however, if there is a full street of betting and Player 1 must split the best cards into value betting and sandbagging ranges, the mapping to an equivalent game as is not obvious, and merits further investigation.
Appendix A Asymptotic solution for
In order to investigate the limit of the regularized problem (2), we construct the formal asymptotic solution. We order the equations in (5) so that an equilibrium solution, , satisfies
(8) 
There are thus equilibrium betting frequencies equal to zero, equal to one, and that lie strictly between zero and one. Note that, since (8) is an equilibrium solution,
(9) 
We now expand the solution as
(10) 
with as and substitute into (6). At leading order as , we immediately obtain the solutions
(11) 
The remaining unknowns, , satisfy the linear equations
(12) 
where , noting that the function is invertible since it is monotonically increasing. The asymptotic solution has this simple structure if and only if the function satisfies (3), which is why this is a crucial requirement for this regularization method to be useful.
If the matrix in (12) is nonsingular, this determines for . If is singular, its nullspace corresponds to components of the equilibrium solution that are not uniquelydetermined (i.e. they satisfy inequality constraints). In this case, the solvability condition provides equations that determine the leading order equilibrium solution. Since these equations are nonlinear, there is no obvious way of showing that they have a unique solution, but this is what we have found in all of our numerical computations. In other words, the regularization appears to select a unique equilibrium solution from those available whenever there is an inequality constraint in the exact solution.
We can illustrate this analytically using SKP, which has, in the notation of [1], ordering the unknowns as ,
(13) 
Solution 1 exists for and is given by
(14) 
Using hats for the leading order equilibrium solution and bars for the correction, from the first four equations we obtain
(15) 
The next four equations show that , , and also satisfy a system equivalent to (15). Finally we have
(16) 
which give , and explicitly in terms of the other correction terms. By manipulating (15), we find that
(17) 
where . Since and is monotonically increasing, (17) has a unique solution for any and by the Intermediate Value Theorem.
References
 [1] John Billingham. Full street simplified three player Kuhn poker, 2017, arXiv:1707.01392.
 [2] John Billingham. Simplified three player Kuhn poker, 2017, arXiv:1704.08124.
 [3] Darse Billings, Aaron Davidson, Jonathan Schaeffer, and Duane Szafron. The challenge of poker. Artif. Intell., 134(12):201–240, January 2002.
 [4] Michael Bowling, Neil Burch, Michael Johanson, and Oskari Tammelin. Headsup limit hold’em poker is solved. Science, 347(6218):145–149, January 2015.
 [5] R. D. McKelvey, A. M. McLennan, and T. L. Turocy. Gambit: Software Tools for Game Theory, version 16.0.1. 2016.

[6]
Matej Moravčík, Martin Schmid, Neil Burch, Viliam Lisý, Dustin
Morrill, Nolan Bard, Trevor Davis, Kevin Waugh, Michael Johanson, and Michael
Bowling.
Deepstack: Expertlevel artificial intelligence in headsup nolimit poker.
Science, 2017, http://science.sciencemag.org/content/early/2017/03/01/science.aam6960.full.pdf.  [7] Nick Abou Risk and Duane Szafron. Using counterfactual regret minimization to create competitive multiplayer poker agents. In Proceedings of the 9th International Conference on Autonomous Agents and Multiagent Systems: Volume 1  Volume 1, AAMAS ’10, pages 159–166, Richland, SC, 2010. International Foundation for Autonomous Agents and Multiagent Systems.
 [8] Duane Szafron, Richard Gibson, and Nathan Sturtevant. A parameterized family of equilibrium profiles for threeplayer Kuhn poker. In Proceedings of the 2013 International Conference on Autonomous Agents and Multiagent Systems, AAMAS ’13, pages 247–254, Richland, SC, 2013. International Foundation for Autonomous Agents and Multiagent Systems.
 [9] Bernhard von Stengel. Computation of Nash equilibria in finite games: introduction to the symposium. Economic Theory, 42(1):1–7, 2010.
Comments
There are no comments yet.