Simple Algorithm
Reinforcement Learning · Fixed Point · 28 min

Search with Imperfect Information: DeepStack & ReBeL

Public belief states, and combining RL with search when information is hidden.

AlphaZero's recipe, search guided by a learned value function and improved by self-play, mastered chess and Go and fails outright at poker, because a poker position has no value of its own. The fix is to search over public belief states: positions together with everyone's beliefs about the hidden cards. This lesson follows that idea from DeepStack's continual re-solving through ReBeL's self-play on belief states and Student of Games, and then to Stratego and Diplomacy, where belief states grow too large and regularized learning took over.

What you’ll learn

  • Explain with a computed example why a state defined by actions and observations has no unique value in an imperfect-information game, and why unsafe search is exploitable.
  • Define public belief states, explain how they turn any game into a perfect-information game over beliefs, and state ReBeL's guarantees with their assumptions.
  • Describe DeepStack's continual re-solving: what it tracks between decisions, how it updates, what its value networks compute, and what its soundness theorem assumes.
  • Derive the KL-regularized optimum π∝τ eq/λ\pi\propto\tau\,e^{q/\lambda}, and explain how piKL and regularized Nash dynamics use regularization in Diplomacy and Stratego.
  • Summarize what Student of Games, DeepNash and Cicero achieved, and what remains open.

Why a position has no value

In a two-player zero-sum perfect-information game every state has a unique minimax value, so search can stop at a depth limit and substitute a learned estimate, as AlphaZero does (Search as Policy Improvement: AlphaZero). Brown, Bakhtin, Lerer and Gong (2020) show why this breaks with hidden information using a modified rock–paper–scissors (introduced as RPS+ by Brown, Sandholm & Amos, 2018) in which any win involving Scissors pays 2 instead of 1. P1 moves first, and P2 moves without seeing P1's choice, which makes the game sequential but with imperfect information.

P1 playsP2: RockP2: PaperP2: Scissors
Rock00−1-1+2+2
Paper+1+100−2-2
Scissors−2-2+2+200
Payoffs to P1. The unique equilibrium has both players play Rock 0.4, Paper 0.4, Scissors 0.2, and the value is 0: against (0.4,0.4,0.2)(0.4,0.4,0.2), Rock earns −0.4+0.4=0-0.4+0.4=0, Paper 0.4−0.4=00.4-0.4=0 and Scissors −0.8+0.8=0-0.8+0.8=0.

Now try one-ply search for P1, scoring each of its moves by the value of the position it leads to. Under equilibrium play every one of those positions is worth 0, so the search sees three equally good moves and has no way to prefer (0.4,0.4,0.2)(0.4,0.4,0.2) over pure Rock, which P2 would punish with Paper. The value of an action depends on the probability with which it is chosen, through the opponent's beliefs. A state defined by the sequence of actions and observations therefore has no unique value, and search algorithms built on such values, AlphaZero's included, are not sound in imperfect-information games.

Think first Suppose P2 runs an equilibrium solver that returns a slightly noisy estimate of P1's strategy, (0.40,0.39,0.21)(0.40,0.39,0.21), and then best-responds to that estimate. What does P2 play, and what does it cost?

P2's expected payoffs are Rock −0.39+2(0.21)=+0.03-0.39+2(0.21)=+0.03, Paper 0.40−2(0.21)=−0.020.40-2(0.21)=-0.02 and Scissors −2(0.40)+2(0.39)=−0.02-2(0.40)+2(0.39)=-0.02, so P2 plays pure Rock. An opponent who anticipates this plays Paper and wins 1 every game, against a game value of 0. This is unsafe search: treating beliefs derived from an approximate strategy as facts. (With P1's Scissors frequency exactly 0.2, Rock and Paper tie for P2, which is why the perturbation here is on Scissors.)

Public belief states

Brown et al. (2020) make the construction vivid. Let a referee hold every player's cards. On each turn the acting player announces an action distribution for every card it might hold, and the referee samples an action for the true card. Nothing is private any more, every belief is public, and the game is strategically identical to the original. It is a perfect-information game whose states are PBSs and whose actions are policies for the current public state: continuous and high-dimensional (in poker, a distribution over 1,326 possible hands per player), but a perfect-information game.

