Simple Algorithm
Reinforcement Learning · Bootstrapping · 22 min

Cooperative Multi-Agent RL

Teams of learners: centralized training with decentralized execution.

A team of agents shares one reward, yet each acts on what it alone sees. That makes the problem a decentralized POMDP, provably harder than anything a single agent faces, and it brings two troubles a single learner never meets: teammates who learn make the world shift under you, and a shared reward does not say who earned it. This lesson builds the model, shows how independent learners go wrong, and develops the dominant remedy, centralized training with decentralized execution, through value factorization, centralized critics and counterfactual credit assignment, ending with what the benchmarks do and do not show.

What you’ll learn

  • Define a Dec-POMDP, and explain why optimal planning is NEXP-complete even for two agents and what that implies.
  • Explain independent learning, its non-stationarity, and the coordination pathologies of miscoordination and relative overgeneralization, using the climbing game.
  • Describe centralized training with decentralized execution and the individual–global-max condition, and test which team payoffs an additive factorization can represent.
  • Derive difference rewards, prove they are aligned with the team reward, and quantify how they sharpen each agent's learning signal as the team grows.
  • Assess the cooperative benchmarks, including what SMACv2 revealed about SMAC and what the strength of plain PPO suggests.

Teams and the Dec-POMDP

In a cooperative problem every agent receives the same reward: robots in a warehouse, traffic lights along a corridor, the units of a StarCraft army, players of the card game Hanabi. If one controller could see everything and command everyone, the team would be a single agent with a huge joint action. It cannot: each agent acts on its own observations, often with little or no communication. That restriction is the whole difficulty of cooperative multi-agent RL.

Where does the hardness come from? A single agent in a POMDP can summarize its history by a belief over states. An agent in a team cannot: what it should do depends on what its teammates have seen, and they reason about what it has seen, and so on. An optimal decentralized policy must therefore specify an action for every possible history. With ∣A∣\abs{\mathcal A} actions and ∣Ω∣\abs\Omega observations, a deterministic policy for horizon HH is a tree with (∣Ω∣H−1)/(∣Ω∣−1)(\abs\Omega^H-1)/(\abs\Omega-1) decision nodes, so each agent has ∣A∣\abs{\mathcal A} raised to that power of policies, and the team has the product.

Predict before you look

Two agents each have 2 actions and 2 possible observations, and the horizon is 4. The number of joint deterministic policies is 2k2^k. What is kk?

Show the answer

30

Each agent's policy tree has 1+2+4+8=151+2+4+8=15 decision nodes, each with 2 choices: 215=32,7682^{15}=32{,}768 policies. Two agents give 215⋅215=230≈1.07×1092^{15}\cdot2^{15}=2^{30}\approx1.07\times10^9 joint policies, and one more step of horizon roughly squares the count per agent (from 2152^{15} to 2312^{31}). This doubly exponential growth is what the NEXP-completeness result formalizes.

Independent learners and their pathologies

The simplest approach ignores the team: each agent runs single-agent RL, for instance Q-learning, on its own observations and actions, treating teammates as part of the environment. These are independent learners (IQL; Tan, 1993). They scale to any number of agents and often work, but they break the assumptions behind single-agent guarantees. From agent ii's point of view the environment is non-stationary: the transitions and rewards it experiences depend on its teammates' policies, which keep changing. A replay buffer makes this worse, since it stores experience generated by teammates who no longer exist in that form; Foerster et al. (2017) correct for it with importance weights and with fingerprints, such as the training iteration and exploration rate, added to each agent's input.

Two coordination failures recur (Matignon, Laurent & Le Fort-Piat, 2012). Miscoordination: when several joint actions are optimal, agents choosing independently can combine incompatible halves of different ones. Relative overgeneralization (Panait, Tuyls & Luke, 2008): an agent's part of the best joint action looks bad on average, because exploring teammates often pair it with a penalty, so the team drifts to joint actions whose parts are merely safe.

