| Game | |
|---|---|
| the learning player; the opponent | |
| history; terminal history | |
| player 's payoff at , with | |
| information set; its actions | |
| strategy; the strategy of iteration | |
| reach probability from 's own actions; from opponent and chance | |
| counterfactual value; the same after action | |
| exploitability | |
| CFR and Deep CFR | |
| instantaneous regret; linear cumulative regret | |
| linear average strategy after iterations | |
| advantage (regret over total opponent reach); its network | |
| Deep CFR's average-strategy network | |
| player 's average regret after iterations | |
| DREAM | |
| sampling strategy of the learning player | |
| baseline network | |
| baseline-corrected sampled values | |
| probability that 's sampling reaches | |
| Constants | |
| exploration probability in ; enters DREAM's bound as | |
| payoff range; scales DREAM's bound | |
| number of 's information sets, most actions at one, most decisions on a path; DREAM's bound | |
| failure probability of DREAM's bound | |
| traversals per iteration; Theorem 1 of SD-CFR | |
| ranges of exact and sampled losses; Step 8 | |
Context. In a two-player zero-sumone player's payoff is the other's loss: at every end of the game game with hidden information, such as poker, the target is a Nash equilibriuma pair of strategies in which neither player gains by changing their own strategy alone, and the standard way to compute one is counterfactual regret minimizationCFR (Zinkevich et al., 2008): an iterative method that drives each player's regret toward zero and averages the strategies it plays (CFR). CFR runs a small learner at every information seta group of game states the acting player cannot tell apart, such as all deals consistent with the cards they hold and the bets so far, and its tabular form updates every information set on every iteration, so large games are first shrunk by hand-designed abstraction. Deep CFR (Brown et al., 2019) trains a neural network on sampled regrets instead, plus a second network that learns CFR's average strategythe weighted average of the strategies played over all iterations, in the Setting; it, and not the last iterate, converges to equilibrium, and it samples with external samplinga Monte Carlo traversal that tries every action of the learning player at each of its decisions and one sampled action for the opponent and for chance, which needs a simulator that can return to a game state and try each action from it. Steinberger (2019) removes the second network (Single Deep CFR, SD-CFR), and Steinberger et al. (2020) remove the need for a simulator (DREAM) by sampling one action per decision and controlling the added variance with a learned baselinea learned estimate of an expected value, subtracted from a sampled return so that the estimate's variance falls while its mean stays the same.
The average strategy CFR needs is a mixture over iterations, and a mixture can be played exactly by drawing one iteration's network at the start of each game and following it to the end, so the average never has to be learned. A regret estimate built from one sampled action is an importance-weightedmultiplied by , the reciprocal of the probability with which the sample was drawn, which makes a sampled term unbiased for the full sum Monte Carlo estimate, and a learned estimate of each action's value, subtracted where the sample is taken and added back for every action, lowers its variance without biasing it, so the method needs only played episodes.
Setting. Players are and . A historythe sequence of actions so far, including chance's card deals ends at a terminal history with payoff , and is the range of payoffs. Player 's information sets have actions , and a strategy gives each action a probability ; the player index is dropped when it is the player acting at . Write over 's earlier information sets on the path to and the actions taken there for the probability that 's own actions lead to and , where is the product of the opponent's and chance's action probabilities on the path to for the part contributed by the opponent and chance. The counterfactual value, with the expected payoff from on: 's expected payoff from on, each history in weighted by how likely opponent and chance make it , and , the same after taking , give the instantaneous regrethow much more would have won on iteration by always taking at , weighted by the chance that opponent and chance lead there of iteration ,Both papers use linear CFRthe variant of CFR that weights iteration 's regret and strategy by ; in some large games it converges up to two orders of magnitude faster than plain CFR, which accumulates and plays regret matchingeach action in proportion to its positive cumulative regret,with and the uniform strategy when every . The output is the average strategyand quality is measured by exploitability in a zero-sum game: what best-responding opponents win against ; zero exactly at a Nash equilibrium, in milli-antes or milli-big-blinds per game (mA/g, mbb/g); the SD-CFR paper reports Leduc in mA/g and the DREAM paper in mbb/g.
Main results. (a) SD-CFR plays the average exactly (Steinberger, Theorem 2). Suppose each stored network the value network of iteration , trained to predict the advantage , the linear regret at divided by the opponent's total reach (Step 2); regret matching on it gives reproduces its iteration's advantages exactly. Then drawing with probability proportional to , once at the start of a game, and playing regret matching on to the end plays at every information set; computing explicitly from the stored networks gives the same strategy, and no opponent can tell from play which is used. Theorem 1 is the contrast: Deep CFR's buffer of sampled strategies, and so even a perfect network fit to it, is not guaranteed to represent when the buffer is finite or each iteration runs finitely many traversalswhy: an information set reached with probability below 1 can be missed by every traversal of an iteration, and then its strategy never enters the buffer (Step 4). (b) DREAM's average regret falls like (Steinberger et al., appendix). The bound says how fast the average regret of CFR falls when each traversal follows one sampled path, and how much the sampling adds to the tabular rate. The learning player picks a uniformly random action with probability the exploration probability, in ; it keeps the importance weights bounded (Step 6). Let be 's information sets, the most actions at any of them, the most decisions makes on one path through the game, and : how much better the best fixed strategy would have done, per iteration 's average regret after iterations. For every , with probability ,The exploitability of is at most , so the average strategy converges to a Nash equilibrium. Networks that fit their training data only approximately add a constant to the average regret, proportional to the largest gap between a network's training error and that of the exact minimizer (Brown et al., 2019, Theorem 1).
Consequences and limits. With SD-CFR the average network is unnecessary: storing every iteration's small network on disk takes less space than Deep CFR's in-memory strategy buffer (120 MB against about 25 GB for each player's buffer in the larger poker game of Step 5), and the only approximation left is the value networks'. DREAM brought neural CFR to settings where only played episodes are available. In Leduca small poker game: six cards (three ranks, two suits), one private card each, one public card, two betting rounds with at most two raises each poker it matches the simulator-based version at equal numbers of game states visited, and in Flop Hold'emtwo-player limit poker with two private cards each, a betting round before and after three community cards, and at most three raises per round it beats the other model-free methods but stays well behind the simulator-based version (Step 9). The evidence is two poker games with three runs each, read from plots; the regret bound grows exponentially with the number of decisions and does not reflect the baseline; and the baseline network in the experiments takes both players' private cards as input, which self-play training has available but neither player sees. The same idea, a learned value estimate used to lower the variance of a sampled return without adding bias, underlies the baseline in policy-gradienttraining that raises expected reward by following the sampled estimate , the return times the gradient of the log-probability of the sampled output training of language models, with the difference that DREAM's baseline depends on the action and stays unbiased only because it is added back for every action under the current strategy (the link is mine; the papers do not draw it).
CFR's guarantee is for the reach-weighted average, which equals a mixture of the iterates. Regret matching keeps the cumulative counterfactual regret at each information set growing at most like , and their sum over information sets bounds the player's overall regret (Zinkevich et al., 2008): the first term of the bound in (b). In a two-player zero-sum game the exploitability of the average is at most the sum of the two players' average regrets. The iterates themselves usually do not converge in plain or linear CFR, so the average is what must be played. The weight in is 's own probability of reaching under , and with it is the behavioral strategy (a distribution over actions at each information set) that matches, at every information set, the mixture that draws with probability proportional to and then plays throughout. This is Kuhn's theoremin games of perfect recall, where players remember all their own past actions and observations, every mixture of strategies has a behavioral strategy that produces the same distribution over play against any opponent, and Step 3 uses it.
Deep CFR fits advantages from sampled regrets and learns the average with a second network. On each iteration Deep CFR runs a batch of external-sampling traversals for the learning player : every action is explored at 's decisions, and opponent and chance actions are sampled from and the deal. The sampled instantaneous regrets go into a reservoir buffera fixed-size buffer filled by reservoir sampling, which keeps a uniform random sample of everything offered to it, and a value network is trained on all of them, each weighted by its iteration number, to predict the advantage, the linear regret divided by the total opponent reach, displayed hereThe divisor is the same for every action at , so regret matching on gives the same strategy as on , and it keeps the targets on one scale, since reach probabilities shrink geometrically with depth. Sampling the opponent from makes each appear with frequency proportional to , the reach weight in , so a least-squares fit to the sampled regrets, weighted by , estimates . When every predicted advantage is at most 0, Deep CFR plays the action with the largest advantage instead of the uniform strategy. Because the iterates are not the answer, Deep CFR also trains a second network Deep CFR's average-strategy network, trained to predict from strategy vectors recorded during traversals on the opponent's strategy vectors , recorded at the opponent's information sets during the same traversals. The opponent plays on-policy there, so each of its information sets is recorded with frequency proportional to its own reach probability, the weight the average needs, and the loss is weighted by .
SD-CFR plays the average exactly by choosing one network per game. Keep every . At the start of a game draw with probability and play regret matching on for the whole game. Given the draw, reaches with probability times a factor from the opponent and chance that does not depend on , so Bayes' rule gives the posterior over iterations at and the resulting action probability,This is Theorem 2 for this trajectory sampling, and it costs one network query per decision, as Deep CFR does. When the whole distribution is needed, as for computing exploitability, is the product of along 's earlier decisions on the path to , which takes at most one forward pass of each stored network per such decision, a few seconds on a CPU in poker. Storage is small: the networks used for large poker games take under 400 KB each, and Deep CFR runs a few hundred iterations. Deep CFR and SD-CFR depend on the value networks in exactly the same way, so with all networks kept SD-CFR approximates linear CFR at least as well.
A learned average can be wrong even with perfect value networks. Theorem 1 points at the sampling. With the number of traversals run per iteration traversals per iteration, an information set reached with probability is missed by all of them with probability , and that iteration's strategy there never enters the buffer. A finite buffer also cannot reproduce arbitrary ratios between iterations' reach probabilities, and a game with more information sets than buffer slots cannot have all of them stored. A perfect fit to this buffer fits the wrong target. The errors are largest where reach is small, deep in the game, which is what Step 5 measures.
With shared value networks, SD-CFR is less exploitable than Deep CFR and beats it head to head. The two algorithms train value networks identically, so the experiments share them and isolate the averaging. In Leduc, with networks and buffers large for the game, the exploitability curves coincide for about 100 iterations and then separate, ending near 60 against 80 mA/g after about 5,000 iterations (five runs). In 5-Flop Hold'emFlop Hold'em with five community cards instead of three, a larger game that forces the networks to generalize, SD-CFR's mean winnings against Deep CFR built from the same networks are positive at every checkpoint (five runs; a few single runs dip just below zero): about 30 mbb/g at iteration 30 and roughly 7 to 10 mbb/g from iteration 60 on, each point from 3 million hands with a 95% interval between and mbb/g (10 mbb/g counts as a good margin between human players). The mean absolute difference between the two average strategies grows with the number of decisions made, from 0.012 at the first decision to 0.175 after five, as Step 4 predicts. Keeping only a reservoir sample of the networks hurts: exploitability plateaus or oscillates at every capacity tried up to 1,000 networks. In a Leduc variant with 12 ranks and up to 6 bets per round the two are closer. Curve values are approximate, read from the plots.
Without a simulator only one action can be sampled, and the plain estimate is too noisy. External sampling needs to return to and try every action, which a simulator allows and a played episode does not. Outcome samplinga Monte Carlo traversal that follows one sampled path through the game: one action at every decision, the learning player's included (Lanctot et al., 2009) samples one action at every decision. The learning player samples fromto keep exploring, and the opponent plays . Sampled values are then multiplied by the importance weight at each of 's decisions on the path and are zero for every action not taken, so each regret estimate rests on one path and can be very large. Training data are weighted by to undo the exploration. Run this way with SD-CFR's averaging (OS-SD-CFR), the method stalls: about 140 mbb/g in Leduc where the simulator-based version reaches about 50, and about 100 against about 15 in Flop Hold'em (approximate, read from the plots).
DREAM's learned baseline keeps the one-sample estimate unbiased and lowers its variance. A network DREAM's baseline network: predicts 's expected payoff after taking at and then following is trained by expected SARSAregression of on the observed reward plus at the next history , an expectation over the next action under the current strategy on a circular buffera fixed-size buffer that overwrites its oldest entries of played transitions. At a history on the sampled path, where action was taken and led to , every action gets the value estimatecomputed backward from the terminal payoff. Action is sampled with probability , so the correction has mean , and by induction from the end of the game is unbiased for the true value of whatever is. Its variance comes only from the residual , so a good baseline makes the factor harmless, and actions not taken get the baseline instead of 0. The sampled advantage , trained into the advantage network with loss weight , then estimates a quantity proportional to linear regret, as in Step 2, because opponent and chance are sampled on-policy. Baselines are used only for the players' actions: a baseline on chance outcomes, as in tabular VR-MCCFRvariance-reduced Monte Carlo CFR (Schmid et al., 2019): the tabular form of these baselines, for player actions and chance outcomes, needs the transition probabilities, that is, a simulator. The baseline is cheap: 100 to 3,000 minibatch updates per iteration make little difference, plausibly because starts from the previous iteration's weights. DREAM plays the SD-CFR average (Step 3).
The regret bound grows exponentially with depth because of the importance weights. DREAM's bound combines the CFR bound of Step 1 with a high-probability bound for sampled CFR (Farina et al., 2020): the average regret on the true values exceeds the one on the sampled values by at most , where is the range of the exact losses and the range of the sampled ones. A sampled payoff is divided by the probability that 's sampling reaches the terminal history , and exploration gives , so and, since that factor is at least 1, ; adding this sampling term to the CFR bound of Step 1 gives (b). The bound holds for any unbiased estimator, so any baseline is allowed, but the baseline's effect on variance does not enter it: the theorem shows that DREAM converges, and its speed is an empirical matter (Step 9). The guarantee is for the returned average; the exploring policy used in training has none.
DREAM matches the simulator-based method in Leduc and leads the model-free methods in Flop Hold'em. Methods are compared at equal numbers of game states visited, with traversal counts set so that outcome and external sampling visit about as many per iteration (900 DREAM traversals against 346 for external-sampling SD-CFR in Leduc, the measured ratio being 2.6; 50,000 against 10,000 in Flop Hold'em), three runs each. In Leduc, DREAM and external-sampling SD-CFR follow the same curve, near 50 mbb/g after states. NFSPneural fictitious self-play (Heinrich and Silver, 2016): each player learns a best response to the other's average behavior with deep RL while a second network imitates its own average behavior, the earlier model-free standard, needs about states to reach the 60 mbb/g that DREAM reaches near , a factor of about 50 that the paper calls two orders of magnitude. DREAM with Deep CFR's average network in place of SD-CFR's averaging levels off near 100. In Flop Hold'em exploitability is a lower bound, what a DDQNdouble deep Q-network, a standard deep RL method, here trained to play against the frozen agent; what it wins is a lower bound on exploitability best response trained against the agent wins: after states DREAM is near 40 mbb/g, OS-SD-CFR and NFSP near 100, and external-sampling SD-CFR, which uses the simulator, near 15. Ablations in Leduc: exploration from 0.25 to 1 behaves alike and 0.1 is worse, and retraining the advantage network from scratch every 10 iterations, with fine-tuning in between, reaches the exploitability of always retraining with far fewer network updates and beats never retraining. All values are approximate, read from the plots.
Terms
- CFR
- regret matching at every information set; the reach-weighted average converges to a Nash equilibrium in two-player zero-sum games
- Linear CFR
- iteration weighted by in both the regrets and the average
- Exploitability bound
- , the sum of the two average regrets
- External sampling
- explores every action of the learning player; needs a resettable simulator
- Outcome sampling
- one sampled action per decision; importance weights make it unbiased and noisy
- Advantage
- linear regret over ; same regret matching, targets on one scale
- Deep CFR
- value network on sampled regrets plus an average-strategy network
- SD-CFR
- store every ; draw once per game and play it throughout; exact average
- , the weight of iteration in
- DREAM estimator
- ; unbiased for any
- DREAM bound
Quiz
- Deep CFR divides the linear regret at by before fitting the value network. Why is this harmless?Regret matching normalizes positive regrets within , so a common positive factor leaves the strategy unchanged. The point of dividing is to keep the regression targets on one scale, since reach shrinks with depth.
- Why is outcome sampling without a baseline too noisy for neural CFR?The estimate is unbiased, but a single path multiplies importance weights along the way and assigns 0 to every action not taken, so per-sample regrets are large. DREAM's baseline fills in those actions and shrinks the weighted residual.
- DREAM uses baselines only for the players' actions, not for chance outcomes such as card deals. Why?Adding a baseline back for every outcome, as Step 7 does for actions, requires weighting outcomes by their probabilities. For actions those are , which DREAM has; for chance they come from the simulator.
Sources
- Eric Steinberger. Single Deep Counterfactual Regret Minimization. NeurIPS Deep Reinforcement Learning Workshop, 2019.
- Eric Steinberger, Adam Lerer, and Noam Brown. DREAM: Deep Regret minimization with Advantage baselines and Model-free learning. arXiv preprint, 2020.
- Noam Brown, Adam Lerer, Sam Gross, and Tuomas Sandholm. Deep Counterfactual Regret Minimization. ICML, 2019.
- Martin Schmid et al. Variance Reduction in Monte Carlo Counterfactual Regret Minimization (VR-MCCFR) for Extensive Form Games using Baselines. AAAI, 2019.