In a two-player zero-sum game every PBS β\beta has a unique value V1(β)=−V2(β)V_1(\beta)=-V_2(\beta), defined by equilibrium play in the subgame rooted at β\beta. Search needs more than this one number. It needs a value for each of the player's private hands, the infostate values v1(s1∣β)v_1(s_1\mid\beta), which may depend on which equilibrium is played; ReBeL's Theorem 1 shows that any of them form a supergradient of V1V_1, extended to unnormalized beliefs, so that v1(s1∣β)=V1(β)+gˉ⋅s^1v_1(s_1\mid\beta)=V_1(\beta)+\bar g\cdot\hat s_1 for a supergradient gˉ\bar g and the unit vector s^1\hat s_1. The value networks of DeepStack and ReBeL map a PBS to such a vector of values, one per hand.

Check your understanding

After P1 bets, a searcher wants the new PBS. Besides the public history, what must it know?

  1. P1's actual cards
  2. P1's policy for every hand it might hold, so that the beliefs can be updated by Bayes' rule
  3. Only the size of the bet
  4. P2's best response to P1's bet
Show the answer

B. P1's policy for every hand it might hold, so that the beliefs can be updated by Bayes' rule

The PBS update multiplies each possible hand's belief by the probability that the policy bets with it. That is why PBSs depend on policies, why self-play training can compute them exactly, and why test-time play needs care: the opponent never announces its policy.

DeepStack: continual re-solving

DeepStack (Moravčík et al., 2017) never stores a strategy for the whole game. It re-solves every time it has to act, and uses the result only for its next action. Between decisions it carries exactly two things: its own range, the probability of each of its possible hands given the public state, and a vector of opponent counterfactual values, one per opponent hand, which must bound what each opponent hand can achieve from the current public state while being no larger than what that hand could have earned by deviating earlier. These feed a re-solving gadget like the one in Subgame Solving: Libratus & Pluribus. The updates are simple:

  • Own action: replace the opponent's values by those computed in the re-solve for the action taken, and update the own range by Bayes' rule with the strategy just computed.
  • Chance (new cards): replace the opponent's values by those computed for that card in the last re-solve, and zero out own hands that the board makes impossible.
  • Opponent action: nothing changes.

DeepStack never tracks the opponent's range and never needs the opponent's bet to lie in an abstraction: any bet size is simply a new public state to re-solve from.

Re-solving to the end of the game is affordable only near the end, so DeepStack looks ahead to the end of the current betting round (on the turn, to the end of the game) and stops there with a counterfactual value network. Its input is a description of a poker game, the pot size, the public cards and both players' ranges; its output is the counterfactual value of every hand for both players. The turn network was trained on 10 million random situations, each solved by CFR+ with 1,000 iterations; the flop network on 1 million. The lookahead used only a few actions (fold, call, two or three bet sizes, all-in), which gave re-solving problems of about 10710^7 decision points, solved in under five seconds on a single GTX 1080 GPU.

From 7 November to 12 December 2016, 33 players from 17 countries, recruited through the International Federation of Poker, played 44,852 hands against DeepStack. It won 492 mbb/g (±220\pm220, 95% interval) on raw results and 486 mbb/g (±40\pm40) with the AIVAT variance-reduction estimator. Against the 11 players who completed the requested 3,000 hands it won 394 mbb/g, beating 10 of them by a statistically significant margin. The participants were self-identified professionals rather than the heads-up specialists who faced Libratus weeks later.

ReBeL and Student of Games

DeepStack's value networks were trained on randomly generated situations. ReBeL (Brown, Bakhtin, Lerer & Gong, 2020) closes the AlphaZero loop instead: it learns a value network over PBSs from its own self-play, and search over PBSs generates the training targets.