Agent 1 playsAgent 2: a0a_0Agent 2: a1a_1Agent 2: a2a_2
b0b_01111−30-3000
b1b_1−30-307766
b2b_2000055
The climbing game (Claus & Boutilier, 1998): a shared payoff with optimum 11 at (b0,a0)(b_0,a_0), guarded by penalties of −30-30 for half-hearted attempts. Claus and Boutilier's independent learners, and even learners that modeled each other's play, settled on the joint action worth 7.
Check your understanding

Early in learning, agent 2 explores uniformly over a0,a1,a2a_0,a_1,a_2. Which of agent 1's actions has the highest expected payoff?

  1. b0b_0, the action of the optimal joint action
  2. b1b_1
  3. b2b_2
  4. All three are equal
Show the answer

C. b2b_2

Averaging each row over agent 2's uniform play gives b0b_0: (11−30+0)/3≈−6.33(11-30+0)/3\approx-6.33, b1b_1: (−30+7+6)/3≈−5.67(-30+7+6)/3\approx-5.67, b2b_2: (0+0+5)/3≈1.67(0+0+5)/3\approx1.67. The same holds for agent 2 (columns: −6.33-6.33, −7.67-7.67, 3.673.67). Each agent learns that its safe action is best, and the optimal joint action is never tried often enough together to show its worth. That is relative overgeneralization.

Centralized training, decentralized execution

Training usually happens in a simulator, where everything is visible: the global state, every agent's observations and actions, even every agent's parameters. Only execution must be decentralized. Centralized training with decentralized execution (CTDE; Oliehoek, Spaan & Vlassis, 2008; Kraemer & Banerjee, 2016) exploits that asymmetry, in two main ways.

  • Value factorization. Learn a per-agent utility Qi(τi,ai)Q_i(\tau_i,a_i) for each agent and combine them into a team value QtotQ_{\text{tot}} trained on the shared reward; at execution each agent acts greedily on its own utility. This is value decomposition.
  • Centralized critics. Train decentralized actors πi(ai∣τi)\pi_i(a_i\mid\tau_i) with a critic that sees the global state and all actions, which keeps the critic's learning problem stationary while the actors change (COMA, MADDPG, MAPPO).

VDN (Sunehag et al., 2018) takes the sum, Qtot=∑iQi(τi,ai)Q_{\text{tot}}=\sum_iQ_i(\tau_i,a_i), which satisfies IGM because a sum is maximized by maximizing each term. QMIX (Rashid et al., 2018) mixes the utilities with a network whose weights are generated from the global state and constrained to be nonnegative, so QtotQ_{\text{tot}} is monotone in each QiQ_i and IGM still holds. The price is expressiveness. A sum cannot represent interaction: for two agents, a payoff table is a sum of per-agent terms exactly when every 2×22\times2 sub-table has zero interaction, Q(a,b)−Q(a,b′)−Q(a′,b)+Q(a′,b′)=0Q(a,b)-Q(a,b')-Q(a',b)+Q(a',b')=0. The Fixed Point lesson Value Factorization: VDN & QMIX works out what monotonic mixing can and cannot represent.

Check your understanding

Which of these two-agent team payoffs (rows: agent 1's action, columns: agent 2's) can VDN represent exactly as Q1(a1)+Q2(a2)Q_1(a_1)+Q_2(a_2)?

  1. (1001)\begin{pmatrix}1&0\\0&1\end{pmatrix}
  2. (3120)\begin{pmatrix}3&1\\2&0\end{pmatrix}
  3. (8−12−120)\begin{pmatrix}8&-12\\-12&0\end{pmatrix}
  4. (0110)\begin{pmatrix}0&1\\1&0\end{pmatrix}
Show the answer

B. (3120)\begin{pmatrix}3&1\\2&0\end{pmatrix}

