Poker and linear programming 1

From UBC Wiki


Basic Rule

Kuhn Poker is a sequential game with two players (Player 1 and Player 2) that proceeds as follows:

  • Each player antes 1.
  • Each player is dealt one of the three cards among Jack, Queen, and King with the same probability, and the third is put aside unseen so that neither of these two players do not have information other than the card that each gets.
  • Player 1 can either check or bet 1.
    • If Player 1 bets then Player 2 can fold or call.
      • If player 2 folds then Player 1 takes the pot of 3.
      • If player 2 calls, then two players have a showdown for the pot of 4.
    • If Player 1 checks, then Player 2 can check or bet 1.
      • If Player 2 checks, then two players have a showdown for the pot of 2.
      • If Player 2 bets, then Player 1 can fold or call.
        • If Player 1 folds, then Player 2 takes the pot of 3.
        • If Player 1 calls, then two players have a showdown for the pot of 4.

Note that when two players have a showdown, the player with a greater card (King > Queen > Jack) wins the game. There is always a winner since each player is assumed to have a different card.

Properties

Pure Strategies for Each Player

The pure strategy for Player 1 consists of actions that correspond to each card he gets. For instance, given Jack, Player 1 can either check (and fold if Player 2 bets), check (and call if Player 2 bets), or bet. Hence, there are three actions for each card he gets. In total, since there are three types of cards, Player 1 has pure strategies.

Likewise, the pure strategy for Player 2 consists of actions that he can do for each type of cards he gets. Note that his actions also depend on Player 1's actions. After a card is given to Player 2, Player 1 can either check or bet. If Player 1 checks, then Player 2 should either check or bet. If Player 2 checks, then Player 2 should either fold or call. Hence, given a card, Player 2 has following four options:

Player 1 bets Player 1 checks
Fold Check
Fold Bet
Call Check
Call Bet

It follows that Player 2 has pure strategies.

A pure strategy for each player is denoted by following rules:

Player 1

The first 3 characters represent possible first-round plays, and the last 3 characters represent possible last-round plays where B represents Bet, C for Check or Call, F for Fold, and X is used when no further action is possible. The three letters at each stage are ordered as the response given that Player 1 has Jack, Queen, and King respectively. For instance, BCCXFC means: In the first round, Bet on Jacks, Check/Call on Queens, and Check/Call Kings. On the second round: No Action for Jacks, Fold on Queens, and Check/Call on Kings. (See primal matrix below)

Player 2

Player 2 follows the same rule except the followings. The first three letters represent the Player 2's response if Player 1 plays Bet in the first stage where C is for Call, F for Fold, and the last three denote the Player 2's response if Player 1 plays Check in the first stage where C is for Check, B for Bet. Even though his action might limit by Player 1, he still needs to choose a pure strategy that will maximize his payoff.

Computing Expected Payoff

Assuming that each player gets a payoff of the money he gets (or loses), we can create a payoff matrix by calculating the expected payoff of two pure strategies.

Let be the set of nature; since each player gets either King (K), Queen (Q), Jack (J) differently, we have six possible outcomes for the beginning:

Player 1's card Player 2's card
K Q
K J
Q K
Q J
J K
J Q

Hence, there are six elements in the nature set; where the first letter of each element defines the card Player 1 gets and the latter defines the card Player 2 receives. Note that the probability for each state is equal, namely since the probability for receiving each type of card is identical for all three cards and both players.

Note that we have six situations in total: Let be pure strategies given for Player 1 and Player 2, respectively. Then given a state , the payoff for Player 1 can be described as .

Hence, the expected payoff for Player 1 given two pure strategies for Player 1 () and Player 2 (), can be defined as

For instance, suppose that Player 1 plays a pure strategy and Player 2 plays a pure strategy . Then, the expected payoff for Player 1 is

Also, note that the game is zero-sum. Since we have assumed that the payoff each player gets is defined by the money he gets (or loses), given two strategies and a state , it follows that . That is, Therefore, we can the expected payoff for Player 2 given two pure strategies for Player 1 () and Player 2 () corresponds to

Constructing a Payoff Matrix

Let be the set of all pure strategies for Player 1 and Player 2, where each pure strategy for Player 1 is indexed by where and each pure strategy for Player 2 is indexed by where . Then, we can construct the payoff matrix for Player 1 where corresponds to .

Likewise, the payoff matrix for Player 2 can be defined by assigning as . Note that the game is zero-sum, so as shown above, we have

which implies that . The computed payoff matrices for both Player 1 and 2 are shown below.

Finding Optimal Mixed Strategies & LP Problem

Throughout this article, we shall call a mixed strategy optimal if it is best response to the other player's mixed strategy.

Player 1's mixed strategy is where each represents the probability that Player 1 plays a strategy . Hence, the sum of the elements in is 1. Then, expected payoff for playing a mixed strategy is given by .

Theorem : If Player 1 and Player 2 play best response to each other's pure strategy (that is, two players are in Nash equilibrium), the elements of are identical given Player 1's best response .

We can make a similar argument that we have done for 2x2 matrix game.

Proof : (Sketch) We argue by contradiction. Suppose that the elements of are not identical. Then, there exists an element which is strictly less than other elements in the There can be multiple with the same values, but WLOG let's assume that there is only one single element that has the value strictly less than other elements. Then Player 2 can play respond to only play , so Player 1 can actually assign probability given for other elements to the probability of so that Player 1 can get better utility, which implies that is not optimal. Contradiction. If there are more than one element that share the same value and strictly less than other elements, use the same argument.

Note that we can make a symmetric argument for Player 2's best response as well.

Computation

Code