text
REBEL-SELF-PLAY(value net v, policy net p):
    beta ← initial PBS
    while beta is not terminal:
        G ← depth-limited subgame rooted at beta
        pi^0 ← p(beta) or uniform
        for t = 1 .. T:                                # equilibrium finding, e.g. CFR-D
            leaf values of G ← v(leaf PBS induced by pi^(t-1))
            pi^t ← CFR update of pi^(t-1) on G
        add (beta, infostate values at the root of G) to v's training data
        add (beta, average policy at the root) to p's training data   # optional
        t* ← uniform random iteration in {1, ..., T}
        beta ← PBS of a leaf of G sampled by playing pi^(t*)       # one player explores with prob. eps

Leaves are sampled under a random iteration's policy because the value network must be accurate for the leaf PBSs of every iteration, not just the last. In perfect-information games ReBeL reduces to an algorithm similar to AlphaZero.

The random iteration is what makes the search safe without the extra constraints of a re-solving gadget: playing a uniformly random CFR iterate is, in expectation, playing their average, which is the part of CFR that converges. In heads-up no-limit hold'em ReBeL beat Baby Tartanian8 by 9±49\pm4 and Slumbot by 45±545\pm5 mbb/game (± one standard deviation), and beat the professional Dong Kim by 165 mbb/game (± 69, one standard error, with variance reduction) over 7,500 hands, with far less poker-specific engineering than earlier programs; it also reached low exploitability in variants of Liar's Dice.

Student of Games (Schmid et al., 2023; first released in 2021 as Player of Games) unifies the two lines. Its search, growing-tree CFR, runs CFR on a tree that it expands non-uniformly toward promising lines, as MCTS does, guided by counterfactual value-and-policy networks trained by sound self-play. One algorithm plays chess, Go, heads-up no-limit hold'em and Scotland Yard: it beat Slumbot by 7±37\pm3 mbb/hand (95% confidence), won 55% of games against PimBot at Scotland Yard, and played chess and Go strongly, although below AlphaZero.

Check your understanding

At test time ReBeL plays the policy of a randomly chosen iteration of its equilibrium solver rather than the last one. Why?

  1. To make its play unpredictable to humans, at some cost in strength
  2. Because the last CFR iterate is always the least exploitable
  3. Because a uniformly random CFR iterate is, in expectation, the average strategy, which approximates an equilibrium; so play is safe in expectation without extra constraints
  4. Because the value network was trained only on early iterations
Show the answer

C. Because a uniformly random CFR iterate is, in expectation, the average strategy, which approximates an equilibrium; so play is safe in expectation without extra constraints

CFR's guarantee is for the average of its iterates, and playing a random iterate is playing that average in expectation, just as playing pure Rock with probability 0.4 is fine in the modified game. Fixing beliefs from one computed solution instead is unsafe search.

Regularized play: Stratego and Diplomacy

Belief states can be far too large to search. In Stratego each player's 40 pieces start hidden and much of that information stays hidden for hundreds of moves; the game tree has about 1053510^{535} nodes, with 106610^{66} possible initial deployments. In seven-player Diplomacy the difficulty is different: players negotiate in natural language, and good play depends on predicting and persuading humans. Both successes rest on the same tool, regularizing play toward a reference policy, whose one-step form has a closed solution.

