Multi-Agent DDPG (MADDPG)
Each agent acts alone from its own view, but training gives each critic the full scene plus all actions, which steadies learning in continuous team play.
Why Does This Exist?
Independent learners chase a moving target. When agent 1 learns, agent 2 changes too, so transition shifts under your feet. Replay turns stale, Q updates wobble, and continuous control rarely converges.
A single joint controller fixes stationarity but needs global talk at runtime, which robots and game clients cannot afford, and its action space blows up with team size. Multi-agent RL frames the problem. This page covers the CTDE fix for continuous actions: train with global context, deploy with local views only. For the PPO cousin see MAPPO. For factored team values see value decomposition.
The one idea you need first
An actor maps a local view to an action . A critic scores a global state plus actions. DDPG trains a deterministic actor by climbing the critic slope . MADDPG keeps that climb but gives each critic the joint actions.
Think of It Like This
Film room versus live game
Your basketball team studies overhead drone film. The coach sees all ten players and tells you that when your teammate set a high screen you should have cut backdoor. The note is sharp because it uses full context.
In the live game the film room is gone. You play from eye level on your local view only. You still cut at the right time because practice wired the pattern in. Training was centralized, execution is local.
Where it stops: a human coach can still shout from the sideline. In MADDPG the critic is deleted at deployment. Zero talk, full autonomy.
How It Actually Works
With agents, call the local view, the continuous action, the global state, the joint action. Agent owns actor and critic .
Conditioning on restores stationarity because does not shift when policies change. Only the action distribution shifts, which replay handles.
Critic target
Critic minimizes Bellman square error with target actors and target critic :
Rewards stay individual, so cooperative, competitive, and mixed motives all fit.
Actor climb
The actor climbs through its own critic slope only:
Peer actions enter as fixed context. You do not differentiate through them.
Worked example
Two agents, . State , views and , actions and , reward , next .
Target actions and . Target critic .
Current critic .
Critic slope and actor sensitivity .
Actor weights move up by rate times . The diagram shows , , and on the same path.
Code
This replays the critic and actor arithmetic from the worked example.
def bellman_target(r: float, gamma: float, q_next: float) -> float: """y = r + gamma * Q next.""" return r + gamma * q_next
def policy_gradient(dmu_dtheta: float, dq_da: float) -> float: """Chain rule through own action only.""" return dmu_dtheta * dq_da
if __name__ == "__main__": y1 = bellman_target(2.0, 0.90, 4.0) print(f"y1 = {y1:.2f}") # -> y1 = 5.60 delta = y1 - 5.00 print(f"delta = {delta:.2f}") # -> delta = 0.60 print(f"loss = {delta**2:.4f}") # -> loss = 0.3600 g = policy_gradient(0.80, 1.50) print(f"grad = {g:.2f}") # -> grad = 1.20Watch Out For
Critic input blows up with team size
Each critic takes all actions, so with 10 plus agents the input grows and credit assignment blurs. Symptom: sample hunger spikes and actor gradients swing wildly as team size grows.
Attend to neighbors instead of concatenating everyone, as in attention critics, or switch to factored team values in pure cooperative tasks. Do not just widen the critic and hope. The joint space is the bottleneck.
Leaking global state into the actor
It is tempting to pass or peer actions to the actor because training looks faster. Symptom: lab scores shine, deployment fails because those inputs are missing and the policy never learned a local mapping.
Keep the actor signature strictly . Test with global inputs masked before you report results. If performance collapses under masking, the actor cheated.
The Quick Version
- MADDPG trains centralized critics on global state plus joint actions but deploys actors on local views only.
- Joint conditioning restores stationarity because stays fixed while policies change.
- In the worked step target , error is , loss is , and actor gradient is .
- Each actor climbs only its own critic slope , with peer actions as fixed context.
- Individual rewards support cooperative, competitive, and mixed play, but large teams need attention or factored critics.