This is written in C#, and the full code can be found here.

       /// <summary>
       /// Returns the Player 1's payoff matrix in string format.
       /// </summary>
       public string GetPayoffMatrix()
       {
           string matrix = "Player1Matrix,";
           var player1Strategies = GetAllPlayer1Strategies();
           var player2Strategies = GetAllPlayer2Strategies();
           // Add a header.
           foreach (var player2Strategy in player2Strategies)
               matrix += player2Strategy.ToString() + ",";
           matrix += Environment.NewLine;
           // Add each row.
           foreach (var player1Strategy in player1Strategies)
           {
               var row = player1Strategy.ToString() + ",";
               foreach (var player2Strategy in player2Strategies)
                   row += GetExpectedUtility(player1Strategy, player2Strategy).ToString("F2") + ",";
               matrix += row + Environment.NewLine;
           }
           return matrix;
       }
       /// <summary>
       /// Returns the expected utility of player 1.
       /// </summary>
       public double GetExpectedUtility(Strategy myStrategy, Strategy otherStrategy)
       {
           double expectedUtility = 0;
           var states = GetAllStates();
           foreach (var state in states)
               expectedUtility += StateProbability(state) * GetUtility(myStrategy, otherStrategy, state);
           return expectedUtility;
       }
       /// <summary>
       /// Returns the utility of player 1 according to the rule of a game.
       /// </summary>
       public double GetUtility(Strategy myStrategy, Strategy otherStrategy, string state)
       {
           if ((myStrategy.Response(state[0]))[0] == 'B')
               if ((otherStrategy.Response(state[1]))[0] == 'F')
                   return 1;
               else
                   if (Player1Wins(state[0], state[1]))
                       return 2;
                   else
                       return -2;
           else
               if ((otherStrategy.Response(state[1]))[1] == 'C')
                   if (Player1Wins(state[0], state[1]))
                       return 1;
                   else
                       return -1;
               else
                   if ((myStrategy.Response(state[0]))[1] == 'F')
                       return -1;
                   else
                       if (Player1Wins(state[0], state[1]))
                           return 2;
                       else
                           return -2;
       }

Payoff Matrix

