TL;DR
DeepStack is an AI that plays heads-up no-limit Texas hold'em, a two-player poker game about as large as the game of Go. It does not compute and store a full strategy before play. Each time it must act, it re-solves the current decision with a short lookahead, and it replaces the rest of the game with a neural network trained on random poker situations. In a study of 44,852 games against 33 professional players, it won overall by 492 mbb/g, and it beat most of the players who finished the full match by a statistically significant margin.
Builds on: counterfactual regret minimisation, Nash equilibrium, neural networks, Bayes' rule · Leads to: nothing in this graph yet
Why it mattered
Before DeepStack, the strongest poker programs worked by simplifying the game. They grouped similar hands and similar bet sizes into a smaller abstract game, solved that game offline, and translated the real opponent's bets into the abstraction. The abstraction was a large loss of information. In 2015 the program Claudico lost to a team of professionals by 91 mbb/g, and in the authors' local best-response tests all four leading abstraction-based programs could still be beaten by more than 3,000 mbb/g.
DeepStack showed a different route. It kept the reasoning of counterfactual regret minimisation, it used no card abstraction, and it used no expert human games for training. The paper argues that this is the first sound application of heuristic search to an imperfect-information game, the idea behind the successes in chess and Go. That matters beyond poker. The paper points to settings with hidden information, such as defending strategic resources and recommending medical treatment, where the same kind of reasoning applies.
The problem
Heads-up no-limit hold'em has about decision points. The right decision depends on the probability distribution over the opponent's private cards, and that distribution is revealed through the opponent's past actions. So a player must reason about what the opponent believes about them, and so on. This is why a player cannot reason about a situation in isolation, as perfect-information search does.
Counterfactual regret minimisation handles this recursion, but the full game is too large to solve directly, so earlier programs solved an abstracted game with about situations. Re-solving a subtree from the current point needs two things: the player's own range over hands, and a vector of counterfactual values for the opponent. Re-solving from the root is too expensive, and in an imperfect-information game a subtree cannot simply be replaced by a fixed heuristic value, because the values depend on the players' ranges.
How it works
DeepStack's play can be traced as a loop. The steps below follow one decision from start to finish.
- Keep two vectors, not a strategy. DeepStack stores its own range, a probability for each private hand, and a vector of counterfactual values for the opponent, one per hand. At the start, the range is uniform and the opponent values are the values of being dealt each hand.
- Re-solve the current decision. When it must act, DeepStack solves the lookahead from the current public state, using only the stored range and opponent values. The lookahead uses a small set of actions: fold where legal, call, two or three bet sizes, and all-in.
- Stop at the depth limit with intuition. The lookahead stops at the end of the current betting round or after four actions. Beyond that point, a deep counterfactual value network estimates the values. It is a feedforward network with seven hidden layers of 500 units. Its inputs are the pot size, the public cards, and both players' ranges, with each range clustered into 1,000 buckets. Its outputs are a value for each hand of each player.
- Act, then discard the strategy. DeepStack samples an action from the strategy computed in the re-solve, plays it, and throws the strategy away. It never plans more than its next action.
- Update the two vectors. After its own action, DeepStack replaces the opponent values with those the re-solve computed for the chosen action, and it updates its own range with Bayes' rule. After a card is dealt, it takes the opponent values for that card from the last re-solve and removes impossible hands from its range. After an opponent action, nothing needs to change, because DeepStack never has to translate the opponent's bet into an abstraction.
- Repeat at the next decision. The loop starts again from the new public state.
Before play, two networks are trained. A turn network is trained on 10 million randomly generated turn situations, each with random ranges, public cards and pot size, and each labelled by solving the game. A flop network is trained on 1 million situations in the same way, using the turn network at its own depth limit.
flowchart LR A[Keep own range and opponent values] --> B[Re-solve the current decision with a short lookahead] B --> C[Value network at the depth limit] C --> D[Act with the sampled action, discard the strategy] D --> E[Update range by Bayes rule and opponent values] E --> A
The math
The paper's guarantee rests on a few definitions. In a two-player zero-sum game such as poker, a Nash equilibrium is a strategy pair that does best against the other player's best response. The exploitability of a strategy is how far a best-response opponent can gain above the equilibrium value. A strategy with exploitability zero is an equilibrium.
For a player , a public state and a hand , the counterfactual value is the expected utility to of holding at . It counts the chance and opponent actions that lead to but not 's own actions, so it is a "what-if" value: what is worth if is reached.
The network output and its correction
The network returns counterfactual values and for both players. Given ranges and , each player's game value estimate is a weighted sum, . In a zero-sum game the two values must sum to zero, but a learned estimate need not. DeepStack subtracts half of the total from each player's values:
Since each range sums to one, the corrected values satisfy . For example, if and , then , the corrected sums are and , and they cancel.
The soundness theorem
The paper's Theorem 1 says that if the value function has error less than at the depth limit, and iterations of counterfactual regret minimisation are used in each re-solve, then the strategy's exploitability is less than , where and are constants for the game. The bound says that better intuition and more solver iterations both reduce the exploitability. The guarantee requires the full set of actions; the sparse action set used in practice is outside it, as the paper notes.
Size of the re-solved game
With a depth limit of four actions, the re-solved game has at most about decision points, down from at the start. The sparse action set reduces the re-solve further to about decision points.
Results
The main test was a study of 44,852 games against 33 professional players recruited from 17 countries. Each player was asked to complete 3,000 games over four weeks, between 7 November and 12 December 2016. Eleven players completed the full match.
| Measure | Result |
|---|---|
| All games, chips won | DeepStack won 492 mbb/g |
| All games, AIVAT luck-adjusted | 486 mbb/g |
| The 11 players who completed 3,000 games | DeepStack won 394 mbb/g on average, beating 10 of the 11 by a statistically significant margin |
| The best player | DeepStack was estimated to lose 70 mbb/g, not significant |
The paper states that professional players regard a margin of 50 mbb/g as sizable. AIVAT is a variance-reduction method built on control variates, and the authors report an 85 percent reduction in standard deviation, which is why 3,000 games were enough for significance.
For exploitability, the paper uses local best response (LBR), which gives a lower bound on how exploitable a strategy is.
| Program | LBR lower bound (mbb/g) |
|---|---|
| Hyperborean (2014) | 4675 |
| Slumbot (2016) | 4020 |
| Act1 (2016) | 3302 |
| Always Fold | 750 |
| DeepStack | no positive lower bound found |
Under every tested setting of LBR's actions, LBR lost 350 mbb/g or more to DeepStack.
Limits. The authors say that these experiments do not prove DeepStack is flawless. LBR is a lower bound, so it can miss weaknesses that a more sophisticated search would find. The sparse action set used in practice steps outside the soundness theorem. The matches were heads-up only, in one game format. For the strongest player, the 3,000-game sample was not enough to reach statistical significance either way.
Reading guide
The paper has no numbered sections. Read it in this order, with each part mapped to the lessons it leans on.
| Part | What it does | Lessons to have in mind |
|---|---|---|
| Introduction | Motivates imperfect-information search and contrasts it with abstraction | Counterfactual Regret Minimization, Nash Equilibrium |
| DeepStack | Explains continual re-solving, depth-limited lookahead and sparse actions | Continual Re-Solving, Best Response, Value Function |
| Deep counterfactual value networks | Describes the network architecture, its inputs and its training | Feedforward Neural Network, Parametric ReLU (PReLU), Function Approximation, Adam Optimizer |
| Evaluating DeepStack | Explains AIVAT and the match results | Control Variate, Expected Value |
| Exploitability | Uses local best response to bound how exploitable DeepStack is | Best Response, Nash Equilibrium |
| Game and glossary | Defines heads-up no-limit hold'em and its terms | Extensive-Form Game |
| Implementation and proof | Gives the algorithm and the soundness proof | Counterfactual Regret Minimization, Minimax Game |