Introduction
In Multi-Agent Reinforcement Learning (MARL), the challenge of N-Agent Ad Hoc Teamwork (NAHT) represents a critical frontier. Unlike standard cooperative MARL where a single entity controls all agents, or traditional Ad Hoc Teamwork (AHT) where one agent joins a pre-existing team, NAHT involves controlling a subteam of varying size that must collaborate with an unknown number of uncontrolled teammates. Previous approaches, such as POAM, relied on independent learning, which often fails to capture the intricate inter-agent dynamics necessary for high-level coordination.
The MAT-NAHT Architecture
To address these limitations, researchers proposed MAT-NAHT (Multi-Agent Transformer for NAHT). This architecture treats multi-agent coordination as a sequence modeling problem, leveraging the inherent flexibility of transformers to handle varying input lengths and complex dependencies.
The framework consists of two primary components:
- Transformer History Encoder: This module processes the current observations and a historical window of the last k timesteps for all controlled agents. By encoding this history, the model can implicitly identify the strategies of uncontrolled teammates and adapt accordingly.
- Autoregressive Action Decoder: Actions are generated sequentially, where each agent's decision is conditioned on the actions of preceding agents in the sequence. This ensures tight coordination within the controlled subteam.
The model utilizes masking to remain agnostic to the total number of agents, allowing it to scale seamlessly across different team compositions.
Experimental Results
The performance of MAT-NAHT was evaluated on the StarCraft Multi-Agent Challenge (SMAC) using the 3s vs 5z task. The controlled subteam was trained alongside a diverse pool of uncontrolled teammates generated by various MARL algorithms (VDN, IPPO, MAPPO, IQL, and QMIX).
Sample Efficiency and Performance
As shown in the training curves, MAT-NAHT demonstrates superior sample efficiency, reaching peak performance in less than half the time required by the centralized baseline (Cent Obs POAM). The transformer-based approach consistently achieves higher mean returns, suggesting that centralized sequence modeling is more effective than independent learning for capturing joint agent dynamics.
Generalization and the Role of History
A key strength of MAT-NAHT is its ability to generalize to "unseen" teammates—those with behaviors not encountered during training. Ablation studies highlighted that the inclusion of observation history is vital; without it, the model's ability to distinguish between teammate types vanishes, leading to a significant drop in performance.
Conclusion
MAT-NAHT demonstrates that viewing multi-agent coordination through the lens of sequence modeling provides a powerful framework for ad hoc teamwork. By utilizing a transformer architecture with historical context and autoregressive decoding, the system achieves state-of-the-art performance and robust generalization. Future research will explore extending the temporal memory of these agents using state-space models and testing the architecture across more diverse environments.
Summary updated