' FFFCCC FFFCCB FFFCBC FFFCBB FFFBCC FFFBCB FFFBBC FFFBBB FFCCCC FFCCCB FFCCBC FFCCBB FFCBCC FFCBCB FFCBBC FFCBBB FCFCCC FCFCCB FCFCBC FCFCBB FCFBCC FCFBCB FCFBBC FCFBBB FCCCCC FCCCCB FCCCBC FCCCBB FCCBCC FCCBCB FCCBBC FCCBBB CFFCCC CFFCCB CFFCBC CFFCBB CFFBCC CFFBCB CFFBBC CFFBBB CFCCCC CFCCCB CFCCBC CFCCBB CFCBCC CFCBCB CFCBBC CFCBBB CCFCCC CCFCCB CCFCBC CCFCBB CCFBCC CCFBCB CCFBBC CCFBBB CCCCCC CCCCCB CCCCBC CCCCBB CCCBCC CCCBCB CCCBBC CCCBBB
CCCFFF 0.00 0.00 -0.33 -0.33 -0.67 -0.67 -1.00 -1.00 0.00 0.00 -0.33 -0.33 -0.67 -0.67 -1.00 -1.00 0.00 0.00 -0.33 -0.33 -0.67 -0.67 -1.00 -1.00 0.00 0.00 -0.33 -0.33 -0.67 -0.67 -1.00 -1.00 0.00 0.00 -0.33 -0.33 -0.67 -0.67 -1.00 -1.00 0.00 0.00 -0.33 -0.33 -0.67 -0.67 -1.00 -1.00 0.00 0.00 -0.33 -0.33 -0.67 -0.67 -1.00 -1.00 0.00 0.00 -0.33 -0.33 -0.67 -0.67 -1.00 -1.00
CCCFFC 0.00 0.00 0.17 0.17 -0.17 -0.17 0.00 0.00 0.00 0.00 0.17 0.17 -0.17 -0.17 0.00 0.00 0.00 0.00 0.17 0.17 -0.17 -0.17 0.00 0.00 0.00 0.00 0.17 0.17 -0.17 -0.17 0.00 0.00 0.00 0.00 0.17 0.17 -0.17 -0.17 0.00 0.00 0.00 0.00 0.17 0.17 -0.17 -0.17 0.00 0.00 0.00 0.00 0.17 0.17 -0.17 -0.17 0.00 0.00 0.00 0.00 0.17 0.17 -0.17 -0.17 0.00 0.00
CCCFCF 0.00 -0.17 -0.33 -0.50 -0.17 -0.33 -0.50 -0.67 0.00 -0.17 -0.33 -0.50 -0.17 -0.33 -0.50 -0.67 0.00 -0.17 -0.33 -0.50 -0.17 -0.33 -0.50 -0.67 0.00 -0.17 -0.33 -0.50 -0.17 -0.33 -0.50 -0.67 0.00 -0.17 -0.33 -0.50 -0.17 -0.33 -0.50 -0.67 0.00 -0.17 -0.33 -0.50 -0.17 -0.33 -0.50 -0.67 0.00 -0.17 -0.33 -0.50 -0.17 -0.33 -0.50 -0.67 0.00 -0.17 -0.33 -0.50 -0.17 -0.33 -0.50 -0.67
CCCFCC 0.00 -0.17 0.17 0.00 0.33 0.17 0.50 0.33 0.00 -0.17 0.17 0.00 0.33 0.17 0.50 0.33 0.00 -0.17 0.17 0.00 0.33 0.17 0.50 0.33 0.00 -0.17 0.17 0.00 0.33 0.17 0.50 0.33 0.00 -0.17 0.17 0.00 0.33 0.17 0.50 0.33 0.00 -0.17 0.17 0.00 0.33 0.17 0.50 0.33 0.00 -0.17 0.17 0.00 0.33 0.17 0.50 0.33 0.00 -0.17 0.17 0.00 0.33 0.17 0.50 0.33
CCCCFF 0.00 -0.17 -0.50 -0.67 -0.67 -0.83 -1.17 -1.33 0.00 -0.17 -0.50 -0.67 -0.67 -0.83 -1.17 -1.33 0.00 -0.17 -0.50 -0.67 -0.67 -0.83 -1.17 -1.33 0.00 -0.17 -0.50 -0.67 -0.67 -0.83 -1.17 -1.33 0.00 -0.17 -0.50 -0.67 -0.67 -0.83 -1.17 -1.33 0.00 -0.17 -0.50 -0.67 -0.67 -0.83 -1.17 -1.33 0.00 -0.17 -0.50 -0.67 -0.67 -0.83 -1.17 -1.33 0.00 -0.17 -0.50 -0.67 -0.67 -0.83 -1.17 -1.33
CCCCFC 0.00 -0.17 0.00 -0.17 -0.17 -0.33 -0.17 -0.33 0.00 -0.17 0.00 -0.17 -0.17 -0.33 -0.17 -0.33 0.00 -0.17 0.00 -0.17 -0.17 -0.33 -0.17 -0.33 0.00 -0.17 0.00 -0.17 -0.17 -0.33 -0.17 -0.33 0.00 -0.17 0.00 -0.17 -0.17 -0.33 -0.17 -0.33 0.00 -0.17 0.00 -0.17 -0.17 -0.33 -0.17 -0.33 0.00 -0.17 0.00 -0.17 -0.17 -0.33 -0.17 -0.33 0.00 -0.17 0.00 -0.17 -0.17 -0.33 -0.17 -0.33
CCCCCF 0.00 -0.33 -0.50 -0.83 -0.17 -0.50 -0.67 -1.00 0.00 -0.33 -0.50 -0.83 -0.17 -0.50 -0.67 -1.00 0.00 -0.33 -0.50 -0.83 -0.17 -0.50 -0.67 -1.00 0.00 -0.33 -0.50 -0.83 -0.17 -0.50 -0.67 -1.00 0.00 -0.33 -0.50 -0.83 -0.17 -0.50 -0.67 -1.00 0.00 -0.33 -0.50 -0.83 -0.17 -0.50 -0.67 -1.00 0.00 -0.33 -0.50 -0.83 -0.17 -0.50 -0.67 -1.00 0.00 -0.33 -0.50 -0.83 -0.17 -0.50 -0.67 -1.00
CCCCCC 0.00 -0.33 0.00 -0.33 0.33 0.00 0.33 0.00 0.00 -0.33 0.00 -0.33 0.33 0.00 0.33 0.00 0.00 -0.33 0.00 -0.33 0.33 0.00 0.33 0.00 0.00 -0.33 0.00 -0.33 0.33 0.00 0.33 0.00 0.00 -0.33 0.00 -0.33 0.33 0.00 0.33 0.00 0.00 -0.33 0.00 -0.33 0.33 0.00 0.33 0.00 0.00 -0.33 0.00 -0.33 0.33 0.00 0.33 0.00 0.00 -0.33 0.00 -0.33 0.33 0.00 0.33 0.00
CCBFFX 0.00 0.00 0.00 0.00 -0.33 -0.33 -0.33 -0.33 0.00 0.00 0.00 0.00 -0.33 -0.33 -0.33 -0.33 0.17 0.17 0.17 0.17 -0.17 -0.17 -0.17 -0.17 0.17 0.17 0.17 0.17 -0.17 -0.17 -0.17 -0.17 0.17 0.17 0.17 0.17 -0.17 -0.17 -0.17 -0.17 0.17 0.17 0.17 0.17 -0.17 -0.17 -0.17 -0.17 0.33 0.33 0.33 0.33 0.00 0.00 0.00 0.00 0.33 0.33 0.33 0.33 0.00 0.00 0.00 0.00
CCBFCX 0.00 -0.17 0.00 -0.17 0.17 0.00 0.17 0.00 0.00 -0.17 0.00 -0.17 0.17 0.00 0.17 0.00 0.17 0.00 0.17 0.00 0.33 0.17 0.33 0.17 0.17 0.00 0.17 0.00 0.33 0.17 0.33 0.17 0.17 0.00 0.17 0.00 0.33 0.17 0.33 0.17 0.17 0.00 0.17 0.00 0.33 0.17 0.33 0.17 0.33 0.17 0.33 0.17 0.50 0.33 0.50 0.33 0.33 0.17 0.33 0.17 0.50 0.33 0.50 0.33
CCBCFX 0.00 -0.17 -0.17 -0.33 -0.33 -0.50 -0.50 -0.67 0.00 -0.17 -0.17 -0.33 -0.33 -0.50 -0.50 -0.67 0.17 0.00 0.00 -0.17 -0.17 -0.33 -0.33 -0.50 0.17 0.00 0.00 -0.17 -0.17 -0.33 -0.33 -0.50 0.17 0.00 0.00 -0.17 -0.17 -0.33 -0.33 -0.50 0.17 0.00 0.00 -0.17 -0.17 -0.33 -0.33 -0.50 0.33 0.17 0.17 0.00 0.00 -0.17 -0.17 -0.33 0.33 0.17 0.17 0.00 0.00 -0.17 -0.17 -0.33
CCBCCX 0.00 -0.33 -0.17 -0.50 0.17 -0.17 0.00 -0.33 0.00 -0.33 -0.17 -0.50 0.17 -0.17 0.00 -0.33 0.17 -0.17 0.00 -0.33 0.33 0.00 0.17 -0.17 0.17 -0.17 0.00 -0.33 0.33 0.00 0.17 -0.17 0.17 -0.17 0.00 -0.33 0.33 0.00 0.17 -0.17 0.17 -0.17 0.00 -0.33 0.33 0.00 0.17 -0.17 0.33 0.00 0.17 -0.17 0.50 0.17 0.33 0.00 0.33 0.00 0.17 -0.17 0.50 0.17 0.33 0.00
CBCFXF 0.33 0.33 0.00 0.00 0.00 0.00 -0.33 -0.33 -0.17 -0.17 -0.50 -0.50 -0.50 -0.50 -0.83 -0.83 0.33 0.33 0.00 0.00 0.00 0.00 -0.33 -0.33 -0.17 -0.17 -0.50 -0.50 -0.50 -0.50 -0.83 -0.83 0.50 0.50 0.17 0.17 0.17 0.17 -0.17 -0.17 0.00 0.00 -0.33 -0.33 -0.33 -0.33 -0.67 -0.67 0.50 0.50 0.17 0.17 0.17 0.17 -0.17 -0.17 0.00 0.00 -0.33 -0.33 -0.33 -0.33 -0.67 -0.67
CBCFXC 0.33 0.33 0.50 0.50 0.50 0.50 0.67 0.67 -0.17 -0.17 0.00 0.00 0.00 0.00 0.17 0.17 0.33 0.33 0.50 0.50 0.50 0.50 0.67 0.67 -0.17 -0.17 0.00 0.00 0.00 0.00 0.17 0.17 0.50 0.50 0.67 0.67 0.67 0.67 0.83 0.83 0.00 0.00 0.17 0.17 0.17 0.17 0.33 0.33 0.50 0.50 0.67 0.67 0.67 0.67 0.83 0.83 0.00 0.00 0.17 0.17 0.17 0.17 0.33 0.33
CBCCXF 0.33 0.17 -0.17 -0.33 0.00 -0.17 -0.50 -0.67 -0.17 -0.33 -0.67 -0.83 -0.50 -0.67 -1.00 -1.17 0.33 0.17 -0.17 -0.33 0.00 -0.17 -0.50 -0.67 -0.17 -0.33 -0.67 -0.83 -0.50 -0.67 -1.00 -1.17 0.50 0.33 0.00 -0.17 0.17 0.00 -0.33 -0.50 0.00 -0.17 -0.50 -0.67 -0.33 -0.50 -0.83 -1.00 0.50 0.33 0.00 -0.17 0.17 0.00 -0.33 -0.50 0.00 -0.17 -0.50 -0.67 -0.33 -0.50 -0.83 -1.00
CBCCXC 0.33 0.17 0.33 0.17 0.50 0.33 0.50 0.33 -0.17 -0.33 -0.17 -0.33 0.00 -0.17 0.00 -0.17 0.33 0.17 0.33 0.17 0.50 0.33 0.50 0.33 -0.17 -0.33 -0.17 -0.33 0.00 -0.17 0.00 -0.17 0.50 0.33 0.50 0.33 0.67 0.50 0.67 0.50 0.00 -0.17 0.00 -0.17 0.17 0.00 0.17 0.00 0.50 0.33 0.50 0.33 0.67 0.50 0.67 0.50 0.00 -0.17 0.00 -0.17 0.17 0.00 0.17 0.00
CBBFXX 0.33 0.33 0.33 0.33 0.33 0.33 0.33 0.33 -0.17 -0.17 -0.17 -0.17 -0.17 -0.17 -0.17 -0.17 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.67 0.67 0.67 0.67 0.67 0.67 0.67 0.67 0.17 0.17 0.17 0.17 0.17 0.17 0.17 0.17 0.83 0.83 0.83 0.83 0.83 0.83 0.83 0.83 0.33 0.33 0.33 0.33 0.33 0.33 0.33 0.33
CBBCXX 0.33 0.17 0.17 0.00 0.33 0.17 0.17 0.00 -0.17 -0.33 -0.33 -0.50 -0.17 -0.33 -0.33 -0.50 0.50 0.33 0.33 0.17 0.50 0.33 0.33 0.17 0.00 -0.17 -0.17 -0.33 0.00 -0.17 -0.17 -0.33 0.67 0.50 0.50 0.33 0.67 0.50 0.50 0.33 0.17 0.00 0.00 -0.17 0.17 0.00 0.00 -0.17 0.83 0.67 0.67 0.50 0.83 0.67 0.67 0.50 0.33 0.17 0.17 0.00 0.33 0.17 0.17 0.00
BCCXFF 0.67 0.67 0.33 0.33 0.00 0.00 -0.33 -0.33 0.17 0.17 -0.17 -0.17 -0.50 -0.50 -0.83 -0.83 0.17 0.17 -0.17 -0.17 -0.50 -0.50 -0.83 -0.83 -0.33 -0.33 -0.67 -0.67 -1.00 -1.00 -1.33 -1.33 0.67 0.67 0.33 0.33 0.00 0.00 -0.33 -0.33 0.17 0.17 -0.17 -0.17 -0.50 -0.50 -0.83 -0.83 0.17 0.17 -0.17 -0.17 -0.50 -0.50 -0.83 -0.83 -0.33 -0.33 -0.67 -0.67 -1.00 -1.00 -1.33 -1.33
BCCXFC 0.67 0.67 0.83 0.83 0.50 0.50 0.67 0.67 0.17 0.17 0.33 0.33 0.00 0.00 0.17 0.17 0.17 0.17 0.33 0.33 0.00 0.00 0.17 0.17 -0.33 -0.33 -0.17 -0.17 -0.50 -0.50 -0.33 -0.33 0.67 0.67 0.83 0.83 0.50 0.50 0.67 0.67 0.17 0.17 0.33 0.33 0.00 0.00 0.17 0.17 0.17 0.17 0.33 0.33 0.00 0.00 0.17 0.17 -0.33 -0.33 -0.17 -0.17 -0.50 -0.50 -0.33 -0.33
BCCXCF 0.67 0.50 0.33 0.17 0.50 0.33 0.17 0.00 0.17 0.00 -0.17 -0.33 0.00 -0.17 -0.33 -0.50 0.17 0.00 -0.17 -0.33 0.00 -0.17 -0.33 -0.50 -0.33 -0.50 -0.67 -0.83 -0.50 -0.67 -0.83 -1.00 0.67 0.50 0.33 0.17 0.50 0.33 0.17 0.00 0.17 0.00 -0.17 -0.33 0.00 -0.17 -0.33 -0.50 0.17 0.00 -0.17 -0.33 0.00 -0.17 -0.33 -0.50 -0.33 -0.50 -0.67 -0.83 -0.50 -0.67 -0.83 -1.00
BCCXCC 0.67 0.50 0.83 0.67 1.00 0.83 1.17 1.00 0.17 0.00 0.33 0.17 0.50 0.33 0.67 0.50 0.17 0.00 0.33 0.17 0.50 0.33 0.67 0.50 -0.33 -0.50 -0.17 -0.33 0.00 -0.17 0.17 0.00 0.67 0.50 0.83 0.67 1.00 0.83 1.17 1.00 0.17 0.00 0.33 0.17 0.50 0.33 0.67 0.50 0.17 0.00 0.33 0.17 0.50 0.33 0.67 0.50 -0.33 -0.50 -0.17 -0.33 0.00 -0.17 0.17 0.00
BCBXFX 0.67 0.67 0.67 0.67 0.33 0.33 0.33 0.33 0.17 0.17 0.17 0.17 -0.17 -0.17 -0.17 -0.17 0.33 0.33 0.33 0.33 0.00 0.00 0.00 0.00 -0.17 -0.17 -0.17 -0.17 -0.50 -0.50 -0.50 -0.50 0.83 0.83 0.83 0.83 0.50 0.50 0.50 0.50 0.33 0.33 0.33 0.33 0.00 0.00 0.00 0.00 0.50 0.50 0.50 0.50 0.17 0.17 0.17 0.17 0.00 0.00 0.00 0.00 -0.33 -0.33 -0.33 -0.33
BCBXCX 0.67 0.50 0.67 0.50 0.83 0.67 0.83 0.67 0.17 0.00 0.17 0.00 0.33 0.17 0.33 0.17 0.33 0.17 0.33 0.17 0.50 0.33 0.50 0.33 -0.17 -0.33 -0.17 -0.33 0.00 -0.17 0.00 -0.17 0.83 0.67 0.83 0.67 1.00 0.83 1.00 0.83 0.33 0.17 0.33 0.17 0.50 0.33 0.50 0.33 0.50 0.33 0.50 0.33 0.67 0.50 0.67 0.50 0.00 -0.17 0.00 -0.17 0.17 0.00 0.17 0.00
BBCXXF 1.00 1.00 0.67 0.67 0.67 0.67 0.33 0.33 0.00 0.00 -0.33 -0.33 -0.33 -0.33 -0.67 -0.67 0.50 0.50 0.17 0.17 0.17 0.17 -0.17 -0.17 -0.50 -0.50 -0.83 -0.83 -0.83 -0.83 -1.17 -1.17 1.17 1.17 0.83 0.83 0.83 0.83 0.50 0.50 0.17 0.17 -0.17 -0.17 -0.17 -0.17 -0.50 -0.50 0.67 0.67 0.33 0.33 0.33 0.33 0.00 0.00 -0.33 -0.33 -0.67 -0.67 -0.67 -0.67 -1.00 -1.00
BBCXXC 1.00 1.00 1.17 1.17 1.17 1.17 1.33 1.33 0.00 0.00 0.17 0.17 0.17 0.17 0.33 0.33 0.50 0.50 0.67 0.67 0.67 0.67 0.83 0.83 -0.50 -0.50 -0.33 -0.33 -0.33 -0.33 -0.17 -0.17 1.17 1.17 1.33 1.33 1.33 1.33 1.50 1.50 0.17 0.17 0.33 0.33 0.33 0.33 0.50 0.50 0.67 0.67 0.83 0.83 0.83 0.83 1.00 1.00 -0.33 -0.33 -0.17 -0.17 -0.17 -0.17 0.00 0.00
BBBXXX 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.67 0.67 0.67 0.67 0.67 0.67 0.67 0.67 -0.33 -0.33 -0.33 -0.33 -0.33 -0.33 -0.33 -0.33 1.33 1.33 1.33 1.33 1.33 1.33 1.33 1.33 0.33 0.33 0.33 0.33 0.33 0.33 0.33 0.33 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00