Its interaction term is 3−1−2+0=03-1-2+0=0: take Q1=(1,0)Q_1=(1,0) and Q2=(2,0)Q_2=(2,0). The others have interaction 22, 3232 and −2-2: their payoffs depend on the combination of actions, which a sum cannot express. A coordination payoff like the first is exactly what teams face.

Credit assignment among teammates

A shared reward tells every agent how the team did. Agent ii's learning signal therefore contains the contributions of all its teammates, which from its point of view are noise, and the noise grows with the team. This is structural credit assignment: deciding which agent deserves credit, as opposed to which earlier action.

DerivationAligned with the team, and far less noisy
  1. Di(s,ai,a−i)−Di(s,ai′,a−i)=r(s,ai,a−i)−r(s,ai′,a−i)D_i(s,a_i,\mathbf a_{-i})-D_i(s,a_i',\mathbf a_{-i})=r(s,a_i,\mathbf a_{-i})-r(s,a_i',\mathbf a_{-i})

    Aligned. The subtracted term does not depend on aia_i, so any change of agent ii's action, with the others fixed, changes DiD_i and the team reward by exactly the same amount. An agent that improves its difference reward improves the team's:

  2. r=xi+∑j≠ixj,Var⁡(∑j≠ixj)=n−14,Di=xir=x_i+\sum_{j\ne i}x_j,\qquad\Var\Big(\sum_{j\ne i}x_j\Big)=\frac{n-1}{4},\qquad D_i=x_i

    Less noisy. Take nn agents that each work (xj=1x_j=1) or idle (xj=0x_j=0), with team reward r=∑jxjr=\sum_jx_j and default action "idle". Then Di=xiD_i=x_i exactly, while the team reward adds the teammates' choices. If each teammate works with probability 12\tfrac12, independently,

  3. The effect of agent ii's own choice is 1 whatever the team size, while the noise around it has standard deviation n−1/2\sqrt{n-1}/2. The signal-to-noise ratio of the shared reward falls like 1/n1/\sqrt n, and the number of samples needed to detect the agent's effect grows like nn.

Predict before you look

