Order Matters: Agent-by-agent Policy Optimization

Xihuai Wang, Zheng Tian, Ziyu Wan, Ying Wen, Jun Wang, Weinan Zhang

TL;DR

A2PO (Agent-by-agent Policy Optimization) is a new multi-agent reinforcement learning algorithm that stabilizes training by updating agents one by one rather than all at once. By introducing a novel off-policy correction method and a "semi-greedy" update order, it guarantees that every agent—and the team as a whole—improves monotonically, leading to state-of-the-art performance on complex benchmarks like StarCraft II and Google Research Football.

The "Moving Target" Problem in Multi-Agent Learning

In Multi-Agent Reinforcement Learning (MARL), we often face a "moving target" problem known as non-stationarity. Most popular algorithms (like MAPPO) update all agents' policies simultaneously. From the perspective of a single agent, the environment is constantly shifting because everyone else is changing their behavior at the same time. This makes training unstable and sample-inefficient.

Comparison of policy update schemes

While sequential update schemes (updating agents one after another) exist to combat this, they usually fall into two traps:

  1. Sample Inefficiency: Some require new data rollouts for every single agent update, which is computationally expensive.
  2. Lack of Guarantees: Others (like HAPPO) update everyone using the same data but can't theoretically guarantee that an individual agent's update won't accidentally "undo" the progress made by a teammate earlier in the sequence.

The A2PO Solution

The authors introduce Agent-by-agent Policy Optimization (A2PO), which uses three clever mechanisms to fix sequential updating while maintaining sample efficiency:

  • Preceding-agent Off-Policy Correction (PreOPC): When it’s Agent $i$'s turn to update, A2PO uses importance sampling to "correct" the data based on the changes already made by Agents $1$ through $i-1$. This ensures the advantage function remains accurate even though the "team policy" has shifted since the data was collected.
  • Semi-greedy Agent Selection Rule: Instead of updating agents in a fixed numerical order (1, 2, 3...), A2PO prioritizes agents who have the most to gain (highest absolute advantage). To prevent getting stuck in local optima, it mixes this greedy choice with a bit of randomness.
  • Adaptive Clipping Parameter: Because agents later in the sequence face more "accumulated" change from their predecessors, A2PO dynamically adjusts the PPO clipping range. Agents later in the sequence get a wider range to ensure they have enough "room" to optimize effectively.

Crucially, A2PO does all of this using a single rollout per training stage, making it just as sample-efficient as simultaneous methods but far more stable.

Key Insights and Theoretical Guarantees

  • Individual Progress Drives Team Success: The paper proves that if you can guarantee every single agent improves (monotonic improvement), the joint team policy is guaranteed to improve even more robustly.
  • The Order of Operations Matters: Updating the "most impactful" agent first acts like a block coordinate ascent, accelerating convergence.
  • Tightest Bounds: Theoretically, the authors show that A2PO provides the "tightest" monotonic improvement bound among single-rollout algorithms. In plain English: it squeezes the most possible improvement out of every batch of data.

Empirical Results

The researchers evaluated A2PO across four diverse and challenging MARL benchmarks: StarCraft II Multi-agent Challenge (SMAC), Multi-agent MuJoCo (MA-MuJoCo), Multi-agent Particle Environment (MPE), and Google Research Football (GRF).

A2PO consistently outperformed strong baselines like MAPPO, CoPPO, and HAPPO:

  • StarCraft II: Achieved nearly 100% win rates in 6 out of 9 maps, significantly beating the stability of simultaneous update methods.
  • Google Research Football: In 5v5, A2PO hit a 100% win rate. In the massive 11v11 full-game scenario, it showed superior coordination, producing significantly more assists and successful passes than any other algorithm.
  • Sample Efficiency: A2PO reached higher performance levels with fewer environment steps, proving that its theoretical "tight bounds" translate to real-world speedups.

Limitations and Future Work

While highly effective, A2PO does have limitations. Sequential updates are computationally more expensive in terms of real wall-clock time because updates cannot be fully parallelized. The authors mitigated this by grouping agents into "blocks," but it remains a trade-off.

Additionally, the "semi-greedy" rule is effective, but future work could involve learning the optimal update order or clipping parameters rather than using hand-crafted rules. Finally, while tested briefly on MPE general-sum tasks, the core theory is built for cooperative settings. Extending these guarantees to competitive or mixed-motive games remains an open challenge.

Summary updated

BibTeX
@inproceedings{wang2023order,
  author = {Xihuai Wang and Zheng Tian and Ziyu Wan and Ying Wen and Jun Wang and Weinan Zhang},
  title = {{Order Matters: Agent-by-agent Policy Optimization}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=Q-neeWNVv1},
}
Figure