Then we can take the negated transpose of the matrix and get the dual problem, which is the game from player 2's perspective:


' CCCFFF CCCFFC CCCFCF CCCFCC CCCCFF CCCCFC CCCCCF CCCCCC CCBFFX CCBFCX CCBCFX CCBCCX CBCFXF CBCFXC CBCCXF CBCCXC CBBFXX CBBCXX BCCXFF BCCXFC BCCXCF BCCXCC BCBXFX BCBXCX BBCXXF BBCXXC BBBXXX
FFFCCC 0 0 0 0 0 0 0 0 0 0 0 0 -0.33 -0.33 -0.33 -0.33 -0.33 -0.33 -0.67 -0.67 -0.67 -0.67 -0.67 -0.67 -1 -1 -1
FFFCCB 0 0 0.17 0.17 0.17 0.17 0.33 0.33 0 0.17 0.17 0.33 -0.33 -0.33 -0.17 -0.17 -0.33 -0.17 -0.67 -0.67 -0.5 -0.5 -0.67 -0.5 -1 -1 -1
FFFCBC 0.33 -0.17 0.33 -0.17 0.5 0 0.5 0 0 0 0.17 0.17 0 -0.5 0.17 -0.33 -0.33 -0.17 -0.33 -0.83 -0.33 -0.83 -0.67 -0.67 -0.67 -1.17 -1
FFFCBB 0.33 -0.17 0.5 0 0.67 0.17 0.83 0.33 0 0.17 0.33 0.5 0 -0.5 0.33 -0.17 -0.33 0 -0.33 -0.83 -0.17 -0.67 -0.67 -0.5 -0.67 -1.17 -1
FFFBCC 0.67 0.17 0.17 -0.33 0.67 0.17 0.17 -0.33 0.33 -0.17 0.33 -0.17 0 -0.5 0 -0.5 -0.33 -0.33 0 -0.5 -0.5 -1 -0.33 -0.83 -0.67 -1.17 -1
FFFBCB 0.67 0.17 0.33 -0.17 0.83 0.33 0.5 0 0.33 0 0.5 0.17 0 -0.5 0.17 -0.33 -0.33 -0.17 0 -0.5 -0.33 -0.83 -0.33 -0.67 -0.67 -1.17 -1
FFFBBC 1 0 0.5 -0.5 1.17 0.17 0.67 -0.33 0.33 -0.17 0.5 0 0.33 -0.67 0.5 -0.5 -0.33 -0.17 0.33 -0.67 -0.17 -1.17 -0.33 -0.83 -0.33 -1.33 -1
FFFBBB 1 0 0.67 -0.33 1.33 0.33 1 0 0.33 0 0.67 0.33 0.33 -0.67 0.67 -0.33 -0.33 0 0.33 -0.67 0 -1 -0.33 -0.67 -0.33 -1.33 -1
FFCCCC 0 0 0 0 0 0 0 0 0 0 0 0 0.17 0.17 0.17 0.17 0.17 0.17 -0.17 -0.17 -0.17 -0.17 -0.17 -0.17 0 0 0
FFCCCB 0 0 0.17 0.17 0.17 0.17 0.33 0.33 0 0.17 0.17 0.33 0.17 0.17 0.33 0.33 0.17 0.33 -0.17 -0.17 0 0 -0.17 0 0 0 0
FFCCBC 0.33 -0.17 0.33 -0.17 0.5 0 0.5 0 0 0 0.17 0.17 0.5 0 0.67 0.17 0.17 0.33 0.17 -0.33 0.17 -0.33 -0.17 -0.17 0.33 -0.17 0
FFCCBB 0.33 -0.17 0.5 0 0.67 0.17 0.83 0.33 0 0.17 0.33 0.5 0.5 0 0.83 0.33 0.17 0.5 0.17 -0.33 0.33 -0.17 -0.17 0 0.33 -0.17 0
FFCBCC 0.67 0.17 0.17 -0.33 0.67 0.17 0.17 -0.33 0.33 -0.17 0.33 -0.17 0.5 0 0.5 0 0.17 0.17 0.5 0 0 -0.5 0.17 -0.33 0.33 -0.17 0
FFCBCB 0.67 0.17 0.33 -0.17 0.83 0.33 0.5 0 0.33 0 0.5 0.17 0.5 0 0.67 0.17 0.17 0.33 0.5 0 0.17 -0.33 0.17 -0.17 0.33 -0.17 0
FFCBBC 1 0 0.5 -0.5 1.17 0.17 0.67 -0.33 0.33 -0.17 0.5 0 0.83 -0.17 1 0 0.17 0.33 0.83 -0.17 0.33 -0.67 0.17 -0.33 0.67 -0.33 0
FFCBBB 1 0 0.67 -0.33 1.33 0.33 1 0 0.33 0 0.67 0.33 0.83 -0.17 1.17 0.17 0.17 0.5 0.83 -0.17 0.5 -0.5 0.17 -0.17 0.67 -0.33 0
FCFCCC 0 0 0 0 0 0 0 0 -0.17 -0.17 -0.17 -0.17 -0.33 -0.33 -0.33 -0.33 -0.5 -0.5 -0.17 -0.17 -0.17 -0.17 -0.33 -0.33 -0.5 -0.5 -0.67
FCFCCB 0 0 0.17 0.17 0.17 0.17 0.33 0.33 -0.17 0 0 0.17 -0.33 -0.33 -0.17 -0.17 -0.5 -0.33 -0.17 -0.17 0 0 -0.33 -0.17 -0.5 -0.5 -0.67
FCFCBC 0.33 -0.17 0.33 -0.17 0.5 0 0.5 0 -0.17 -0.17 0 0 0 -0.5 0.17 -0.33 -0.5 -0.33 0.17 -0.33 0.17 -0.33 -0.33 -0.33 -0.17 -0.67 -0.67
FCFCBB 0.33 -0.17 0.5 0 0.67 0.17 0.83 0.33 -0.17 0 0.17 0.33 0 -0.5 0.33 -0.17 -0.5 -0.17 0.17 -0.33 0.33 -0.17 -0.33 -0.17 -0.17 -0.67 -0.67
FCFBCC 0.67 0.17 0.17 -0.33 0.67 0.17 0.17 -0.33 0.17 -0.33 0.17 -0.33 0 -0.5 0 -0.5 -0.5 -0.5 0.5 0 0 -0.5 0 -0.5 -0.17 -0.67 -0.67
FCFBCB 0.67 0.17 0.33 -0.17 0.83 0.33 0.5 0 0.17 -0.17 0.33 0 0 -0.5 0.17 -0.33 -0.5 -0.33 0.5 0 0.17 -0.33 0 -0.33 -0.17 -0.67 -0.67
FCFBBC 1 0 0.5 -0.5 1.17 0.17 0.67 -0.33 0.17 -0.33 0.33 -0.17 0.33 -0.67 0.5 -0.5 -0.5 -0.33 0.83 -0.17 0.33 -0.67 0 -0.5 0.17 -0.83 -0.67
FCFBBB 1 0 0.67 -0.33 1.33 0.33 1 0 0.17 -0.17 0.5 0.17 0.33 -0.67 0.67 -0.33 -0.5 -0.17 0.83 -0.17 0.5 -0.5 0 -0.33 0.17 -0.83 -0.67
FCCCCC 0 0 0 0 0 0 0 0 -0.17 -0.17 -0.17 -0.17 0.17 0.17 0.17 0.17 0 0 0.33 0.33 0.33 0.33 0.17 0.17 0.5 0.5 0.33
FCCCCB 0 0 0.17 0.17 0.17 0.17 0.33 0.33 -0.17 0 0 0.17 0.17 0.17 0.33 0.33 0 0.17 0.33 0.33 0.5 0.5 0.17 0.33 0.5 0.5 0.33
FCCCBC 0.33 -0.17 0.33 -0.17 0.5 0 0.5 0 -0.17 -0.17 0 0 0.5 0 0.67 0.17 0 0.17 0.67 0.17 0.67 0.17 0.17 0.17 0.83 0.33 0.33
FCCCBB 0.33 -0.17 0.5 0 0.67 0.17 0.83 0.33 -0.17 0 0.17 0.33 0.5 0 0.83 0.33 0 0.33 0.67 0.17 0.83 0.33 0.17 0.33 0.83 0.33 0.33
FCCBCC 0.67 0.17 0.17 -0.33 0.67 0.17 0.17 -0.33 0.17 -0.33 0.17 -0.33 0.5 0 0.5 0 0 0 1 0.5 0.5 0 0.5 0 0.83 0.33 0.33
FCCBCB 0.67 0.17 0.33 -0.17 0.83 0.33 0.5 0 0.17 -0.17 0.33 0 0.5 0 0.67 0.17 0 0.17 1 0.5 0.67 0.17 0.5 0.17 0.83 0.33 0.33
FCCBBC 1 0 0.5 -0.5 1.17 0.17 0.67 -0.33 0.17 -0.33 0.33 -0.17 0.83 -0.17 1 0 0 0.17 1.33 0.33 0.83 -0.17 0.5 0 1.17 0.17 0.33
FCCBBB 1 0 0.67 -0.33 1.33 0.33 1 0 0.17 -0.17 0.5 0.17 0.83 -0.17 1.17 0.17 0 0.33 1.33 0.33 1 0 0.5 0.17 1.17 0.17 0.33
CFFCCC 0 0 0 0 0 0 0 0 -0.17 -0.17 -0.17 -0.17 -0.5 -0.5 -0.5 -0.5 -0.67 -0.67 -0.67 -0.67 -0.67 -0.67 -0.83 -0.83 -1.17 -1.17 -1.33
CFFCCB 0 0 0.17 0.17 0.17 0.17 0.33 0.33 -0.17 0 0 0.17 -0.5 -0.5 -0.33 -0.33 -0.67 -0.5 -0.67 -0.67 -0.5 -0.5 -0.83 -0.67 -1.17 -1.17 -1.33
CFFCBC 0.33 -0.17 0.33 -0.17 0.5 0 0.5 0 -0.17 -0.17 0 0 -0.17 -0.67 0 -0.5 -0.67 -0.5 -0.33 -0.83 -0.33 -0.83 -0.83 -0.83 -0.83 -1.33 -1.33
CFFCBB 0.33 -0.17 0.5 0 0.67 0.17 0.83 0.33 -0.17 0 0.17 0.33 -0.17 -0.67 0.17 -0.33 -0.67 -0.33 -0.33 -0.83 -0.17 -0.67 -0.83 -0.67 -0.83 -1.33 -1.33
CFFBCC 0.67 0.17 0.17 -0.33 0.67 0.17 0.17 -0.33 0.17 -0.33 0.17 -0.33 -0.17 -0.67 -0.17 -0.67 -0.67 -0.67 0 -0.5 -0.5 -1 -0.5 -1 -0.83 -1.33 -1.33
CFFBCB 0.67 0.17 0.33 -0.17 0.83 0.33 0.5 0 0.17 -0.17 0.33 0 -0.17 -0.67 0 -0.5 -0.67 -0.5 0 -0.5 -0.33 -0.83 -0.5 -0.83 -0.83 -1.33 -1.33
CFFBBC 1 0 0.5 -0.5 1.17 0.17 0.67 -0.33 0.17 -0.33 0.33 -0.17 0.17 -0.83 0.33 -0.67 -0.67 -0.5 0.33 -0.67 -0.17 -1.17 -0.5 -1 -0.5 -1.5 -1.33
CFFBBB 1 0 0.67 -0.33 1.33 0.33 1 0 0.17 -0.17 0.5 0.17 0.17 -0.83 0.5 -0.5 -0.67 -0.33 0.33 -0.67 0 -1 -0.5 -0.83 -0.5 -1.5 -1.33
CFCCCC 0 0 0 0 0 0 0 0 -0.17 -0.17 -0.17 -0.17 0 0 0 0 -0.17 -0.17 -0.17 -0.17 -0.17 -0.17 -0.33 -0.33 -0.17 -0.17 -0.33
CFCCCB 0 0 0.17 0.17 0.17 0.17 0.33 0.33 -0.17 0 0 0.17 0 0 0.17 0.17 -0.17 0 -0.17 -0.17 0 0 -0.33 -0.17 -0.17 -0.17 -0.33
CFCCBC 0.33 -0.17 0.33 -0.17 0.5 0 0.5 0 -0.17 -0.17 0 0 0.33 -0.17 0.5 0 -0.17 0 0.17 -0.33 0.17 -0.33 -0.33 -0.33 0.17 -0.33 -0.33
CFCCBB 0.33 -0.17 0.5 0 0.67 0.17 0.83 0.33 -0.17 0 0.17 0.33 0.33 -0.17 0.67 0.17 -0.17 0.17 0.17 -0.33 0.33 -0.17 -0.33 -0.17 0.17 -0.33 -0.33
CFCBCC 0.67 0.17 0.17 -0.33 0.67 0.17 0.17 -0.33 0.17 -0.33 0.17 -0.33 0.33 -0.17 0.33 -0.17 -0.17 -0.17 0.5 0 0 -0.5 0 -0.5 0.17 -0.33 -0.33
CFCBCB 0.67 0.17 0.33 -0.17 0.83 0.33 0.5 0 0.17 -0.17 0.33 0 0.33 -0.17 0.5 0 -0.17 0 0.5 0 0.17 -0.33 0 -0.33 0.17 -0.33 -0.33
CFCBBC 1 0 0.5 -0.5 1.17 0.17 0.67 -0.33 0.17 -0.33 0.33 -0.17 0.67 -0.33 0.83 -0.17 -0.17 0 0.83 -0.17 0.33 -0.67 0 -0.5 0.5 -0.5 -0.33
CFCBBB 1 0 0.67 -0.33 1.33 0.33 1 0 0.17 -0.17 0.5 0.17 0.67 -0.33 1 0 -0.17 0.17 0.83 -0.17 0.5 -0.5 0 -0.33 0.5 -0.5 -0.33
CCFCCC 0 0 0 0 0 0 0 0 -0.33 -0.33 -0.33 -0.33 -0.5 -0.5 -0.5 -0.5 -0.83 -0.83 -0.17 -0.17 -0.17 -0.17 -0.5 -0.5 -0.67 -0.67 -1
CCFCCB 0 0 0.17 0.17 0.17 0.17 0.33 0.33 -0.33 -0.17 -0.17 0 -0.5 -0.5 -0.33 -0.33 -0.83 -0.67 -0.17 -0.17 0 0 -0.5 -0.33 -0.67 -0.67 -1
CCFCBC 0.33 -0.17 0.33 -0.17 0.5 0 0.5 0 -0.33 -0.33 -0.17 -0.17 -0.17 -0.67 0 -0.5 -0.83 -0.67 0.17 -0.33 0.17 -0.33 -0.5 -0.5 -0.33 -0.83 -1
CCFCBB 0.33 -0.17 0.5 0 0.67 0.17 0.83 0.33 -0.33 -0.17 0 0.17 -0.17 -0.67 0.17 -0.33 -0.83 -0.5 0.17 -0.33 0.33 -0.17 -0.5 -0.33 -0.33 -0.83 -1
CCFBCC 0.67 0.17 0.17 -0.33 0.67 0.17 0.17 -0.33 0 -0.5 0 -0.5 -0.17 -0.67 -0.17 -0.67 -0.83 -0.83 0.5 0 0 -0.5 -0.17 -0.67 -0.33 -0.83 -1
CCFBCB 0.67 0.17 0.33 -0.17 0.83 0.33 0.5 0 0 -0.33 0.17 -0.17 -0.17 -0.67 0 -0.5 -0.83 -0.67 0.5 0 0.17 -0.33 -0.17 -0.5 -0.33 -0.83 -1
CCFBBC 1 0 0.5 -0.5 1.17 0.17 0.67 -0.33 0 -0.5 0.17 -0.33 0.17 -0.83 0.33 -0.67 -0.83 -0.67 0.83 -0.17 0.33 -0.67 -0.17 -0.67 0 -1 -1
CCFBBB 1 0 0.67 -0.33 1.33 0.33 1 0 0 -0.33 0.33 0 0.17 -0.83 0.5 -0.5 -0.83 -0.5 0.83 -0.17 0.5 -0.5 -0.17 -0.5 0 -1 -1
CCCCCC 0 0 0 0 0 0 0 0 -0.33 -0.33 -0.33 -0.33 0 0 0 0 -0.33 -0.33 0.33 0.33 0.33 0.33 0 0 0.33 0.33 0
CCCCCB 0 0 0.17 0.17 0.17 0.17 0.33 0.33 -0.33 -0.17 -0.17 0 0 0 0.17 0.17 -0.33 -0.17 0.33 0.33 0.5 0.5 0 0.17 0.33 0.33 0
CCCCBC 0.33 -0.17 0.33 -0.17 0.5 0 0.5 0 -0.33 -0.33 -0.17 -0.17 0.33 -0.17 0.5 0 -0.33 -0.17 0.67 0.17 0.67 0.17 0 0 0.67 0.17 0
CCCCBB 0.33 -0.17 0.5 0 0.67 0.17 0.83 0.33 -0.33 -0.17 0 0.17 0.33 -0.17 0.67 0.17 -0.33 0 0.67 0.17 0.83 0.33 0 0.17 0.67 0.17 0
CCCBCC 0.67 0.17 0.17 -0.33 0.67 0.17 0.17 -0.33 0 -0.5 0 -0.5 0.33 -0.17 0.33 -0.17 -0.33 -0.33 1 0.5 0.5 0 0.33 -0.17 0.67 0.17 0
CCCBCB 0.67 0.17 0.33 -0.17 0.83 0.33 0.5 0 0 -0.33 0.17 -0.17 0.33 -0.17 0.5 0 -0.33 -0.17 1 0.5 0.67 0.17 0.33 0 0.67 0.17 0
CCCBBC 1 0 0.5 -0.5 1.17 0.17 0.67 -0.33 0 -0.5 0.17 -0.33 0.67 -0.33 0.83 -0.17 -0.33 -0.17 1.33 0.33 0.83 -0.17 0.33 -0.17 1 0 0
CCCBBB 1 0 0.67 -0.33 1.33 0.33 1 0 0 -0.33 0.33 0 0.67 -0.33 1 0 -0.33 0 1.33 0.33 1 0 0.33 0 1 0 0


And we can derive linear programming problems from this matrix (Player 1) as follows:

Problem and tableus.

Results

We can apply the same procedure to the dual problem, and obtain the optimal mixed strategy for Player 2:

Problem, tableus.


Optimal Solution, Player 1:

Optimal Solution, Player 2:



Then Player 1 can expect to lose at the rate of -0.055574 per game given optimal play, while Player 2 is expected to win at the rate of 0.0563861 per game. Thus, it is better to be Player 2 when playing Kuhn Poker.