The computer that bluffed Image: Caravaggio, The Cardsharps, Kimbell Art Museum, public domain

The computer that bluffed

From 11 to 30 January 2017, in a casino in Pittsburgh, four professional poker players sat at screens for about ten hours a day and played heads-up no-limit Texas hold'em against a program called Libratus, written by Noam Brown and Tuomas Sandholm at Carnegie Mellon University. The format was chosen to remove luck as far as possible: 120,000 hands in total, with each hand dealt twice so that a human got the cards the program had received in the mirror game. At the end Libratus was ahead by 147 milli big blinds per hand, a margin that would be considered crushing between humans, and the result was statistically beyond doubt. The paper describing the program appeared in Science in 2018.

What struck the professionals was that the program bluffed, and bluffed in ways they found hard to read. That should not have been a surprise. Bluffing is not a human weakness that a machine imitates; it is part of the equilibrium of the game, and the smallest version of poker shows exactly why.

Kuhn poker

Harold Kuhn described in 1950 a poker game small enough to solve by hand. Three cards, a Jack, a Queen, and a King. Each of two players puts 1 into the pot and receives one card. The first player may check or bet 1. If she checks, the second player may check, in which case the higher card wins the pot of 2, or bet 1, in which case the first player may fold, losing her 1, or call, in which case the higher card wins the pot of 4. If the first player bets, the second may fold or call. That is the whole game.

Consider the first player holding the Jack, the worst card. She cannot win a showdown. If she never bets with the Jack, then whenever she bets the second player knows she has the King or the Queen and can respond accordingly; her bets become readable. If she bets with the Jack sometimes, the second player holding the Queen faces a bet that might come from a King or from a Jack and must sometimes call, which costs him when it is the King, and sometimes fold, which hands the pot to the Jack. The bluff makes the second player's decision hard, and that is worth something to the first player even though the bluff itself loses when called.

The equilibrium, found by the indifference method, is a family. The first player bets with the Jack with some probability \(\alpha\) between 0 and one third, bets with the King with probability \(3\alpha\), and never bets with the Queen, calling a bet with the Queen with probability \(\alpha + \tfrac{1}{3}\). The second player, after a check, bets with the Jack with probability one third and always with the King, and facing a bet calls with the Queen with probability one third and always with the King. Whatever \(\alpha\) is chosen within the range, the value of the game to the first player is

\[ -\tfrac{1}{18} , \]

so the game favours the second player slightly, and the first player's bluffing frequency with the Jack is tied to her betting frequency with the King in a ratio of one to three. A player who never bluffs is exploitable: the second player would fold the Queen to every bet, and the first player's Kings would win only the ante. A player who bluffs too often is exploitable the other way. The equilibrium bluffs exactly often enough to keep the opponent indifferent, which is the same logic that sets the penalty kicker's mix.

From three cards to \(10^{161}\) decision points

Heads-up no-limit hold'em has about \(10^{161}\) decision points, and nobody can write down its equilibrium. Libratus approached it in three parts. First, before the match, it computed an approximate equilibrium of a coarsened version of the game in which similar hands and similar bet sizes were grouped together, using an algorithm from the counterfactual regret minimization family that repeatedly plays the game against itself and shifts probability towards the actions it regrets not having taken. Second, during play, once the later betting rounds were reached and the remaining game was small enough, it solved that part afresh and in detail, in a way that was provably safe: the new strategy could not be worse against a best-responding opponent than the coarse one it replaced. Third, each night it looked at which bet sizes the humans had used most that the coarse strategy handled badly, and computed better responses for them overnight. The professionals noticed that holes they had found one day were closed the next.

The point that matters for game theory is the aim. Libratus was not built to model its opponents and exploit their mistakes, which is how most strong human players think about poker. It was built to approximate an equilibrium strategy, one that cannot be exploited by anyone, and it won by being unexploitable while the humans, being human, were not. Carnegie Mellon's report of the match gives the players' own accounts of what that felt like.

What came next

A program called DeepStack, from the University of Alberta and Czech universities, had beaten weaker professionals a month earlier with a related method. In 2019 Brown and Sandholm's Pluribus beat professionals at six-player hold'em, a game in which the equilibrium concept itself is on shakier ground, since with more than two players an equilibrium strategy is no longer a guarantee against losing. The same family of algorithms has since been applied to negotiation games and to the board game Diplomacy, where a program must talk as well as play. The computational side of game theory, how to find or approximate an equilibrium of a game too large to write down, has become a research field of its own, and poker was its proving ground.

Why a game of imperfect information

Chess and Go are games of perfect information: both players see everything, and the difficulty is the size of the tree. Poker hides information, and that changes the mathematics. A strategy must be a rule from what the player knows to what she does, beliefs about the hidden cards must be updated by Bayes' rule as bets are observed, and the right play at a single decision can only be judged together with the play at every other decision the opponent cannot distinguish from it. That is why a hand must sometimes be played in a way that loses money on its own, so that another hand, indistinguishable to the opponent, can win more. The Jack's bluff in Kuhn poker pays for itself through the King's bets.

Unit 9 of the Game Theory Masterclass introduces games of incomplete information through Harsanyi's types, teaches Bayes' rule from a table of counts before the formula, solves Kuhn poker in full by the indifference method, and presents the Libratus paper in its research spotlight.

Study strategy properly

The Game Theory Masterclass: weekly units, quizzes, a final exam, and a certificate.
About the program