MARL, Part 4: Multi-Agent Policy Gradients

On this page

Part 2 examined credit assignment and value factorization; Part 3 established when a centralized critic preserves a local actor's gradient. We now use those results to study the update itself. We derive the team gradient, identify how replay changes it, and account for teammates whose policies have already been updated.

Recap: Differentiating a product policy

With separate agent parameters and independent action draws conditional on joint history hh, the earlier factorization gives

∇θilog⁡ ⁣{∏jπj(aj∣hj;θj)}=∇θilog⁡πi(ai∣hi;θi).\nabla_{\theta_i}\log\!\left\{\prod_j\pi_j(a_j\mid h_j;\theta_j)\right\} =\nabla_{\theta_i}\log\pi_i(a_i\mid h_i;\theta_i).

Here hjh_j is agent jj's local history. Only its own policy factor depends on θi\theta_i. This identity supplies each partial gradient below; shared parameters require a sum over the affected factors instead.

1. Differentiate the joint policy

Use Part 3's finite-horizon cooperative model. There are NN agents, TT decisions, bounded shared rewards, and 0≤γ≤10\le\gamma\le1. Agent ii observes its local history Hi,tH_{i,t}, a projection of the joint history HtH_t. Conditional on Ht=hH_t=h, independent private action draws give

At∣Ht=h∼πθ,t(⋅∣h),πθ,t(a∣h)=∏i=1Nπi,θi,t(ai∣hi).\boldsymbol A_t\mid H_t=h\sim\pi_{\theta,t}(\cdot\mid h), \qquad \pi_{\theta,t}(\boldsymbol a\mid h) =\prod_{i=1}^N\pi_{i,\theta_i,t}(a_i\mid h_i).

Action, observation, state, and reward spaces are finite here. Assume positive, continuously differentiable action probabilities and separate parameter vectors θi\theta_i. The initial distribution and environment kernels do not depend on θ\theta. Writing their product as penv(τ)p_{\rm env}(\tau), the full trajectory law is

pθ(τ)=penv(τ)∏t=0T−1∏i=1Nπi,θi,t(ai,t∣hi,t).\boxed{ p_\theta(\tau)=p_{\rm env}(\tau) \prod_{t=0}^{T-1}\prod_{i=1}^N \pi_{i,\theta_i,t}(a_{i,t}\mid h_{i,t}). }

This defines PθP_\theta. Histories, actions, and rewards in every on-policy expectation below are sampled from this law. Parameters remain fixed while an episode is generated. For recurrent actors, score derivatives include the dependence through their unrolled memory updates. Set

Gt=∑k=tT−1γk−tRk+1,J(θ)=Eτ∼Pθ[G0],ψi,t=∇θilog⁡πi,θi,t(Ai,t∣Hi,t).G_t=\sum_{k=t}^{T-1}\gamma^{k-t}R_{k+1},\qquad J(\theta)=\mathbb E_{\tau\sim P_\theta}[G_0],\qquad \psi_{i,t}=\nabla_{\theta_i}\log\pi_{i,\theta_i,t}(A_{i,t}\mid H_{i,t}).

Define exact conditional values on histories of positive probability:

Qtθ(h,a)=EPθ[Gt∣Ht=h,At=a],Vtθ(h)=EA∼πθ,t(⋅∣h)[Qtθ(h,A)],Atθ(h,a)=Qtθ(h,a)−Vtθ(h).\begin{aligned} Q_t^\theta(h,\boldsymbol a) &=\mathbb E_{P_\theta}[G_t\mid H_t=h,\boldsymbol A_t=\boldsymbol a],\\ V_t^\theta(h) &=\mathbb E_{\boldsymbol A\sim\pi_{\theta,t}(\cdot\mid h)} [Q_t^\theta(h,\boldsymbol A)],\\ A_t^\theta(h,\boldsymbol a)&=Q_t^\theta(h,\boldsymbol a)-V_t^\theta(h). \end{aligned}

The multi-agent score identity

First, differentiate the finite trajectory sum. The likelihood-ratio identity and product policy give

∇θiJ=EPθ[G0∑tψi,t].\nabla_{\theta_i}J =\mathbb E_{P_\theta}\left[G_0\sum_t\psi_{i,t}\right].

Next, condition on HtH_t. Normalization of the local action distribution implies

EPθ[ψi,t∣Ht]=∑aiπi,θi,t(ai∣Hi,t)∇θilog⁡πi,θi,t(ai∣Hi,t)=∇θi1=0.\mathbb E_{P_\theta}[\psi_{i,t}\mid H_t] =\sum_{a_i}\pi_{i,\theta_i,t}(a_i\mid H_{i,t}) \nabla_{\theta_i}\log\pi_{i,\theta_i,t}(a_i\mid H_{i,t}) =\nabla_{\theta_i}1=0.

