Parent: Multi-agent reinforcement learning. This page is a self-test ladder. Each problem is graded by cognitive level: L1 Recognition (can you name it?) → L2 Application (can you plug in?) → L3 Analysis (can you break it apart?) → L4 Synthesis (can you combine ideas?) → L5 Mastery (can you invent/prove?).
Every solution is hidden inside a collapsible callout — try first, then reveal. After each level there is a [!mistake] callout showing the trap most people fall into there.
Before we start, one reminder of notation so nothing here is used before it is defined:
The generalization is the Stochastic (Markov) Game: ⟨N,S,{Ai},P,{ri},γ⟩.
The ingredient whose meaning changes most is the transitionP: it now depends on the joint actiona, not a single action. Rewards ri also become per-agent. When N=1 it collapses back to an MDP.
Recall Solution L1.2
(a) Fully cooperative — shared reward, r1=r2.
(b) Fully competitive / zero-sum — r1=−r2.
(c) Mixed / general-sum — each driver is self-interested yet crashes hurt everyone.
Recall Solution L1.3
It is replaced by a Nash Equilibrium: a joint policy where no agent gains by unilaterally deviating. We can't "just maximize reward" because there is no single reward — each agent has its own Vi, and they may conflict. See Game Theory & Nash Equilibrium.
Your expected payoff for each pure move (Rock beats Scissors, loses to Paper):
E[Rock]=pS−pP,E[Paper]=pR−pS,E[Scissors]=pP−pR.
At a mixed NE you must be indifferent between your moves (else you'd shift all weight to the best one). Set them equal:
pS−pP=pR−pS=pP−pR.
With pR+pP+pS=1 the unique solution is pR=pP=pS=31.
By symmetry both players play (31,31,31) and the game value = 0 (fair game). See figure below.
Recall Solution L2.2
Start from the single-agent Deterministic Policy Gradient and apply the chain rule through the critic:
∇θiJi=E[how my action moves with my params∇θiμi(oi)how team value moves with my action∇aiQϕi(s,a)ai=μi(oi)].
Because Qi takes all actions as explicit inputs, its target is stationary — no hidden moving parts. See Policy Gradient Methods and Actor-Critic Methods.
Recall Solution L2.3
P~1(s′∣s,a1)=∑a2π2(a2∣s)P(s′∣s,a1,a2).
It is weighted by π2. As agent 2 learns, π2 changes, so P~1 changes over time — the Markov property is violated for agent 1. This is exactly why Q-Learning's convergence proof breaks in MARL.
Say early on agent 2 mostly picked action A. Agent 1's buffer fills with transitions where "picking A → reward +1", so agent 1 learns "A is good."
Now agent 2 shifts to B. The pair that pays off is now (B,B), but agent 1's buffer still says "A good" — that data was generated under an oldπ2 and is now stale/wrong. Agent 1 chases a target that no longer exists.
Fix: a centralized critic Q(s,a1,a2) conditions on both actions, so each transition is correctly explained and never becomes stale.
Recall Solution L3.2
Let each agent pick ai⋆=argmaxaiQi. Take any joint action a. Change agents one at a time toward their local maximiser. Each such change raises (or keeps equal) that agent's Qi, and since Qtot is non-decreasing in every Qi, each change cannot lower Qtot. After all N swaps we reach a⋆=(a1⋆,…,aN⋆) with Qtot(a⋆)≥Qtot(a). Hence a⋆ is the global argmax. ∎
This is what lets decentralized greedy action selection match centralized greedy.
Recall Solution L3.3
Local maximisers: a1⋆=1,a2⋆=1 (value 1 beats −2). So IGM demands the joint argmax be (1,1).
(a) Sum: values over (a1,a2) are (0,0)→−4,(0,1)→−1,(1,0)→−1,(1,1)→2. Max at (1,1) ✔ — IGM holds.
(b) Product:(0,0)→4,(0,1)→−2,(1,0)→−2,(1,1)→1. Max at (0,0)=(1,1) ✘ — IGM violated.
Cause: the product is not monotone when a Qi<0 (two negatives multiply to a large positive). That is exactly why QMIX forces non-negative mixing weights.
Centralized training: use a joint critic Qtot(s,a) so the target is stationary (all actions are explicit inputs). Kills non-stationarity.
Monotonic mixing (QMIX): enforce ∂Qtot/∂Qi≥0 so IGM holds and greedy decentralized action = centralized action.
Decentralized execution: each agent acts with πi(ai∣oi) using only local observation — deployable without a coach.
Replay hygiene: because the joint critic sees a, stored transitions are no longer stale (contrast L3.1).
Each step directly targets a failure mode we diagnosed above. See Self-Play for the competitive analogue.
Recall Solution L4.2
Let the row player play H with probability p, column player play H with probability q.
Column player's indifference (make row's payoff independent of column's move) forces the row mix so that column is indifferent; by symmetry each plays p=q=21.
Check row payoff at q=21: E=p(q⋅1+(1−q)(−1))+(1−p)(q(−1)+(1−q)1)=p(0)+(1−p)(0)=0.
NE:(21,21) for both; value = 0.
Pure NE = joint actions where neither can improve alone.
(A,A): payoff (1,1). If either deviates to B alone → mismatch → 0<1. NE.
(B,B): payoff (2,2). Deviating alone → 0<2. NE.
(A,B),(B,A): payoff 0; deviating to match gives >0. Not NE.
So there are two pure NE. (A,A) is a NE yet Pareto-dominated by (B,B). Lesson: NE only guarantees no unilateral improvement, not global optimality — agents can get stuck in a worse equilibrium. This is why coordination (and Self-Play / communication) matters.
Recall Solution L5.2
Use f(Q1,Q2)=2Q1+3Q2+5. Partials =2≥0 and =3≥0 → monotone, and it's not a plain sum.
Evaluate on the L3.3 grid (Q1,Q2∈{−2,1}):
(0,0)→2(−2)+3(−2)+5=−5
(0,1)→2(−2)+3(1)+5=4
(1,0)→2(1)+3(−2)+5=1
(1,1)→2(1)+3(1)+5=10
Max at (1,1) = the per-agent argmaxes → IGM holds ✔. Any positive weights work; monotonicity is what matters, not the exact numbers.
Recall Solution L5.3
A pure profile is one deterministic move each, e.g. (Rock, Rock) → tie, payoff 0. But the column player can switch to Paper and get +1>0 — a profitable unilateral deviation. Every pure profile has such a beating response (each move is beaten by exactly one other). Since some player can always deviate profitably, no pure NE exists. The best-response cycle Rock→Paper→Scissors→Rock never settles, so equilibrium must be mixed — recovering the (31,31,31) answer of L2.1.