With n=100n=100 agents whose teammates each work with probability 12\tfrac12, what is the standard deviation of the teammates' contribution to agent ii's shared reward? (Agent ii's own effect is 1.)

Show the answer

4.97

99/2≈4.97\sqrt{99}/2\approx4.97. A single team reward tells agent ii almost nothing about its own action: its effect of 1 is buried in noise five times larger. The difference reward Di=xiD_i=x_i has none of that noise.

Difference rewards need the counterfactual r(s,(a−i,ci))r\big(s,(\mathbf a_{-i},c_i)\big), which a simulator or a model of the reward can supply; Tumer & Agogino (2007) used them to coordinate agents in air traffic flow management. COMA (Foerster et al., 2018) learns the counterfactual instead. Its centralized critic estimates Q(s,a)Q(s,\mathbf a), and each agent's advantage replaces the default action by an average over the agent's own policy: Ai(s,a)=Q(s,a)−∑ai′πi(ai′∣τi) Q(s,(a−i,ai′))A_i(s,\mathbf a)=Q(s,\mathbf a)-\sum_{a_i'}\pi_i(a_i'\mid\tau_i)\,Q\big(s,(\mathbf a_{-i},a_i')\big). Because the subtracted term does not depend on aia_i, it leaves the policy gradient unbiased; the proof, and its subtleties under partial observability, are in Multi-Agent Policy Gradients: COMA, MADDPG & MAPPO.

Benchmarks, and what they show

The StarCraft Multi-Agent Challenge (SMAC; Samvelyan et al., 2019) made cooperative MARL measurable: each unit of a StarCraft II army is an agent with a limited field of view, fighting the game's built-in AI. It became the standard benchmark for value factorization and centralized critics, and then revealed its limits. Ellis et al. (2023) trained open-loop policies that see only their agent ID and the time step, nothing of the battle, and found that they reach non-trivial win rates on many SMAC maps; only four (3s5z_vs_3s6z, corridor, 6h_vs_8z and 5m_vs_6m) defeated them. Many scenarios could be solved by memorizing a fixed sequence of moves. SMACv2 randomizes unit types and start positions and uses the units' true sight and attack ranges, so that policies must react to what they observe.

A second surprise came from the simplest methods. Yu et al. (2022) found that PPO with a centralized value function (MAPPO) is competitive with or better than specialized off-policy methods across particle environments, SMAC, Google Research Football and Hanabi, with modest tuning but careful implementation choices; even independent PPO, with no centralized component, did well on hard SMAC maps (Schroeder de Witt et al., 2020). Benchmarks of many algorithms under common protocols (Papoudakis et al., 2021) tell the same story as in single-agent RL (Benchmarks & Honest Evaluation): implementation details and tuning can matter as much as the algorithm.

ApproachWhat training sharesWhat each agent executesExamplesMain weakness
Independent learnersnothingits own policyIQL, IPPOnon-stationarity; relative overgeneralization
Value factorizationstate, all utilities, team rewardgreedy action on its own utilityVDN, QMIX, QPLEXrestricted class of team values
Centralized criticstate and joint action in the criticits own stochastic policyCOMA, MADDPG, MAPPOcredit is only as good as the critic
Learned communicationmessages, and gradients through thempolicy plus messagesDIAL, CommNetprotocols hard to interpret; needs a channel
Four ways to train a team. All but the first are forms of centralized training with decentralized execution; communication is taken up in Communication & Social Dilemmas.

Key takeaways

  • A Dec-POMDP gives a team one reward but each agent only its own observations; optimal finite-horizon planning is NEXP-complete for two or more agents, so provably not polynomial, because no belief state summarizes what teammates know.
  • Independent learners treat teammates as environment, which makes their world non-stationary and leads to miscoordination and relative overgeneralization: in the climbing game, exploration makes the safe action look best.
  • Centralized training with decentralized execution uses global information only during training; IGM makes individually greedy actions jointly greedy, and VDN (a sum) and QMIX (a monotone mixture) satisfy it at a cost in expressiveness.
  • Difference rewards r(s,a)−r(s,(a−i,ci))r(s,\mathbf a)-r\big(s,(\mathbf a_{-i},c_i)\big) are aligned with the team reward and strip out teammates' noise, whose standard deviation grows like n\sqrt n; COMA learns a policy-averaged version with a centralized critic.
  • SMAC's open-loop solvability and the strength of plain PPO (MAPPO, IPPO) are reminders that benchmark design, implementation and tuning shape conclusions in cooperative MARL as much as algorithms do.

Check yourself

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

Question 1

Optimal finite-horizon planning is NEXP-complete for two-agent Dec-POMDPs. What follows?

  1. It is as hard as NP-complete problems, so a polynomial algorithm would exist if P = NP
  2. No polynomial-time algorithm exists, unconditionally, because P ≠ NEXP is a theorem
  3. It becomes easy if the agents jointly observe the state (a Dec-MDP)
  4. It is no harder than a single-agent POMDP with the joint action
Show the answer

B. No polynomial-time algorithm exists, unconditionally, because P ≠ NEXP is a theorem

The time hierarchy theorem gives P⊊EXP⊆NEXP\mathrm P\subsetneq\mathrm{EXP}\subseteq\mathrm{NEXP}, so NEXP-complete problems are provably not in P, unlike NP-complete ones, whose status depends on the P versus NP question. Bernstein et al. show that the hardness persists for Dec-MDPs, and a centralized POMDP is only PSPACE-complete.

Question 2

What is relative overgeneralization?

  1. Agents overfit to their teammates' current policies
  2. Agents generalize too much across states that should be treated differently
  3. An agent's component of the optimal joint action looks worse on average than a safer action, because exploring teammates often pair it with penalties
  4. Two optimal joint actions exist and agents choose halves of different ones
Show the answer

C. An agent's component of the optimal joint action looks worse on average than a safer action, because exploring teammates often pair it with penalties

In the climbing game, b0b_0 is part of the best joint action but averages −6.33-6.33 against a uniformly exploring partner, while the safe b2b_2 averages 1.671.67. Independent learners chase the averages and settle on mediocre joint actions. The last option describes miscoordination, a different failure.

Question 3

What does the individual–global-max (IGM) condition buy a value-factorization method?

  1. It lets each agent act greedily on its own utility at execution while the joint action is greedy for QtotQ_{\text{tot}}, and it makes the maximization in the learning target cost n∣A∣n\abs{\mathcal A} evaluations instead of ∣A∣n\abs{\mathcal A}^n
  2. It guarantees that the learned team value equals the true optimal team value
  3. It removes the non-stationarity caused by teammates' learning
  4. It allows the agents to communicate during execution
Show the answer

A. It lets each agent act greedily on its own utility at execution while the joint action is greedy for QtotQ_{\text{tot}}, and it makes the maximization in the learning target cost n∣A∣n\abs{\mathcal A} evaluations instead of ∣A∣n\abs{\mathcal A}^n

IGM is a consistency condition between centralized values and decentralized greedy choices. It says nothing about whether QtotQ_{\text{tot}} is accurate: VDN and QMIX satisfy it by construction yet cannot represent many team payoffs, which is the subject of Value Factorization: VDN & QMIX.

Question 4

Why is the difference reward Di=r(s,a)−r(s,(a−i,ci))D_i=r(s,\mathbf a)-r\big(s,(\mathbf a_{-i},c_i)\big) aligned with the team reward?

  1. Because it is always smaller than the team reward
  2. Because it averages over the teammates' actions
  3. Because the subtracted term does not depend on agent ii's action, so changing aia_i changes DiD_i and the team reward by the same amount
  4. Because the default action cic_i is optimal
Show the answer

C. Because the subtracted term does not depend on agent ii's action, so changing aia_i changes DiD_i and the team reward by the same amount

With the other agents' actions fixed, DiD_i and rr differ by a quantity that aia_i cannot affect, so they rank agent ii's actions identically. What the subtraction removes is the teammates' contribution, the noise in agent ii's signal.

Question 5

What did the SMACv2 authors' open-loop experiment reveal about the original SMAC benchmark?

  1. That value factorization fails on every SMAC map
  2. That SMAC is too hard for current methods
  3. That centralized critics are unnecessary
  4. That policies conditioned only on agent ID and time step, ignoring all observations, reach non-trivial win rates on many maps, so many scenarios reward memorized move sequences
Show the answer

D. That policies conditioned only on agent ID and time step, ignoring all observations, reach non-trivial win rates on many maps, so many scenarios reward memorized move sequences

If a policy that never looks at the battle can win, the scenario does not test reacting to partial observations. Only four original maps defeated open-loop policies; SMACv2 randomizes unit types and start positions to restore the need for closed-loop play.

Go deeper

Further reading

  • D. S. Bernstein, R. Givan, N. Immerman & S. Zilberstein, "The complexity of decentralized control of Markov decision processes," Mathematics of Operations Research 27(4), 819–840 (2002).
  • C. Claus & C. Boutilier, "The dynamics of reinforcement learning in cooperative multiagent systems," Proceedings of the Fifteenth National Conference on Artificial Intelligence (AAAI), 746–752 (1998).
  • F. A. Oliehoek & C. Amato, A Concise Introduction to Decentralized POMDPs (SpringerBriefs in Intelligent Systems, Springer, 2016).
  • S. V. Albrecht, F. Christianos & L. Schäfer, Multi-Agent Reinforcement Learning: Foundations and Modern Approaches (MIT Press, 2024).