Rewards before time tt are measurable with respect to HtH_t, so their score-weighted expectations vanish. Since G0=∑k<tγkRk+1+γtGtG_0=\sum_{k<t}\gamma^kR_{k+1}+\gamma^tG_t, conditioning on (Ht,At)(H_t,\boldsymbol A_t) then yields

∇θiJ=∑tγtEPθ[ψi,tGt]=∑tγtEPθ[ψi,tQtθ(Ht,At)]=∑tγtEPθ[ψi,tAtθ(Ht,At)].\begin{aligned} \nabla_{\theta_i}J &=\sum_t\gamma^t\mathbb E_{P_\theta}[\psi_{i,t}G_t]\\ &=\sum_t\gamma^t\mathbb E_{P_\theta} [\psi_{i,t}Q_t^\theta(H_t,\boldsymbol A_t)]\\ &=\boxed{\sum_t\gamma^t\mathbb E_{P_\theta} [\psi_{i,t}A_t^\theta(H_t,\boldsymbol A_t)]}. \end{aligned}

The last equality uses the same zero-score identity to subtract Vtθ(Ht)V_t^\theta(H_t). This is an exact derivative, not a claim that a fitted critic is exact. A physical-state-only critic needs the additional sufficiency conditions discussed in Part 3.

COMA instead subtracts an agent-specific counterfactual baseline. Its cancellation uses E[ψi,t∣Ht,A−i,t]=0\mathbb E[\psi_{i,t}\mid H_t,\boldsymbol A_{-i,t}]=0: the other agents' actions do not reveal agent ii's private action draw once HtH_t is fixed. The choice changes the estimator, not the team objective.

Shared parameters change the derivative

If every policy uses the same parameter vector ϑ\vartheta, every action factor contributes:

∇ϑJ=∑tγtEPϑ[{∑i∇ϑlog⁡πi,ϑ,t(Ai,t∣Hi,t)}Atϑ(Ht,At)].\boxed{ \nabla_\vartheta J =\sum_t\gamma^t\mathbb E_{P_\vartheta} \left[\left\{\sum_i\nabla_\vartheta \log\pi_{i,\vartheta,t}(A_{i,t}\mid H_{i,t})\right\} A_t^\vartheta(H_t,\boldsymbol A_t)\right]. }

Adding the agents' score contributions is therefore necessary. Averaging them instead rescales the gradient by 1/N1/N; treating all but one shared-parameter actor as fixed changes the derivative. Sharing weights still does not share observations at deployment.

2. Deterministic actors and MADDPG

We now change the model: the trainer observes a finite Markov state, joint actions are continuous, and actors are stationary deterministic maps of fixed local features:

μθ(s)=(μ1,θ1(o1(s)),…,μN,θN(oN(s))).\boldsymbol\mu_\theta(s) =(\mu_{1,\theta_1}(o_1(s)),\ldots,\mu_{N,\theta_N}(o_N(s))).

Each oi(s)o_i(s) is a fixed local feature map. There is no unrecorded actor memory in this specialization. Let 0≤γ<10\le\gamma<1, initial law S0∼ρ0S_0\sim\rho_0, mean reward r(s,a)r(s,\boldsymbol a), and transitions S′∣s,a∼P(⋅∣s,a)S'\mid s,\boldsymbol a\sim P(\cdot\mid s,\boldsymbol a). Assume bounded rewards and continuous derivatives of r,P,μir,P,\mu_i on a neighborhood of the actions used. Parameters are separate.

Original Lowe et al. Figure 1. The red execution region contains local policies with their own observations and actions. The larger green training region includes agent-specific critics that can use joint information to train the policies. These critics are outside the execution region.
Figure 1. Centralized training with decentralized execution. Original figure from Lowe et al. (2017), Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments, Figure 1. Unlike a single shared-critic sketch, the original explicitly shows an agent-specific critic for each agent. This is an information arrangement, not a convergence guarantee. Full resolution ↗Figure excerpt for discussion; copyright remains with the authors/rightsholder.

The deterministic value satisfies

