Multi-Agent Learning & Game Theory
Nash equilibria, self-play and cooperation.
Two Q-learners in one world each see the other as part of a moving environment, and their learning can cycle forever where a single learner would converge. Game theory supplies the right targets, equilibria, and some of the right algorithms: Shapley's value iteration for zero-sum games, no-regret dynamics, and the population training behind superhuman poker and StarCraft agents. This lesson proves the core results and maps what is still open.
What you’ll learn
- Define Markov games and Nash, correlated and coarse correlated equilibria, and state what is known about their existence and computational complexity.
- Prove that Shapley's operator is a -contraction for zero-sum Markov games, and explain why minimax-Q inherits its convergence while Nash-Q does not.
- Show that gradient play cycles in matching pennies, and prove that the average play of no-regret learners is an approximate Nash equilibrium of a zero-sum game.
- Explain centralized training with decentralized execution, prove that monotonic value mixing makes individually greedy actions jointly greedy, and exhibit a game it cannot represent.
- Describe self-play and population methods, from fictitious play to AlphaStar and OpenAI Five, and the open problems of general-sum learning.
Solution concepts and their complexity
| Concept (normal form) | Exists? | Computing one | Reached by learning? |
|---|---|---|---|
| Nash, two-player zero-sum | yes (von Neumann, 1928) | a linear program, polynomial time | yes: time averages of no-regret play (proved below) |
| Nash, general-sum | yes, in mixed strategies (Nash, 1950) | PPAD-complete, even for two players (Daskalakis, Goldberg & Papadimitriou, 2009; Chen, Deng & Teng, 2009) | no uncoupled dynamics converge in every game (Hart & Mas-Colell, 2003) |
| Correlated equilibrium | yes (it contains Nash) | a linear program in | time averages of no-swap-regret play (Foster & Vohra, 1997; Hart & Mas-Colell, 2000) |
| Coarse correlated | yes | a linear program in | time averages of no-external-regret play |
Two drivers reach an intersection. If both go they crash ( each); if one goes it gets 1 and the other 0; if both stop, 0 each. A traffic light recommends (go, stop) or (stop, go) with probability each, and each driver sees only its own signal. Why is obeying the light a correlated equilibrium but not a Nash equilibrium?
- It is also a Nash equilibrium, since every correlated equilibrium is one
- Obeying is a best response to each signal, given what the signal reveals about the other driver, but the distribution, all mass on (go, stop) and (stop, go), is not a product of independent mixed strategies
- It is not a correlated equilibrium either: a driver told to stop should go, because going pays more
- Correlated equilibria require the drivers to talk before the game
Show the answer
B. Obeying is a best response to each signal, given what the signal reveals about the other driver, but the distribution, all mass on (go, stop) and (stop, go), is not a product of independent mixed strategies
A driver told "go" knows the other was told "stop": going pays 1, stopping 0. A driver told "stop" knows the other goes: stopping pays 0, going . So obeying is optimal. Independent mixing cannot produce perfectly anti-correlated actions, and the light does better than any Nash equilibrium that treats the drivers alike: the symmetric mixed one has each driver go with probability , crashes occasionally and pays each 0 in expectation, while the light pays each .
Zero-sum Markov games: Shapley's operator
For two players with , where player 1 maximizes, define for any the stage game at , , and the Shapley operator , where is the value of the matrix game , computed by a linear program. With one player it reduces to the Bellman optimality operator.
The value of a matrix game is 1-Lipschitz in the max norm. For mixed strategies , , because is an average of entries. Taking and then preserves the inequality, and swapping and gives
Contraction. The stage games of and differ entrywise by a discounted average of :
So at every state. By Banach's fixed-point theorem has a unique fixed point , and value iteration converges geometrically from any start:
Optimality. Fix player 1's stationary policy . Player 2 then faces an ordinary MDP, minimizing player 1's return, with Bellman optimality operator . Because is maximin in , is a fixed point of , hence the optimal value of player 2's MDP: no policy of player 2, even a history-dependent one, holds player 1 below . The symmetric argument for gives the matching upper bound.
Minimax-Q (Littman, 1994) is the sample-based version. After observing it updates , solving one small linear program per update, and it converges under the usual step-size and visitation conditions because its expected backup is a contraction (Littman & Szepesvári, 1996). The construction fails for general-sum games. Nash-Q (Hu & Wellman, 2003) replaces val by the payoff of a Nash equilibrium of each stage game, but convergence was proved only under strong conditions, for example that every stage game met during learning has a global optimum or a saddle point. No efficient algorithm is known for stationary equilibria of general-sum Markov games, and PPAD-hardness makes one unlikely.
Think first Exactly where does Shapley's argument break for a general-sum game, even with two players?
It used two properties of val: it is single-valued, and it is 1-Lipschitz. A general-sum stage game can have several Nash equilibria with different payoffs, and as moves continuously, equilibria can appear, vanish or swap, so any rule that selects "the" equilibrium payoff can jump. Without a Lipschitz backup there is no contraction, and Nash-Q's iterates can fail to converge.
Learning dynamics: cycles and no-regret
The target is an equilibrium, but learners adapt to each other, so the data each one sees depends on how the others learn. The smallest zero-sum game already shows what can go wrong.
Each player shows heads or tails; player 1 wins 1 if they match and loses 1 otherwise. If the players show heads with probabilities and , player 1's expected payoff is
The unique equilibrium is . Let each player follow the gradient of its own payoff, the infinitesimal gradient ascent analyzed by Singh, Kearns & Mansour (2000). In the coordinates , :
The squared distance to the equilibrium is conserved, so the strategies orbit forever without converging (until an orbit large enough to reach the boundary of the unit square is clipped there):
Simultaneous discrete steps of size do worse: spirals outward. Singh et al. showed that in two-player, two-action games gradient play still converges either to an equilibrium or, failing that, in average payoff to an equilibrium's payoffs. The same rotational dynamics trouble GAN training (Generative Adversarial Networks).
Use linearity in , then player 1's regret, then player 2's:
By linearity in the last minimum is , which is at most , which is at most . So the whole chain fits in a window of width :
Multiplicative weights (Hedge) over actions, with payoffs in , has average regret against any sequence of opponent strategies, so self-play with Hedge drives the averages to equilibrium at that rate. Because such algorithms exist, letting also proves von Neumann's minimax theorem, .
Outside zero-sum games the same averaging shows that the empirical distribution of joint play converges to the set of CCE under no-external-regret learning and to the set of CE under no-swap-regret learning, though day-to-day strategies need not settle. In extensive-form games of imperfect information, counterfactual regret minimization (CFR; Zinkevich et al., 2007) runs a regret minimizer at every information set, and its average strategy converges to a Nash equilibrium in two-player zero-sum games. CFR variants, with abstraction and real-time search, powered Libratus, which beat top professionals at heads-up no-limit Texas hold'em in 2017 (Brown & Sandholm, 2018), and Pluribus, which beat elite professionals at six-player no-limit hold'em, where no equilibrium guarantee applies (Brown & Sandholm, 2019).
Deep MARL: centralized critics, factored values, populations
In cooperative and mixed games with partial observability, agent must act on its own observation history , but during training, usually in simulation, everything is visible. Centralized training with decentralized execution (CTDE) exploits the asymmetry: a critic conditioned on the global state and the joint action faces stationary targets, because given all the actions, transitions and rewards no longer depend on anyone's policy.
MADDPG (Lowe et al., 2017) gives each agent a deterministic actor and a centralized critic , trained with the deterministic policy gradient (Actor–Critic & Soft Actor–Critic):
COMA (Foerster et al., 2018) attacks credit assignment in teams with a counterfactual baseline that marginalizes out only agent 's action: .
For teams with a shared reward, a joint value ranges over joint actions. Decentralized execution needs the individual–global max (IGM) property: the agents' individually greedy actions must together maximize . VDN (Sunehag et al., 2018) sums the utilities, . QMIX (Rashid et al., 2018) mixes them with a network whose weights, generated from the global state by hypernetworks, are non-negative, so that .
Take any joint action and replace its coordinates by the greedy ones, one at a time. Each replacement swaps for in one argument of , which cannot decrease . After replacements:
The converse fails: monotone mixtures of per-agent utilities cannot express every team payoff. Take two agents with actions A, B, C and shared payoff 8 for (A, A), whenever exactly one agent plays A, and 0 otherwise (Son et al., 2019). Representing it exactly would need two contradictory comparisons of agent 1's utilities, with agent 2's action held fixed:
Each implication is the contrapositive of monotonicity: if then for any fixed . In experiments with uniform exploration, VDN and QMIX learned value tables whose greedy joint action was not (A, A); QTRAN (Son et al., 2019) and QPLEX (Wang et al., 2021) enlarge the class of representable games while keeping decentralized greedy execution.
In two-player zero-sum games the opponent can be oneself, which is self-play. Fictitious play (Brown, 1951) best-responds to the opponent's empirical average strategy, and Robinson (1951) proved that its averages converge to equilibrium in zero-sum games, though slowly. Training only against the latest copy can instead chase its own tail in non-transitive games, where strategies beat each other in cycles like rock–paper–scissors. Policy-space response oracles (PSRO; Lanctot et al., 2017) generalize fictitious play: keep a population of policies, solve the empirical meta-game among them for a mixture, train a deep-RL best response to that mixture, add it to the population, and repeat. AlphaStar (Vinyals et al., 2019) trained a league of main agents and dedicated exploiter agents with prioritized fictitious self-play and reached Grandmaster level in StarCraft II with all three races. OpenAI Five (Berner et al., 2019) trained with PPO at very large scale, mostly against its current self and partly against past versions, and defeated the reigning world-champion Dota 2 team in 2019.
Key takeaways
- Markov games extend MDPs to several reward-maximizing players. The targets are equilibria (Nash CE CCE); zero-sum Nash is a linear program, general-sum Nash is PPAD-complete.
- Shapley's operator puts a matrix-game value inside a Bellman backup and is a -contraction because val is 1-Lipschitz; minimax-Q samples it, while general-sum stage games have no such backup.
- Gradient play rotates around mixed equilibria and spirals outward in discrete time, but the averages of no-regret learners form an -Nash equilibrium of a zero-sum game, the principle behind CFR and superhuman poker.
- Centralized critics make training targets stationary; monotonic mixing (QMIX) makes greedy actions decentralizable, at the cost of representing only monotone interactions.
- Fictitious play, PSRO, AlphaStar's league and OpenAI Five's self-play answer non-transitivity in practice; general-sum learning, coordination with new partners and evaluation remain open.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Which property of the matrix-game value drives the proof that Shapley's operator is a contraction?
- The value is linear in the payoff matrix
- The value changes by at most the largest entrywise change in the matrix:
- Every matrix game has a pure equilibrium
- The value of a zero-sum game is always zero
Show the answer
B. The value changes by at most the largest entrywise change in the matrix:
Combine this 1-Lipschitz property with the fact that the stage games of and differ entrywise by at most , and the contraction follows; nothing more about val is needed. A general-sum stage game has no single-valued, Lipschitz analogue of val, which is why the argument does not extend.
Players of matching pennies follow continuous-time gradient play from , , where and are their probabilities of showing heads. What happens?
- They converge to the equilibrium
- They converge to a pure strategy profile
- They orbit the equilibrium at the constant distance forever
- Player 1's strategy converges while player 2's keeps oscillating
Show the answer
C. They orbit the equilibrium at the constant distance forever
With and , the dynamics , conserve , so the strategies circle the equilibrium. Their time averages do approach it, which is the no-regret phenomenon; the strategies themselves never do.
Both players of a zero-sum game run algorithms whose average regret after rounds is at most 0.01. What can you conclude about their average strategies ?
- They form an exact Nash equilibrium
- Each is within 0.02 of a best response to the other
- Nothing, unless the last iterates also converge
- They are within 0.01 of the uniform strategy
Show the answer
B. Each is within 0.02 of a best response to the other
Freund and Schapire's argument gives : the averages form a 0.02-Nash equilibrium, even if the day-to-day strategies cycle.
What does QMIX's monotonic mixing guarantee, and what does it give up?
- It guarantees the optimal joint policy in every cooperative game
- Individually greedy actions are jointly greedy for the learned , but payoff structures in which one agent's best action depends on another's action cannot be represented
- It removes the need for any centralized information during training
- It makes the environments of independent learners stationary
Show the answer
B. Individually greedy actions are jointly greedy for the learned , but payoff structures in which one agent's best action depends on another's action cannot be represented
Monotonicity makes the joint argmax decompose, so execution is decentralized and linear in . The price is representational: in the game, agent 1's utility would have to rank A above B when agent 2 plays A and below B when agent 2 plays B, which no per-agent utility can do.
Further reading
- L. S. Shapley, "Stochastic games," Proceedings of the National Academy of Sciences (1953).
- M. L. Littman, "Markov games as a framework for multi-agent reinforcement learning," ICML (1994).
- Y. Freund & R. E. Schapire, "Adaptive game playing using multiplicative weights," Games and Economic Behavior (1999).
- T. Rashid, M. Samvelyan, C. Schroeder de Witt, G. Farquhar, J. Foerster & S. Whiteson, "QMIX: Monotonic value function factorisation for deep multi-agent reinforcement learning," ICML (2018).
- S. V. Albrecht, F. Christianos & L. Schäfer, Multi-Agent Reinforcement Learning: Foundations and Modern Approaches (MIT Press, 2024).