Lecture 8
Learning in extensive-form games
Several approaches for constructing no-regret algorithms for extensive-form games have been proposed. For one, extensive-form games are a particular instance of combinatorial games for which the multiplicative weights update algorithm can be implemented efficiently in the reduced normal form of the game, despite the exponential size. We will see more details about this in a later class.
As explained in Lecture 7, the natural representation of strategies to define learning in extensive-form games is the sequence-form representation. Indeed, in that representation utility functions are linear and the strategy set of each player a convex polytope, aligning with the requirements of the regret minimization framework.
Another example is the computation of coarse correlated equilibria in any multiplayer extensive-form game via external regret minimization, or computation of best responses against static opponents.
To construct an external regret minimizer that outputs sequence-form strategies, several approaches can be followed. For one, we have seen that one can always use the online projected gradient ascent algorithm, which is a particular instantiation of the online mirror descent (OMD) algorithm. The drawback of such approach is that it requires projecting onto the polytope of sequence form strategies, which might be laborious. Alternative regularizers (i.e., distance-generating functions) that render projection easier have been proposed. However, for today we focus on a different approach, which has been extremely popular in practice: the counterfactual regret minimization (CFR) algorithm.
L8.1 The CFR algorithm
The idea of the CFR algorithm is simple: construct a regret minimizer for the whole tree-form problem starting from local regret minimizers at each decision point, each learning what actions to play at that decision point.
Example L8.1 .
As an example, consider the TFDP faced by Player 1 in the game of Kuhn poker [Kuh50[Kuh50] Kuhn, H. W. (1950). A Simplified Two-Person Poker. In H. W. Kuhn & A. W. Tucker (Eds.), Contributions to the Theory of Games (Vol. 1, pp. 97–103). Princeton University Press.], which we already introduced in Lecture 7. The black nodes are the decision points of the player, and the white nodes are the observation points.
Since the player has six decision points—denoted \(j_{1} , \dots , j_{6}\) in the figure—the CFR algorithm will use six local regret minimizers, which we denote \(R_{1} , \dots , R_{6}\). Each regret minimizer \(R_{j}\) will be responsible for outputting a local strategy \(b_{j} \in \Delta (A_{j})\) for the decision point \(j\).
The local distributions output by the different local regret minimizers is then combined to form a sequence-form strategy that plays according to the local distributions at each decision point.
L8.1.1 Where the magic happens: Counterfactual utilities
What is the training signal that each local regret minimizer receives? In other words, what is the utility that the regret minimizer at decision point \(j\) observes? The answer is the counterfactual utility.
Remember that in the sequence form representation, the dimensionality of the strategy vectors matches the number of actions controlled by the players. Hence, the gradient vector received by the regret minimizer has one entry per each action controlled by the player, intuitively representing whether the “probability flow” passing through that action scores well or poorly. The idea of counterfactual utilities is to use as training signal for every \(R_{j}\) the vector of expected utilities in the subtrees rooted at each of the actions \(a \in A_{j}\).
It can be shown that the regret cumulated by the CFR algorithm satisfies the following bound.
Theorem L8.2 .
Let \(\mathord{\operatorname{Reg}}_{j}^{( T )}\), for \(j \in \mathcal{J}\), denote the regret cumulated up to time \(T\) by each of the regret minimizers \(R_{j}\). Then, the regret \(\mathord{\operatorname{Reg}}^{( T )}\) cumulated by Algorithm 1 up to time \(T\) satisfies
It is then immediate to see that if each \(\mathord{\operatorname{Reg}}_{j}^{( T )}\) grows sublinearly in \(T\), then so does \(\mathord{\operatorname{Reg}}^{( T )}\).
In order to formally introduce counterfactual utility, we recall a bit of notation to deal with tree-form decision processes.
Notation for tree-form decision processes We recall the following notation for dealing with tree-form decision processes (TFDPs), which we introduced in Lecture 7. The notation is also summarized in Table 1.
- We denote the set of decision points in the TFDP as \(\mathcal{J}\), and the set of observation points as \(\mathcal{K}\). At each decision point \(j \in \mathcal{J}\), the agent selects an action from the set \(A_{j}\) of available actions. At each observation point \(k \in \mathcal{K}\), the agent observes a signal \(s_{k}\) from the environment out of a set of possible signals \(S_{k}\).
- We denote by \(ρ\) the transition function of the process. Picking action \(a \in A_{j}\) at decision point \(j \in \mathcal{J}\) results in the process transitioning to \(ρ (j , a) \in \mathcal{J} ∪ \mathcal{K} ∪ \{\bot \}\), where \(\bot\) denotes the end of the decision process. Similarly, the process transitions to \(ρ (k , s) \in \mathcal{J} ∪ \mathcal{K} ∪ \{\bot \}\) after the agent observes signal \(s \in S_{k}\) at observation point \(k \in \mathcal{K}\).
- A pair \((j , a)\) where \(j \in \mathcal{J}\) and \(a \in A_{j}\) is called a sequence. The set of all sequences is denoted as \(Σ \coloneqq \{(j , a) : j \in \mathcal{J} , a \in A_{j}\}\). For notational convenience, we will often denote an element \((j , a)\) in \(Σ\) as \(j a\) without using parentheses.
- Given a decision point \(j \in \mathcal{J}\), we denote by \(p_{j}\) its parent sequence, defined as the last sequence (that is, decision point-action pair) encountered on the path from the root of the decision process to \(j\). If the agent does not act before \(j\) (that is, \(j\) is the root of the process or only observation points are encountered on the path from the root to \(j\)), we let \(p_{j} = \emptyset\).
Example L8.3 .
As an example, consider again the TFDP faced by Player 1 in the game of Kuhn poker [Kuh50], which was also recalled above in Example L8.1. We have that \(J = \{j_{1} , \dots , j_{6}\}\) and \(K = \{k_{1} , \dots , k_{4}\}\). We have:
Furthermore,
Notation for the components of vectors Any vector \(x \in \mathbb{R}^{Σ}\) has, by definition, as many components as sequences \(Σ\). The component corresponding to a specific sequence \(j a \in Σ\) is denoted as \(x [j a]\). Similarly, given any decision point \(j \in \mathcal{J}\), any vector \(x \in \mathbb{R}^{A_{j}}\) has as many components as the number of actions at \(j\). The component corresponding to a specific action \(a \in A_{j}\) is denoted \(x [ a ]\).
| Symbol | Description |
|---|---|
| \(\mathcal{J}\) | Set of decision points |
| \(A_{j}\) | Set of legal actions at decision point \(j \in \mathcal{J}\) |
| \(\mathcal{K}\) | Set of observation points |
| \(S_{k}\) | Set of possible signals at observation point \(k \in \mathcal{K}\) |
| \(ρ\) |
Transition function:
|
| \(Σ\) | Set of sequences, defined as \(Σ \coloneqq \{( j , a ) : j \in \mathcal{J} , a \in A_{j}\}\) |
| \(p_{j}\) | Parent sequence of decision point \(j \in \mathcal{J}\), defined as the last sequence (decision point-action pair) on the path from the root of the TFDP to decision point \(j\); if the agent does not act before \(j\), \(p_{j} = \emptyset\). |
L8.1.2 Pseudocode for CFR
Pseudocode for CFR is given in Algorithm 1. Note that the implementation is parametric on the regret minimization algorithms \(R_{j}\) run locally at each decision point. Any regret minimizer \(R_{j}\) for simplex domains can be used to solve the local regret minimization problems. Popular options are the regret matching algorithm, and the regret matching plus algorithm (Lecture 5).
L8.1.3 Learning using self-play
The CFR algorithm can be used to learn a Nash equilibrium in a two-player zero-sum game by letting two regret minimizers play against each other. The two regret minimizers exchange their sequence-form strategies at every iteration according to the canonical learning setup.
L8.2 Bibliography for this lecture
| [Kuh50] | Kuhn, H. W. (1950). A Simplified Two-Person Poker. In H. W. Kuhn & A. W. Tucker (Eds.), Contributions to the Theory of Games (Vol. 1, pp. 97–103). Princeton University Press. |
Changelog
- 2025-10-09: Fixed typos (thanks Josh Rountree!).