Qμ(s,a)=r(s,a)+γ∑s′P(s′∣s,a)Vμ(s′),Vμ(s)=Qμ(s,μ(s)),J(θ)=ES0∼ρ0[Vμ(S0)].\begin{aligned} Q^\mu(s,\boldsymbol a) &=r(s,\boldsymbol a)+\gamma\sum_{s'}P(s'\mid s,\boldsymbol a)V^\mu(s'),\\ V^\mu(s)&=Q^\mu(s,\boldsymbol\mu(s)),\qquad J(\theta)=\mathbb E_{S_0\sim\rho_0}[V^\mu(S_0)]. \end{aligned}

Write zi(s)=∇θiVμ(s)z_i(s)=\nabla_{\theta_i}V^\mu(s). Differentiating the Bellman equation gives

zi(s)=bi(s)+γ∑s′P(s′∣s,μ(s))zi(s′),bi(s)=Dθiμi(oi(s))⊤∇aiQμ(s,a)∣a=μ(s).\begin{aligned} z_i(s)&=b_i(s)+\gamma\sum_{s'}P(s'\mid s,\boldsymbol\mu(s))z_i(s'),\\ b_i(s)&=D_{\theta_i}\mu_i(o_i(s))^\top \left.\nabla_{a_i}Q^\mu(s,\boldsymbol a)\right|_{\boldsymbol a=\boldsymbol\mu(s)}. \end{aligned}

Here DθiμiD_{\theta_i}\mu_i is an action-by-parameter Jacobian; ∇aiQμ\nabla_{a_i}Q^\mu holds the continuation policy fixed. It already includes the derivative of the immediate reward and transition probabilities. The remaining ziz_i term differentiates future values.

Because PμP^\mu is stochastic and γ<1\gamma<1, the Neumann series converges:

zi=(I−γPμ)−1bi=∑k=0∞γk(Pμ)kbi.z_i=(I-\gamma P^\mu)^{-1}b_i =\sum_{k=0}^\infty\gamma^k(P^\mu)^k b_i.

Define the normalized discounted state occupancy

dμ(s)=(1−γ)∑t=0∞γtPρ0,P,μ(St=s).d_\mu(s)=(1-\gamma)\sum_{t=0}^\infty\gamma^t \mathbb P_{\rho_0,P,\mu}(S_t=s).

Multiplying the series by ρ0⊤\rho_0^\top establishes

∇θiJ=11−γES∼dμ[Dθiμi(oi(S))⊤∇aiQμ(S,a)∣a=μ(S)].\boxed{ \nabla_{\theta_i}J =\frac1{1-\gamma}\mathbb E_{S\sim d_\mu} \left[D_{\theta_i}\mu_i(o_i(S))^\top \left.\nabla_{a_i}Q^\mu(S,\boldsymbol a)\right|_{\boldsymbol a=\boldsymbol\mu(S)}\right]. }

This is the multi-agent deterministic gradient under the stated model, obtained by the same Bellman differentiation as Silver et al., Theorem 1. All agents' actions inside the exact critic are their current actions.

Replay changes both the state law and teammates' actions

Multi-agent deep deterministic policy gradient (MADDPG) uses replay and fitted centralized critics. Following Lowe et al., Section 4.1, let (S,A,R,S′)∼νD(S,\boldsymbol A,R,S')\sim\nu_{\mathcal D} denote a transition drawn from a fixed replay buffer. A team-critic version uses

y=R+γQw−(S′,μ−(S′)),L(w)=12EνD[(Qw(S,A)−y)2].\begin{aligned} y&=R+\gamma Q_{w^-}(S',\boldsymbol\mu^-(S')),\\ \mathcal L(w)&=\tfrac12\mathbb E_{\nu_{\mathcal D}} [(Q_w(S,\boldsymbol A)-y)^2]. \end{aligned}

Target parameters w−,μ−w^-,\mu^- are frozen during this regression; terminal transitions use zero continuation. The paper also allows different rewards and critics for different agents. Its replay-based actor update, specialized to a team reward, has direction

g~i=E(S,A)∼νD[Dθiμi(oi(S))⊤∇aiQw(S,(ai,A−i))∣ai=μi(oi(S))].\widetilde g_i= \mathbb E_{(S,\boldsymbol A)\sim\nu_{\mathcal D}} \left[D_{\theta_i}\mu_i(o_i(S))^\top \left.\nabla_{a_i}Q_w(S,(a_i,\boldsymbol A_{-i})) \right|_{a_i=\mu_i(o_i(S))}\right].

Relative to the exact gradient, this direction uses a fitted critic in place of QμQ^\mu, replay states in place of dμd_\mu, and recorded teammate actions in place of their current actions. A learning-rate rescaling cannot correct these changes. Silver et al., Equation 15 likewise treats its off-policy direction as an approximation.

For example, consider one decision with r(a1,a2)=−(a1+a2−1)2r(a_1,a_2)=-(a_1+a_2-1)^2. At current actions (0.2,0.2)(0.2,0.2),

∂a1r(0.2,0.2)=1.2,∂a1r(0.2,0.9)=−0.2.\partial_{a_1}r(0.2,0.2)=1.2, \qquad \partial_{a_1}r(0.2,0.9)=-0.2.

The recorded teammate action therefore reverses this derivative even with an exact critic. The discrepancy comes from which joint action is evaluated, not from critic estimation.

To isolate the state-law issue, let dDd_{\mathcal D} be replay's state marginal, with dD(s)>0d_{\mathcal D}(s)>0 wherever dμ(s)>0d_\mu(s)>0. An exact change of measure gives

∇θiJ=11−γES∼dD[dμ(S)dD(S)bi(S)].\nabla_{\theta_i}J =\frac1{1-\gamma}\mathbb E_{S\sim d_{\mathcal D}} \left[\frac{d_\mu(S)}{d_{\mathcal D}(S)}b_i(S)\right].

This identity still requires the exact bib_i evaluated at the agents' current actions. It does not tell us the required state-visitation ratio. Nor does it resolve missing action coverage or make an ordinary replay update an exact on-policy gradient.

3. Local clipping is not joint policy control

Return to the finite-horizon stochastic model in Section 1. Freeze an old product policy π\pi and consider a candidate πˉ\bar\pi, both positive. Choose 0<ε<10<\varepsilon<1. At fixed (t,h,a)(t,h,\boldsymbol a) define

ri,t(hi,ai)=πˉi,t(ai∣hi)πi,t(ai∣hi),rt(h,a)=∏iri,t(hi,ai).r_{i,t}(h_i,a_i)=\frac{\bar\pi_{i,t}(a_i\mid h_i)}{\pi_{i,t}(a_i\mid h_i)}, \qquad r_t(h,\boldsymbol a)=\prod_i r_{i,t}(h_i,a_i).

For any function ff of the joint action, the conditional change of measure is

EA∼πt(⋅∣h)[rt(h,A)f(A)]=∑a∏iπˉi,t(ai∣hi)f(a)=EA∼πˉt(⋅∣h)[f(A)].\begin{aligned} \mathbb E_{\boldsymbol A\sim\pi_t(\cdot\mid h)}[r_t(h,\boldsymbol A)f(\boldsymbol A)] &=\sum_{\boldsymbol a}\prod_i\bar\pi_{i,t}(a_i\mid h_i)f(\boldsymbol a)\\ &=\mathbb E_{\boldsymbol A\sim\bar\pi_t(\cdot\mid h)}[f(\boldsymbol A)]. \end{aligned}

Even if every actual local ratio were restricted to [1−ε,1+ε][1-\varepsilon,1+\varepsilon], the joint ratio would only satisfy

(1−ε)N≤rt≤(1+ε)N.(1-\varepsilon)^N\le r_t\le(1+\varepsilon)^N.

With ten agents and ε=0.2\varepsilon=0.2, this interval is approximately [0.107,6.192][0.107,6.192]. These extremes are attainable at particular joint actions: ten Bernoulli policies changing from probability 0.50.5 to 0.60.6 give ratios 1.2101.2^{10} at all ones and 0.8100.8^{10} at all zeros.

At a fixed history, KL divergence also accumulates across agents. Expanding the logarithm and summing out the other actions gives

DKL(πt(⋅∣h)∥πˉt(⋅∣h))=EA∼πt(⋅∣h)[∑ilog⁡πi,t(Ai∣hi)πˉi,t(Ai∣hi)]=∑iDKL(πi,t(⋅∣hi)∥πˉi,t(⋅∣hi)).\begin{aligned} D_{\rm KL}(\pi_t(\cdot\mid h)\Vert\bar\pi_t(\cdot\mid h)) &=\mathbb E_{\boldsymbol A\sim\pi_t(\cdot\mid h)} \left[\sum_i\log\frac{\pi_{i,t}(A_i\mid h_i)}{\bar\pi_{i,t}(A_i\mid h_i)}\right]\\ &=\sum_iD_{\rm KL}(\pi_{i,t}(\cdot\mid h_i)\Vert\bar\pi_{i,t}(\cdot\mid h_i)). \end{aligned}

PPO clipping is weaker than imposing either displayed restriction: it clips a branch of an objective, not the policy probabilities themselves.

MAPPO's local clipped objective

Let A^t\widehat A_t be a frozen team-advantage estimate from an old-policy batch. A per-agent PPO objective is

Liclip(πˉi)=∑tγtEτ∼Pπ[min⁡{ri,tA^t,clip⁡(ri,t,1−ε,1+ε)A^t}].L_i^{\rm clip}(\bar\pi_i) =\sum_t\gamma^t\mathbb E_{\tau\sim P_\pi} \left[\min\left\{r_{i,t}\widehat A_t, \operatorname{clip}(r_{i,t},1-\varepsilon,1+\varepsilon)\widehat A_t\right\}\right].

At πˉi=πi\bar\pi_i=\pi_i, with an exact advantage and separate parameters, its derivative equals agent ii's team gradient. For a finite change, it changes only one action factor while retaining the old trajectory law. Concurrently maximizing these local objectives does not make them an exact joint objective for the updated team.

Original PPO Figure 1. With positive advantage the objective rises with the probability ratio and then plateaus above one plus epsilon. With negative advantage it is flat below one minus epsilon and decreases thereafter. Red markers indicate the initial ratio one.
Figure 2. The PPO paper's clipped-surrogate figure. Original figure from Schulman et al. (2017), Proximal Policy Optimization Algorithms, Figure 1. The horizontal axis is the new-to-old action-probability ratio r. These are the authors' original objective plots, not new experimental evidence. Full resolution ↗Figure excerpt for discussion; copyright remains with the authors/rightsholder.

With A^t>0\widehat A_t>0, the clipped term is flat once ri,t>1+εr_{i,t}>1+\varepsilon. A flat objective branch supplies no hard constraint preventing a larger ratio, particularly when parameters affect many samples.

Multi-agent PPO (MAPPO) combines PPO-style local actors with centralized value inputs. Its homogeneous-agent implementations often share parameters and sum agents' clipped terms. Parameter sharing is an implementation choice, not the definition of CTDE or a requirement of every multi-agent PPO method.

One common advantage estimate is generalized advantage estimation. For a frozen history-value predictor V^t\widehat V_t, with V^T=0\widehat V_T=0 and 0≤λ≤10\le\lambda\le1,

δt=Rt+1+γV^t+1(Ht+1)−V^t(Ht),A^tGAE=∑ℓ=0T−1−t(γλ)ℓδt+ℓ.\delta_t=R_{t+1}+\gamma\widehat V_{t+1}(H_{t+1})-\widehat V_t(H_t), \qquad \widehat A_t^{\rm GAE} =\sum_{\ell=0}^{T-1-t}(\gamma\lambda)^\ell\delta_{t+\ell}.

All terms are evaluated on τ∼Pπ\tau\sim P_\pi, with the fitted predictor held fixed. The earlier GAE derivation explains the bias–variance tradeoff. A state-only predictor in a partially observed problem needs the qualifications from Part 3; the formula alone does not establish an unbiased history advantage.

Original Yu et al. Figure 7 contains five SMAC learning-curve panels: MMM2, 10m versus 11m, 8m versus 9m, 5m versus 6m, and 3s5z versus 3s6z. Win rate is plotted against training timesteps, comparing clipping widths 0.05, 0.1, 0.2, 0.3, and 0.5. Results vary by map; smaller widths often attain better final win rates than the largest widths.
Figure 3. Clipping-strength ablations in the original MAPPO study. Original figure from Yu et al. (2022), The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games, Figure 7. All five original panels and their legend are retained. The source varies the same clipping width for policy and value clipping, so this is not an isolated policy-clipping experiment. These are the authors' results, not new simulations. Full resolution ↗Figure excerpt for discussion; copyright remains with the authors/rightsholder.

These are the authors' SMAC ablations, not results produced here. The same ε\varepsilon controls both policy and value clipping, so the curves do not isolate the effect of policy clipping. They illustrate practical sensitivity, not a universal optimal ε\varepsilon or an improvement theorem.

4. Derive the performance-difference identity

To compare two complete policy updates, we need their difference in expected return rather than only a local derivative. Write Vtπ,Qtπ,AtπV_t^\pi,Q_t^\pi,A_t^\pi for the old policy's history values and set VTπ=0V_T^\pi=0. Once (Ht,At)(H_t,\boldsymbol A_t) is fixed, the environment's next-step law is the same under both policies. Consequently,

EPπˉ[Atπ(Ht,At)]=EPπˉ[Rt+1+γVt+1π(Ht+1)−Vtπ(Ht)].\mathbb E_{P_{\bar\pi}}[A_t^\pi(H_t,\boldsymbol A_t)] =\mathbb E_{P_{\bar\pi}} [R_{t+1}+\gamma V_{t+1}^\pi(H_{t+1})-V_t^\pi(H_t)].

Multiply by γt\gamma^t and sum. Adjacent value terms cancel, the terminal term is zero, and the initial history law is unchanged:

∑tγtEPπˉ[Atπ(Ht,At)]=J(πˉ)−EH0∼Pπ[V0π(H0)]=J(πˉ)−J(π).\begin{aligned} \sum_t\gamma^t\mathbb E_{P_{\bar\pi}}[A_t^\pi(H_t,\boldsymbol A_t)] &=J(\bar\pi)-\mathbb E_{H_0\sim P_\pi}[V_0^\pi(H_0)]\\ &=\boxed{J(\bar\pi)-J(\pi)}. \end{aligned}

This is an exact finite-horizon identity. The expectation uses candidate-policy histories, not old-policy histories. Since policy probabilities are positive and the environment law is common, the prefix likelihood ratio

Wt=∏k=0trk(Hk,Ak)W_t=\prod_{k=0}^t r_k(H_k,\boldsymbol A_k)

changes the old law of (Ht,At)(H_t,\boldsymbol A_t) to the new law. Therefore an equivalent expression is

J(πˉ)−J(π)=∑tγtEτ∼Pπ[WtAtπ(Ht,At)].\boxed{ J(\bar\pi)-J(\pi) =\sum_t\gamma^t\mathbb E_{\tau\sim P_\pi} [W_t A_t^\pi(H_t,\boldsymbol A_t)]. }

Using only rtr_t changes the current action distribution but still averages over histories from the old policy. This surrogate has the correct first derivative at πˉ=π\bar\pi=\pi. At that point, derivatives of the earlier ratios multiply an old-policy conditional advantage with mean zero, so those terms vanish. For a finite update, however, the surrogate need not equal the true change in performance. Trust-region methods therefore need an argument controlling policy change, not just the likelihood-ratio identity.

5. Account for earlier agents' updates

Fix a time tt, history hh, and ordering i1,…,iNi_1,\ldots,i_N. Suppress t,ht,h temporarily. For an action prefix ai1:m\boldsymbol a_{i_{1:m}}, average over the remaining old-policy actions:

Qπ,i1:m(h,ai1:m)=EAim+1:N∼∏j>mπij(⋅∣hij)[Qπ(h,ai1:m,Aim+1:N)].Q^{\pi,i_{1:m}}(h,\boldsymbol a_{i_{1:m}}) =\mathbb E_{\boldsymbol A_{i_{m+1:N}}\sim\prod_{j>m}\pi_{i_j}(\cdot\mid h_{i_j})} [Q^\pi(h,\boldsymbol a_{i_{1:m}},\boldsymbol A_{i_{m+1:N}})].

The endpoints are Qπ,i1:0=VπQ^{\pi,i_{1:0}}=V^\pi and Qπ,i1:N=QπQ^{\pi,i_{1:N}}=Q^\pi. Define an ordered incremental advantage

Bmπ(h,ai1:m)=Qπ,i1:m(h,ai1:m)−Qπ,i1:m−1(h,ai1:m−1).B_m^\pi(h,\boldsymbol a_{i_{1:m}}) =Q^{\pi,i_{1:m}}(h,\boldsymbol a_{i_{1:m}}) -Q^{\pi,i_{1:m-1}}(h,\boldsymbol a_{i_{1:m-1}}).

The letter BmB_m distinguishes this quantity from the joint advantage AπA^\pi. The differences telescope:

Aπ(h,a)=∑m=1NBmπ(h,ai1:m).\boxed{A^\pi(h,\boldsymbol a)=\sum_{m=1}^N B_m^\pi(h,\boldsymbol a_{i_{1:m}}).}

Moreover, averaging BmB_m over its last action under the old policy gives zero at every fixed prefix:

EAim∼πim(⋅∣him)[Bmπ(h,ai1:m−1,Aim)]=0.\mathbb E_{A_{i_m}\sim\pi_{i_m}(\cdot\mid h_{i_m})} [B_m^\pi(h,\boldsymbol a_{i_{1:m-1}},A_{i_m})]=0.

These are the telescoping and marginalization identities behind Kuba et al., Lemma 1. They do not assume additive utilities as in VDN or monotonic mixing as in QMIX. The history-based, finite-horizon version here applies the same algebra separately at each (t,h)(t,h).

Rewrite the incremental improvement using one joint critic

Suppose agents i1,…,im−1i_1,\ldots,i_{m-1} have already selected new policies. Freeze those policies while updating imi_m. Define

Mm(h,a)=∏j<mrij(hij,aij),M1=1,M_m(h,\boldsymbol a)=\prod_{j<m}r_{i_j}(h_{i_j},a_{i_j}), \qquad M_1=1,

and the conditional expected increment

Δm(h)=EAi1:m∼∏j≤mπˉij(⋅∣hij)[Bmπ(h,Ai1:m)].\Delta_m(h)= \mathbb E_{\boldsymbol A_{i_{1:m}}\sim\prod_{j\le m}\bar\pi_{i_j}(\cdot\mid h_{i_j})} [B_m^\pi(h,\boldsymbol A_{i_{1:m}})].

First, integrate the unupdated suffix under its old policy. Changing measure for the prefix then gives

EA∼π(⋅∣h)[MmrimQπ(h,A)]=Eπˉi1:m[Qπ,i1:m],EA∼π(⋅∣h)[MmQπ(h,A)]=Eπˉi1:m−1[Qπ,i1:m−1].\begin{aligned} \mathbb E_{\boldsymbol A\sim\pi(\cdot\mid h)}[M_m r_{i_m}Q^\pi(h,\boldsymbol A)] &=\mathbb E_{\bar\pi_{i_{1:m}}}[Q^{\pi,i_{1:m}}],\\ \mathbb E_{\boldsymbol A\sim\pi(\cdot\mid h)}[M_m Q^\pi(h,\boldsymbol A)] &=\mathbb E_{\bar\pi_{i_{1:m-1}}}[Q^{\pi,i_{1:m-1}}]. \end{aligned}

The shorthand expectations on the right use exactly the prefix laws in the definition of Δm\Delta_m, with hh fixed. Subtract the equations. The constant Vπ(h)V^\pi(h) also cancels because Eπ[Mm(rim−1)∣h]=0\mathbb E_{\pi}[M_m(r_{i_m}-1)\mid h]=0. Hence

Δm(h)=EA∼π(⋅∣h)[Mm(rim−1)Aπ(h,A)].\boxed{ \Delta_m(h)= \mathbb E_{\boldsymbol A\sim\pi(\cdot\mid h)} [M_m(r_{i_m}-1)A^\pi(h,\boldsymbol A)]. }

This is the importance-weight identity in Kuba et al., Proposition 2, with histories replacing states. It uses one joint advantage; separate fitted prefix critics are unnecessary. Dropping MmM_m would evaluate the current agent against old teammates rather than those already updated.

A sufficient improvement condition

Averaging the telescoping decomposition under the complete candidate policy gives

EA∼πˉt(⋅∣h)[Atπ(h,A)]=∑mΔm,t(h).\mathbb E_{\boldsymbol A\sim\bar\pi_t(\cdot\mid h)}[A_t^\pi(h,\boldsymbol A)] =\sum_m\Delta_{m,t}(h).

Therefore, if Δm,t(h)≥0\Delta_{m,t}(h)\ge0 for every m,tm,t and every candidate-reachable history, the performance-difference identity proves J(πˉ)≥J(π)J(\bar\pi)\ge J(\pi). This is a pointwise sufficient condition. Improving an empirical average over old histories does not establish it.

Original Kuba et al. Figure 1 shows contours of the two-agent reward a-one times a-two. From the initial mean pair minus 0.25 and 0.25, red independently chosen updates move to opposite-sign means with lower reward. Blue sequential updates account for the first updated mean and move to positive means with higher reward. Purple segments mark the original local KL trust regions.
Figure 4. Independent and sequential updates can move in different joint directions. Original figure from Kuba et al. (2022), Trust Region Policy Optimisation in Multi-Agent Reinforcement Learning, Figure 1. The original plot is excerpted without neighboring prose. Agents have independent unit-variance Gaussian actions; the plotted coordinates are their means. This illustrative trust-region example is not a benchmark result or a guarantee for every practical clipped update. Full resolution ↗Figure excerpt for discussion; copyright remains with the authors/rightsholder.

The source's one-state example shows why update order matters. Sample Ai∼N(μi,1)A_i\sim\mathcal N(\mu_i,1) independently for i=1,2i=1,2, with means fixed during sampling. Then E[A1A2]=μ1μ2\mathbb E[A_1A_2]=\mu_1\mu_2.

Start from (−0.25,0.25)(-0.25,0.25) and allow each mean to change by at most one. If both agents optimize against the other's old mean, they choose (0.75,−0.75)(0.75,-0.75) and reduce return from −0.0625-0.0625 to −0.5625-0.5625. If the first mean changes to 0.750.75 before the second agent optimizes, the new pair is (0.75,1.25)(0.75,1.25) and return is 0.93750.9375. For unit-variance Gaussians, a unit mean displacement has KL divergence 1/21/2, as in the plotted trust regions. This one-decision Gaussian example is separate from our finite-action theorem assumptions.

6. HAPPO-style sequential clipped updates

Heterogeneous-agent proximal policy optimization (HAPPO) uses the sequential correction without requiring shared actor parameters. Replace the exact advantage with a frozen estimate and use the old trajectory batch. The actor at position mm maximizes

Lmseq=∑tγtEτ∼Pπ[Mm,tmin⁡{rim,tA^t,clip⁡(rim,t,1−ε,1+ε)A^t}].\boxed{ L_m^{\rm seq} =\sum_t\gamma^t\mathbb E_{\tau\sim P_\pi} \left[M_{m,t}\min\left\{ r_{i_m,t}\widehat A_t, \operatorname{clip}(r_{i_m,t},1-\varepsilon,1+\varepsilon)\widehat A_t \right\}\right]. }

Earlier actors' ratios are fixed during this maximization. Since Mm,t>0M_{m,t}>0, multiplying outside the minimum is equivalent to multiplying both branches inside it. The constant −Mm,tA^t-M_{m,t}\widehat A_t from the incremental-improvement identity has zero derivative with respect to the current actor, so it can be omitted. This is the sequential clipped construction of HAPPO, Section 4.2.

Algorithm 1 One HAPPO-style actor-update pass with separate parameters

Input: Old local actors π\pi; an on-policy batch D∼Pπ⊗n\mathcal D\sim P_\pi^{\otimes n}; frozen estimates A^t\widehat A_t; clipping width 0<ε<10<\varepsilon<1; an ordering i1,…,iNi_1,\ldots,i_N independent of the batch.

Output: Updated local actors πˉ1,…,πˉN\bar\pi_1,\ldots,\bar\pi_N.

  1. Store old action log probabilities for every agent and decision in D\mathcal D.
  2. Initialize πˉi←πi\bar\pi_i\gets\pi_i for all agents.
  3. for m=1,…,Nm=1,\ldots,N do
  4. Compute and freeze Mm,t←∏j<mπˉij,t(Aij,t∣Hij,t)/πij,t(Aij,t∣Hij,t)M_{m,t}\gets\prod_{j<m}\bar\pi_{i_j,t}(A_{i_j,t}\mid H_{i_j,t})/\pi_{i_j,t}(A_{i_j,t}\mid H_{i_j,t}) on the batch.
  5. for each optimizer iteration for actor imi_m do
  6. Compute rim,tr_{i_m,t} relative to its stored old action probabilities.
  7. Ascend the empirical LmseqL_m^{\rm seq}, averaging the displayed weighted sum over the nn episodes; hold all other actors and A^t\widehat A_t fixed.
  8. end for
  9. Freeze the resulting πˉim\bar\pi_{i_m} before proceeding to the next agent.
  10. end for
  11. Deploy each updated actor using only its own available history.

This is a simplified actor-update pass, not the paper's complete training procedure. Critic fitting, normalization, learning-rate schedules, and fresh data collection require separate choices. Once the batch and fitted advantages are fixed, the displayed objective is a criterion to optimize on those data. It is not an unbiased estimate of the true improvement after a finite update. Sequential parameter updates also do not require agents to act sequentially at deployment.

Kuba et al.'s Theorem 2 proves monotonic improvement for their ideal policy-iteration algorithm with exact advantages, exact optimization, and a prescribed worst-state KL penalty under their assumptions. Practical HAPPO uses a clipped approximation. Neither that theorem nor the pointwise argument above automatically guarantees improvement for this finite-sample pseudocode.

7. What gradient ascent does and does not guarantee

For separate actors sharing JJ, concatenating their exact partial gradients gives g=∇θJg=\nabla_\theta J. For a step length η≥0\eta\ge0, suppose ∇J\nabla J is LL-Lipschitz along the update segment. The fundamental theorem of calculus gives

J(θ+ηg)−J(θ)=∫0η⟨∇J(θ+ug),g⟩ du≥η∥g∥2−∫0ηLu∥g∥2 du=η(1−Lη/2)∥g∥2.\begin{aligned} J(\theta+\eta g)-J(\theta) &=\int_0^\eta\langle\nabla J(\theta+ug),g\rangle\,du\\ &\ge\eta\|g\|^2-\int_0^\eta Lu\|g\|^2\,du\\ &=\eta(1-L\eta/2)\|g\|^2. \end{aligned}

Thus a sufficiently small exact joint-gradient update is an ascent step. This statement assumes a common objective, exact gradients, and a suitable step size. It does not prove global optimality, improvement for arbitrary independent surrogate maximizers, or improvement for replay-based approximate gradients.

Different rewards change the problem further. In the one-decision zero-sum game J1(x,y)=xyJ_1(x,y)=xy, J2(x,y)=−xyJ_2(x,y)=-xy, with x,y∈[−1,1]x,y\in[-1,1], simultaneous gradient flow in the interior is

x˙=y,y˙=−x,ddu(x2+y2)=2xy−2yx=0.\dot x=y,\qquad\dot y=-x,\qquad \frac{d}{du}(x^2+y^2)=2xy-2yx=0.

For any initial radius in (0,1)(0,1), the parameters cycle inside the action box instead of approaching the Nash equilibrium (0,0)(0,0). There is no shared ascent objective here. A policy-gradient formula alone is not a convergence theorem for a game.

UpdateMain derivative or surrogateWhat needs attention
COMAStochastic score times a counterfactual advantageBaseline cancellation and critic accuracy
MADDPGAction derivative through a deterministic actorReplay state law, teammate actions, and critic error
MAPPOLocal clipped ratios with centralized value estimatesJoint policy change, shared parameters, and history sufficiency
HAPPOSequential clipped ratios weighted by earlier updatesFrozen prefix ratios and the gap between ideal guarantees and practical clipping

The four MARL notes now connect the game model to the learning procedure: Part 2 assigns credit, Part 3 checks the critic's information, and this note identifies the objective and sampling distribution behind each actor update.

References

The finite-horizon history derivations, replay-action numerical example, and gradient-flow calculation are worked explanations for this note, not new experimental results. Source figures retain their original plots and attribution.