TL;DR
Several agents often have to act together in one shared environment, and each sees only part of it. Centralized training with decentralized execution is a recipe for learning such teams. During training, the learner may use information that is not available later, such as what every other agent saw and did. After training, each agent acts using only its own observations. The shared information makes learning easier, and the independent behaviour makes the final team practical to run.
Builds on: Markov Game, partial observability, Actor-Critic Methods · Leads to: MADDPG, COMA, QMIX
Where it's used
Teams of game characters and units. The StarCraft II micromanagement benchmark asks a group of units to fight together, each one moving and attacking from its own view of the battle. COMA and QMIX were both tested on this kind of task. A unit only sees its neighbourhood, but the training algorithm can look at the whole battlefield to judge how good a joint move was.
Simulated robot teams. The MADDPG paper tests cooperative tasks in which agents must talk to each other and reach targets in a two-dimensional world. Each agent's policy reads only its own observation, and the learning algorithm uses a critic that sees every agent's action.
Fleets that cannot share a live controller. Picture a group of delivery robots in one warehouse, or several drones over a field. Sending every observation to one central computer at each step can be slow or unreliable. A design that trains together but runs separately lets each robot decide on its own, using the observations it already has.
How it works
Take a tiny team of two agents. Each agent picks one of two actions, L or R. The team gets reward 1 when both pick the same action and reward 0 otherwise. Each agent's policy is a coin flip, so each picks L half the time and R half the time.
- Each agent sees its own observation. Agent 1 knows only its own view, and agent 2 knows only its own view. Neither can see the other's choice before acting.
- Each actor picks an action from its own policy. Agent 1 picks L. Agent 2 picks L. The team's joint action is (L, L). Check: each actor used only its own observation to choose.
- The environment returns one team reward. Both chose L, so the reward is 1. Check: the reward is shared, so neither agent gets credit alone.
- A central critic scores the joint action. During training, the critic receives the state and the joint action (L, L). It has a table of values for all four joint actions, and it says (L, L) is worth 1. Check: a critic that could only see agent 1's action would have no way to tell (L, L) from (L, R).
- The critic's surprise becomes a training signal. The critic compares what happened with what it expected. That difference, the TD error, is sent to every actor.
- Each actor adjusts its own policy. Agent 1 nudges its probability of L up or down using the TD error and its own action. Agent 2 does the same with its own action. Check: each actor's update uses only its own action probabilities, so the actors stay independent.
- After training, the critic is thrown away. At run time, agent 1 acts on its own observation and agent 2 acts on its own observation. Nothing in the running system sees the joint action. Check: the team still works, because each actor learned how its choice fits the team.
flowchart LR
subgraph Training
O1[Agent 1 observation] --> A1[Actor 1]
O2[Agent 2 observation] --> A2[Actor 2]
A1 -->|joint action| C[Central critic]
A2 -->|joint action| C
S[Global state] --> C
C -->|TD error| A1
C -->|TD error| A2
end
subgraph Execution
P1[Agent 1 observation] --> B1[Actor 1 alone]
P2[Agent 2 observation] --> B2[Actor 2 alone]
end
The math
Step 1 in symbols: decentralized policies
Agent has its own policy . It takes an observation and returns a probability for each of its actions . The joint policy of the team is the product of the individual policies:
At execution time this product is never needed as a single object. Each agent samples its own action from its own factor.
Step 4 in symbols: the central critic
The critic is a function that takes a global description of the situation, which may combine all observations, and the full joint action. The value it returns is the expected discounted return if every agent acts as it does now. It uses information that no single actor has. This is the critic, with its input widened from one agent's view to the whole team.
Step 5 in symbols: the TD error
The team reward and the next global state give the one-step error
The expectation over next actions uses the current policies. This is the same error that temporal-difference learning produces for a single agent. The only change is that the state-action pair now includes every agent's action.
Step 6 in symbols: the actor update
Each actor follows a policy-gradient step, weighted by the same error. For a stochastic actor,
The gradient is taken with respect to agent 's own parameters, and the only actions it uses are the agent's own sampled action and the observation . This is the update. The difference from a single-agent actor is only in where the error comes from.
Step 2 in symbols: why the joint action helps
In the tiny example, suppose the central critic is , , , , with the first symbol for agent 1 and the second for agent 2. If agent 2 is still a coin flip, a critic that depends only on agent 1's action gives
Both actions look equally good, so agent 1 learns nothing. A central critic sees agent 2's action as well, and it can compute the advantage of (L, L) directly:
The centralized information separates the two choices, and the decentralized actor can use that separation.
Worked examples
Use the setup from "How it works": two agents, each chooses L or R, joint reward 1 when the choices match and 0 otherwise.
- Agent 1 chooses L and agent 2 chooses L. The reward is 1.
- The central critic's table says .
- Agent 1's expectation over agent 2's coin flip is .
- The advantage of L for agent 1 is , which is positive. Agent 1 should choose L more often when agent 2 chooses L.
- By symmetry, agent 2 gets the same positive advantage for L.
Interpretation: both agents learn to match, and no agent needs to see the other's action at run time.
Two agents take a joint action in a state where the central critic currently estimates for that joint action. The team reward is , the discount is , and the expected critic value of the next state, averaged over the next joint actions, is .
- Target value: .
- TD error: .
- Agent 1 chose L with probability . The update for agent 1 increases its probability of L, because is positive.
- Agent 2 chose R with probability . Its update also increases the probability of R, because the same positive rewards the joint action that just happened.
- Each actor uses only its own action and its own probability, but the sign and size of the update come from the shared error.
Interpretation: the critic does the team-level judging, and each actor turns that judgement into a change to its own policy.
A squad of five units in a game has four possible moves each. Each unit sees only its neighbourhood.
- The number of joint actions is .
- .
- .
- .
- .
- A central critic that tabulates every joint action has 1024 entries for each state. Each unit's own policy has only 4 entries.
- The critic can therefore be large while the actors stay small, which is why the critic is used only during training.
Interpretation: the team's combined action space grows very fast with the number of agents. Training can afford a large critic, but running the team should use only the small per-agent policies.
Try it: a team of six agents has three actions each. How many joint actions are there? Answer: . Work it as , , , , .
Common mistakes and tradeoffs
It is tempting to think that the central critic must also run at execution time. In fact it does not, because the actors were trained to act without it. The critic exists only to produce the training signal. Keeping it at run time would bring back the need for every observation to reach one place, which is the thing the method was built to avoid.
It is tempting to think that "decentralized" means the agents cannot talk. In fact the method is about what information the training uses and what information the running agents use. If communication is part of an agent's observation, the agent may use it at execution time. What is excluded is information that is only available during training, such as the hidden state of other agents.
It is tempting to think that a central critic is one controller for everyone. In fact the design varies. MADDPG gives each agent its own centralized critic, which lets agents with different rewards, including competitive ones, use the method. COMA uses one critic for the whole team and adds a counterfactual baseline. QMIX takes a different route and factors the team's value into per-agent values that are combined.
When to use it: the agents share a goal or partly share one, the team must act without a live controller, and training happens in a simulator where the full state is available.
When not to use it: a single controller can see everything and can act for the whole team, so there is no need to split the work. Also avoid it when the joint action space is so large that even the training critic cannot be learned from the data you have.
Alternatives: fully independent learners, which are simpler but suffer from the matching problem above, and fully centralized control, which needs a single controller at run time.
History
Single-agent reinforcement learning matured first. When researchers moved to several learning agents, a basic problem appeared. Learning Q-functions over joint actions does not scale, and a Q-function over one agent's action cannot see what the others are doing.
In 2017, two groups published closely related answers in the same period. Lowe and colleagues proposed extending actor-critic policy gradients with a critic that sees the other agents' observations and actions. Foerster and colleagues proposed a policy-gradient method with a centralized critic and a counterfactual baseline, and tested it on a StarCraft micromanagement task.
In 2018, QMIX showed another way to use the same framework: learn per-agent values that combine into a team value, in a form that keeps the greedy choice of each agent consistent with the team's best choice. The idea caught on because it gives a clear recipe. Train with everything you can see, run with only what each agent sees.
Recap
- Several agents act in one environment, and each sees only part of it.
- During training, a central critic uses the global state and the joint action to score the team's behaviour.
- The critic's TD error is sent to every actor, and each actor updates its own policy with its own action.
- At execution time, the critic is discarded and each agent acts on its own observation.
- Methods built on this recipe include MADDPG, COMA and QMIX.
Read next: MADDPG for the centralized-critic actor design, COMA for the counterfactual baseline, and QMIX for value factorisation.
Check yourself
QuestionIn one sentence, what information is allowed during training but not during execution?Show answer
QuestionIn the two-agent matching game, a critic that sees only agent 1's action gives both L and R the value 1/2. Why does this block learning?Show answer
QuestionA critic has r = 2, gamma = 0.5, v(s) = 1 and v(s') = 2. What is the TD error?Show answer
QuestionA team of four agents has five actions each. A colleague proposes a centralized critic that tabulates every joint action, and then wants to run the same critic at deployment to coordinate the team. What is wrong with this plan?Show answer
Sources
- Lowe et al., Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments, arXiv:1706.02275, https://arxiv.org/abs/1706.02275
- Foerster et al., Counterfactual Multi-Agent Policy Gradients, arXiv:1705.08926, https://arxiv.org/abs/1705.08926
- Rashid et al., QMIX: Monotonic Value Function Factorisation for Deep Multi-Agent Reinforcement Learning, arXiv:1803.11485, https://arxiv.org/abs/1803.11485
- Sutton and Barto, Reinforcement Learning: An Introduction, 2nd edition, http://incompleteideas.net/book/the-book-2nd.html