Learning to Coordinate with Anyone

Lei Yuan, Lihe Li, Ziqian Zhang, Feng Chen, Tianyi Zhang, Cong Guan, Yang Yu, Zhi-Hua Zhou

Abstract

While Multi-Agent Reinforcement Learning (MARL) has achieved significant success in closed environments, deploying agents in open-world scenarios remains a challenge. Agents often overfit to specific training partners, developing "private conventions" that fail when paired with unfamiliar teammates. This paper introduces Macop (Multi-agent compatible policy learning), a framework designed to enhance zero-shot coordination. By combining an adversarial evolutionary process to generate incompatible teammates with a multi-head neural architecture to prevent catastrophic forgetting, Macop enables agents to generalize across diverse cooperative tasks and partner styles.

Introduction

Most contemporary MARL research focuses on "closed" systems where agents are trained alongside a fixed set of partners. In these settings, agents can achieve high performance by co-evolving specific, often idiosyncratic, strategies. However, real-world deployment—such as autonomous vehicles interacting with human drivers or diverse AI models—requires "open" coordination.

The primary obstacle to this goal is teammate overfitting. When an agent only learns to cooperate with a specific partner, it fails to develop the robust coordination skills necessary for novel encounters. Existing approaches like self-play or population-based training (PBT) attempt to introduce diversity but often fail to cover the full spectrum of possible teammate behaviors or suffer from catastrophic forgetting, where learning to work with a new partner degrades performance with previous ones.

The Macop Framework

Macop addresses these challenges through a new formalization called the Continual Teammate Dec-POMDP. The framework is built upon two core pillars: adversarial teammate generation and a resilient multi-head architecture.

1. Incompatible Teammate Generation

Rather than simply generating a diverse population of teammates, Macop utilizes an evolutionary PBT method to specifically hunt for incompatible partners. A teammate is defined as incompatible if the current "ego-agent" (the agent under training) performs poorly when paired with them.

To ensure the population remains broad and challenging, the system optimizes for both diversity—measured via Jensen-Shannon Divergence—and difficulty. This adversarial pressure forces the ego-agent to fill gaps in its coordination repertoire by confronting the very behaviors it is least prepared to handle. The training loop continues until the system can no longer evolve a teammate that the ego-agent cannot coordinate with, suggesting the teammate policy space has been effectively covered.

2. Compatible Coordination Policy Learning

To manage the diverse strategies required for these teammates without losing previously acquired skills, Macop employs a multi-head neural architecture:

  • Shared Backbone: A common feature extractor that learns general environmental representations.
  • Dynamic Policy Heads: Separate heads are trained to handle distinct teammate styles.
  • Resilient Head Expansion: To prevent uncontrolled model growth, a new policy head is only initialized if it provides a significant performance gain over existing ones. If an existing head can already effectively coordinate with a new teammate, the system optimizes that head instead of creating a new one.

During deployment, the agent undergoes a brief "meta-testing" phase. By interacting with an unknown teammate for a few trajectories, the agent identifies which of its learned heads is most compatible with the new partner's style.

Experimental Evaluation

The researchers evaluated Macop across eight scenarios in four distinct MARL environments:

  • Level-based Foraging (LBF): Requires agents to coordinate levels to lift food items.
  • Predator-Prey (PP): Predators must capture moving prey through spatial coordination.
  • Cooperative Navigation (CN): Agents must reach landmarks while avoiding collisions.
  • StarCraft Multi-agent Challenge (SMAC): A complex micromanagement task requiring precise unit coordination.

Key Results

Macop was benchmarked against leading methods, including Fictitious Co-Play (FCP), TrajeDi, and LIPO. The results demonstrated:

  • Superior Generalization: Macop achieved a ~20% average performance improvement over the next best methods across all scenarios.
  • Effective Adversarial Training: The evolutionary process successfully generated teammates with significantly lower initial compatibility than baseline methods, providing a more rigorous training environment.
  • Minimal Forgetting: Using the Backward Transfer (BWT) metric, Macop showed significantly higher stability and less catastrophic forgetting compared to standard fine-tuning or regularization methods like EWC.

Discussion and Future Work

Macop represents a significant step toward universal coordination, yet several challenges remain. The current "meta-testing" phase requires a few warm-up trajectories, which may be impractical in high-stakes, real-time environments where immediate coordination is vital. Additionally, while resilient expansion limits growth, the number of policy heads may still scale poorly in extremely high-dimensional task spaces.

Future research directions include developing context-based recognition to identify teammate types instantly from observations and exploring the use of Large Language Models (LLMs) to reason about teammate intent, potentially accelerating the coordination process in zero-shot settings.

Summary updated

BibTeX
@inproceedings{yuan2023learning,
  author = {Lei Yuan and Lihe Li and Ziqian Zhang and Feng Chen and Tianyi Zhang and Cong Guan and Yang Yu and Zhi-Hua Zhou},
  title = {{Learning to Coordinate with Anyone}},
  booktitle = {DAI},
  year = {2023},
}
Figure