DerivationKL-regularized play has a closed form
  1. ∑aπ(a) q(a)−λ DKL(π ∥ τ)=λlog⁡Z−λ DKL(π ∥ π⋆),π⋆(a)=τ(a) eq(a)/λZ\sum_a\pi(a)\,q(a)-\lambda\,\KL(\pi\,\|\,\tau)=\lambda\log Z-\lambda\,\KL(\pi\,\|\,\pi^\star),\qquad\pi^\star(a)=\frac{\tau(a)\,e^{q(a)/\lambda}}{Z}

    Fix action values q(a)q(a) and a reference policy τ\tau with full support, and maximize expected value minus λ>0\lambda>0 times the divergence from τ\tau. Completing the "free energy" with Z=∑aτ(a)eq(a)/λZ=\sum_a\tau(a)e^{q(a)/\lambda} gives, for every policy π\pi,

  2. π⋆(a)∝τ(a) eq(a)/λ,max⁡π[∑aπ(a)q(a)−λ DKL(π ∥ τ)]=λlog⁡∑aτ(a) eq(a)/λ\pi^\star(a)\propto\tau(a)\,e^{q(a)/\lambda},\qquad\max_\pi\Big[\sum_a\pi(a)q(a)-\lambda\,\KL(\pi\,\|\,\tau)\Big]=\lambda\log\sum_a\tau(a)\,e^{q(a)/\lambda}

    Since DKL≥0\KL\ge0 with equality only at π=π⋆\pi=\pi^\star, the regularized optimum is unique:

  3. As λ→0\lambda\to0, π⋆\pi^\star concentrates on arg max⁡aq(a)\argmax_aq(a), a best response; as λ→∞\lambda\to\infty it returns to τ\tau. This is the optimum of KL-regularized RL from RL from Human Feedback. In a game, qq depends on the other players' policies, so regularized best responses are iterated toward an equilibrium of the regularized game.

DeepNash (Perolat et al., 2022) plays Stratego without any search, by model-free deep RL with regularized Nash dynamics (R-NaD), in three steps: transform each player's reward with a penalty for diverging from a regularization policy; run learning dynamics, which in the regularized game converge to its unique fixed point instead of cycling; then make that fixed point the new regularization policy and repeat. Perolat et al. (2021) analyze why this works: in zero-sum games, dynamics that cycle without regularization converge with it, and moving the regularization point repeatedly drives the fixed points toward a Nash equilibrium. On the Gravon platform in April 2022, DeepNash won 42 of 50 ranked games against humans (84%), reaching third place in both that year's and the all-time rankings, and it beat existing Stratego programs in over 97% of games.

Cicero (Meta FAIR Diplomacy Team et al., 2022) plays full-press Diplomacy, negotiation included. A dialogue model generates messages conditioned on intents, planned actions for itself and its partner; a planning module chooses those intents with a variant of piKL (Jacob et al., 2022), in which each player maximizes ui(πi,π−i)−λiDKL(πi ∥ τi)u_i(\pi_i,\pi_{-i})-\lambda_i\KL(\pi_i\,\|\,\tau_i) with τi\tau_i imitating human play, so that its predictions of others stay human-like while its own play improves on imitation; and filters discard nonsensical, ungrounded, low-value or toxic messages. In 40 blitz games on webDiplomacy.net in August–October 2022 it averaged a score of 25.8%, against 12.4% for its 82 human opponents, and ranked in the top 10% of participants who played more than one game.

Key takeaways

  • In imperfect-information games an action's value depends on the probability with which it is chosen, so positions have no unique values; search that fixes beliefs from an approximate strategy (unsafe search) is exploitable.
  • A public belief state is the public history plus each player's distribution over its private states; with common-knowledge policies it turns any game into a perfect-information game over beliefs, in which two-player zero-sum PBSs have unique values.
  • DeepStack re-solves before every action, carrying only its own range and the opponent's counterfactual values, and stops its lookahead with networks that map ranges and pot to counterfactual values; it is sound up to value error and solver iterations.
  • ReBeL runs self-play with depth-limited CFR over public belief states and a learned value network; in two-player zero-sum games it converges to an equilibrium under ideal approximation, and playing a random solver iterate makes test-time search safe. Student of Games extends the approach to chess, Go, poker and Scotland Yard with one algorithm.
  • When belief states are too large or the game is multiplayer, regularization carried the day: DeepNash's regularized Nash dynamics reached a top-three ranking among human experts at Stratego without search, and Cicero's KL-regularized planning, π∝τ eq/λ\pi\propto\tau\,e^{q/\lambda} anchored to human play, reached human level at full-press Diplomacy.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

Why can AlphaZero-style search, which substitutes a learned value at a depth limit, not be applied directly to poker?

  1. Poker has too many legal moves
  2. A poker position defined by the actions and observations so far has no unique value: its value depends on the probabilities with which the players' strategies reach it
  3. Neural networks cannot represent poker hands
  4. Poker is not zero-sum
