TL;DR
Re-solving handles a game where the other player's cards are hidden (asymmetric information) by solving the current situation afresh at each decision, rather than looking up a fixed table of answers for every possible situation. It starts from the opponent's observed actions, works out what hands they could still hold, and computes a strategy for the rest of the game from that point. Continual re-solving repeats this at every decision, and depth-limited re-solving stops the search early and estimates the value of positions beyond the horizon.
Builds on: Counterfactual Regret Minimization, Value Function · Leads to: Best Response
Where it's used
DeepStack. In 2017 a team reported DeepStack in Science, an agent that beat professional players at heads-up no-limit Texas hold'em. It re-solved a small lookahead at each decision, and it used a learned value function in place of the rest of the game tree.
Libratus. Libratus, which beat professionals in January 2017, used a method called safe subgame solving. When the agent reached a part of the game it had not planned for, it re-solved that part, with a constraint that the opponent could not earn more than under the strategy it had already computed. The constraint is what makes the re-solving safe to trust.
Long card games with many hidden hands. Before the flop in Texas hold'em, a player who holds two cards knows the opponent holds one of possible pairs. After a flop with three board cards are revealed, the count drops to . Re-solving has to track a belief over every one of these hands, which is why the method works on the subgame, not on the whole game.
How it works
Take one decision in a tiny hidden-card game. The opponent holds either a strong hand or a weak hand, with equal chance, and you cannot see which. If you call a bet, you win 3 against a weak hand and lose 2 against a strong hand. Folding is worth 0 either way.
- Start from a blueprint. A blueprint is a strategy computed earlier for the whole game, aiming at a Nash equilibrium. Here it says that a strong hand always bets, and a weak hand bets half the time. Check: the blueprint gives a probability of betting for each hand.
- Observe the action. The opponent bets. You now know the bet, but not the hand. The hands that fit what you have seen form your information set. Check: the bet is evidence about the hand, so the belief must change.
- Update the range. The range is your belief over the opponent's hands. Strong starts at 0.5 and always bets, so it contributes to the chance of seeing a bet. Weak starts at 0.5 and bets half the time, so it contributes . Normalise: strong is and weak is . Check: the two posterior weights add to 1.
- Re-solve the decision. With the new range, calling has expected value , and folding is worth 0. Check: with the original range of one half each, calling would have been worth , a positive value.
- Play the re-solved action. Fold, because the updated range makes calling a loss. Check: the action comes from the new range, not from the blueprint's table of answers.
- Repeat at the next decision. At each new decision, the range is updated again from the blueprint and the newest action, and the subgame below the current point is re-solved.
flowchart LR A["Blueprint strategy for the whole game"] --> B["Opponent acts"] B --> C["Bayes update of the range"] C --> D["Re-solve the current subgame"] D --> E["Play the re-solved action"] E --> B D --> F["Depth limit: estimate leaf values"] F --> D
The math
Setup
Let be the history of public actions so far. The opponent has private hands , and the blueprint gives the probability that the opponent takes the observed actions when holding . Let be the opening range, the prior probability of each hand.
The range after history is the posterior probability of each opponent hand given the observed actions:
The numerator multiplies the prior by the likelihood of the observed actions, and the denominator makes the ranges sum to 1.
Here and name opponent hands, is the prior, and the denominator is the sum over every hand the opponent could hold.
Step 3 in symbols: the Bayes update
With the blueprint's bet probabilities, and , and prior , Bayes' rule gives the posterior
Step 4 in symbols: the value of an action
Let be your payoff from action against hand . The expected value of an action under the range is
With , and , this gives at the posterior.
Depth limit in symbols
If the subgame is cut off at a depth , the leaves of the cut carry an estimate of the value of state , from a learned value function, in place of playing out the rest of the game. The re-solved strategy is then exact only up to the error of .
Worked examples
Keep the prior at 0.5 for each hand, but let the blueprint bet with a weak hand only 0.2 of the time.
- Joint weight of strong and bet: .
- Joint weight of weak and bet: .
- Total weight of a bet: .
- Posterior of strong: .
- Posterior of weak: .
- Check: .
Interpretation: the less often a weak hand bets, the more a bet points to a strong hand, so the range moves further toward strong.
Use the payoffs from the walkthrough: calling is worth against strong and against weak, and folding is worth 0. Calling is worth when is the probability of strong.
- Find the indifference point, where calling and folding are worth the same: , so and .
- Under the opening range , calling is worth , which is greater than 0, so call.
- Under the posterior from Example 1, calling is worth , which is less than 0, so fold.
- Check: the threshold lies between the two cases, since .
Interpretation: the range decides which action is right. A player who ignored the bet, and kept using the opening range, would call and lose money against a strong hand that bets.
In a hold'em hand, you hold two cards, so the 50 unseen cards give possible two-card hands for the opponent.
- Count the hands before the flop: .
- A flop shows three board cards, which removes three more unseen cards, leaving 47.
- Count the hands after the flop: .
- Check: each of the 1081 hands has a weight in the range, and the weights sum to 1.
- After each opponent action, the blueprint's probability of that action for each hand multiplies its weight, and the 1081 weights are normalised again.
Interpretation: the range is a vector of over a thousand weights, updated after every action, so re-solving has to be efficient enough to handle it at every decision.
Try it: suppose the blueprint bets with probability 0.5 for every one of the 1081 hands, and the opponent bets. What is each hand's posterior weight? Answer: each weight is multiplied by 0.5, and the normalisation returns each hand to , so the range does not change. An action that does not depend on the hand gives no information.
Common mistakes and tradeoffs
It is tempting to think that re-solving means solving the whole game again. In fact only the subgame below the current point is solved, and the blueprint supplies the range that the subgame starts from.
It is tempting to think that the opponent's earlier actions can be ignored. In fact they change the range, and a re-solved strategy that ignores them plays against the wrong opponent. The worked example shows the same action flipping from call to fold.
It is tempting to think that depth-limited solving is exact. In fact the leaf estimates are approximations, and errors in the learned value function carry into the strategy. The guarantee holds only as far as the estimates are accurate.
When to use re-solving: when the game is too large to store a full strategy, but a decision can be re-computed in the time available, and the opponent's play before the current point is known. When not to use it: when the full game is small enough to solve in advance, or when the game is perfect-information, where search from the actual position is simpler. Alternatives: storing a complete blueprint, which costs memory, and real-time search with learned values, which costs accuracy.
History
Re-solving grew out of work on decomposing large imperfect-information games into subgames that can be solved separately, in the mid-2010s. Noam Brown and Tuomas Sandholm developed safe and nested subgame solving, which gave the constraint used in Libratus in 2017. DeepStack, reported in Science in 2017, showed that continual re-solving with a learned value function could beat professional players without storing a complete strategy for the game. Later work on depth-limited solving studied how the quality of the leaf estimates limits the quality of the strategy.
Recap
- Re-solving computes a strategy for the current subgame from the opponent's observed actions and a blueprint.
- The range is the posterior over the opponent's hands, updated by Bayes' rule after each action.
- The right action can change when the range changes, so re-solving must use the current range.
- Depth limits trade accuracy for speed, with a learned value function estimating the cut-off positions.
- Read next: Best Response, since re-solving approximates the best reply to the opponent's range, and Value Function for how the leaf estimates are learned.