#2: Leduc Poker | Challenge

Summary

This week, you will submit two bots, one to play 100-Card Kuhn Poker, and one to play Leduc Poker.

Skip ahead to the challenge specification.

The games

Kuhn Poker 100 Cards

Kuhn Poker with 100 cards plays the same as Kuhn Poker with 3 cards, but the cards are numbered from 1 to 100 (or 0 to 99).

100-Card Kuhn Infosets

Kuhn Poker with 3 cards has 6 infosets per player, 12 total.

How many infosets are in 100-card Kuhn Poker?

These scale linearly and so with 100 cards there are 400 infosets since each card has 4 infosets:

  • P1 acting first
  • P2 facing an Up action
  • P2 facing a Down action
  • P1 after a Down-Up sequence
Game states for 100-Card Kuhn infosets

Each infoset in Kuhn Poker has two possible game states that correspond to it.

How many game states correspond to each infoset in 100-card Kuhn Poker?

Each infoset corresponds to 99 possible game states, one for each card the opponent could have.

Leduc Poker

Leduc Poker is a simple toy poker game invented at the University of Alberta.

Alberta’s nearby Edmonton Airport is in the city of Leduc

Alberta’s nearby Edmonton Airport is in the city of Leduc

Here is the setup:

  • 2 players.

  • 6 card deck: 2 Queens, 2 Kings, 2 Aces (in ascending order, so Ace is highest).

  • Each player antes 1 chip.

  • Deal 1 card to each player.

  • Betting round 1 (the preflop):

    • There is a fixed bet size of 2 chips.
    • If the opponent has made no bet in this round, a player can Check (bet nothing) or Raise (bet one standard bet size).
    • If the opponent has bet, then a player can Fold (bet nothing and lose), Call (add chips to match opponent’s bet), or Raise (call the bet and add one standard bet size).
    • This round ends when one player Folds (and loses; neither cards are shown), or when one player Calls (and the game continues to the next step below). A special case is when both players Check, which proceeds the same as a Call with no added chips.
  • Deal a face up community card (shown to both players).

    • A pair (your card matches the community card) is the best hand, then an unpaired Ace, then an unpaired King, finally an unpaired Queen.
  • Betting round 2 (the flop):

    • There is a fixed bet size of 4 chips.
    • Players can Check, Fold, Call, and Raise the same as in the first round.
    • This round also ends when one player Folds (and loses), or one player Calls (and proceeds to showdown where the higher hand wins).

The original version of Leduc Poker has a rule where the maximum bets per betting round is 2 (i.e. a bet and a raise), but we are not using that rule. Instead, each player has a maximum of 50 chips for each game. If a player does not have enough chips to make a full Raise, their Raise is for all their remaining chips.

Sample Leduc Hand and Leduc Math

Here is a Leduc game situation in which:

  • Both players ante 1 each.
    • Pot = 2
  • Preflop: P1 bets 2 and P2 calls.
    • Pot = 6
  • Flop: Community card K revealed. Player 1 bets 4. Player 2 to act.

Leduc Strategy

What should Player 2 do here?

Raise! Player 2 has the best possible hand because they have a pair.

Leduc Infoset

What is Player 2’s infoset?

What will Player 1’s infoset be after Player 2 acts?

We could write Player 2’s infoset as: (P2)[_, K, K][Bet 2, Call 2][Bet 4]

Or the default solver in pokercamp/aipc-challenges/challenge-2-leduc will write it at: (P2){'community': [2]}[None, 2][Raise, Call, Raise].

Leduc Ties

How often will you and your opponent be dealt the same card?

First we find the total combinations of cards:

\({6\choose2} = \frac{6!}{4!*2!} = \frac{6*5}{2} = 15\)

Then we count that there is exactly \(1\) way to make Q/Q, \(1\) way to make K/K, and \(1\) way to make A/A. Therefore the probability of having the same hand as your opponent is \(\frac{3}{15} = 0.2\).

Leduc Pairs

Suppose that you are dealt a K. How often will you hit a pair on the flop given that you see it?

There are \(5\) unknown cards to you and \(1\) of them matches yours for a pair, so the \(\Pr(\text{Pair} \mid \text{See Flop}) = \frac{1}{5} = 0.2\)

Challenges

  1. Submit an agent for 100 card Kuhn Poker.

  2. Submit an agent for Leduc Poker with a 50 chip starting stack per game.

In both cases, your agent will play 1000 hands as P1 and 1000 hands as P2 against each of:

  • Other student submissions.
  • 5 bots generated by our solver run for a range of iterations (this probably means that some will be much closer to Nash equilibrium than others).

Hints

It might be more efficient to solve 100-Card Kuhn Poker if you shrink the number of cards to a more manageable size by bucketing a group of nearby numbers together for strategy purposes. For example, you could treat cards 1-10 as the same, 11-20, and so on. Or is there a better way to bucket than uniformly?

The set of possible action histories in Leduc Poker with 50-chip stacks is relatively large, and you don’t really care about most of it. Consider whether you can do something more efficient than always expanding every node.

As you may have seen with the Kuhn solver site, counterfactual regret minimization tends to cycle around the equilibrium instead of descending into it. If you use some kind of average over recent strategy probs as your final probabilities, you may get much closer to Nash than just using the final values.

Kuhn Game Value Bonus Challenge

Find an equilibrium strategy for 100 card and 3 card Kuhn Poker and compare the P2 advantage in 100 card Kuhn Poker to 3 card Kuhn Poker.

Extra bonus: Compare the P2 advantage in 100 card Kuhn Poker to a uniform 10-bucket abstraction, and if possible, a better 10-bucket abstraction.

Leduc Game Value Bonus Challenge

Find an equilibrium strategy for Leduc Poker and compare the P2 advantage to 3-Card Kuhn and 100-Card Kuhn.