Show the answer

B. A poker position defined by the actions and observations so far has no unique value: its value depends on the probabilities with which the players' strategies reach it

In modified rock–paper–scissors every position after P1's move is worth 0 under equilibrium play, yet only one mixture is an equilibrium: an action's value depends on how often it is chosen. The remedy is to search over public belief states, which carry the beliefs that strategies induce.

Question 2

What does DeepStack carry from one decision to the next?

  1. A complete strategy for the rest of the game
  2. The opponent's range, updated after every opponent action
  3. Its own range and a vector of the opponent's counterfactual values, one per opponent hand
  4. Only the public betting history
Show the answer

C. Its own range and a vector of the opponent's counterfactual values, one per opponent hand

Continual re-solving needs only its own range, to know how it got here, and upper bounds on what each opponent hand can achieve, to re-solve safely. It never tracks the opponent's range and never keeps a strategy beyond its next action.

Question 3

piKL plays π∝τ eq/λ\pi\propto\tau\,e^{q/\lambda}, where τ\tau imitates human play. What happens as λ→∞\lambda\to\infty, and as λ→0\lambda\to0?

  1. As λ→∞\lambda\to\infty the policy becomes τ\tau, human-like play; as λ→0\lambda\to0 it concentrates on arg max⁡aq(a)\argmax_aq(a), a best response
  2. As λ→∞\lambda\to\infty it becomes a best response; as λ→0\lambda\to0 it becomes τ\tau
  3. Both limits give the uniform policy
  4. λ\lambda changes only how fast the policy is learned, not the policy itself
Show the answer

A. As λ→∞\lambda\to\infty the policy becomes τ\tau, human-like play; as λ→0\lambda\to0 it concentrates on arg max⁡aq(a)\argmax_aq(a), a best response

λ\lambda weighs the divergence from τ\tau against expected value: a large λ\lambda makes staying close to human play paramount, a small one makes value paramount. Cicero and Diplodocus set it to improve on imitation while keeping predictions of human partners accurate.

Question 4

DeepNash reached expert level at Stratego without any search at play time. What made belief-state search unattractive there?

  1. Stratego has no hidden information once the pieces are deployed
  2. Stratego is a general-sum game, where search is undefined
  3. Neural networks cannot evaluate Stratego positions
  4. Each player's hidden information (40 pieces) persists for hundreds of moves, so public belief states are enormous
Show the answer

D. Each player's hidden information (40 pieces) persists for hundreds of moves, so public belief states are enormous

A PBS needs a distribution over each player's possible private states. In hold'em that is 1,326 hands; in Stratego it is a distribution over arrangements of 40 hidden pieces, refined over hundreds of moves. DeepNash instead learned a policy directly with regularized Nash dynamics.

Further reading

  • M. Moravčík, M. Schmid, N. Burch, V. Lisý, D. Morrill, N. Bard, T. Davis, K. Waugh, M. Johanson & M. Bowling, "DeepStack: Expert-level artificial intelligence in heads-up no-limit poker," Science 356(6337), 508–513 (2017).
  • N. Brown, A. Bakhtin, A. Lerer & Q. Gong, "Combining deep reinforcement learning and search for imperfect-information games," Advances in Neural Information Processing Systems 33, 17057–17069 (2020).
  • M. Schmid, M. Moravčík, N. Burch, R. Kadlec, J. Davidson et al., "Student of Games: A unified learning algorithm for both perfect and imperfect information games," Science Advances 9(46), eadg3256 (2023).
  • J. Perolat, B. De Vylder, D. Hennes, E. Tarassov, F. Strub et al., "Mastering the game of Stratego with model-free multiagent reinforcement learning," Science 378(6623), 990–996 (2022).
  • Meta Fundamental AI Research Diplomacy Team (FAIR), A. Bakhtin, N. Brown, E. Dinan, G. Farina et al., "Human-level play in the game of Diplomacy by combining language models with strategic reasoning," Science 378(6624), 1067–1074 (2022).