AATEAM: Achieving the Ad Hoc Teamwork by Employing the Attention Mechanism

Shuo Chen, Ewa Andrejczuk, Zhiguang Cao, Jie Zhang

Abstract

Ad hoc teamwork requires AI agents to collaborate with unfamiliar teammates in real-time without prior coordination or shared protocols. Traditional approaches often rely on rigid policy-switching mechanisms that struggle in complex, continuous environments. This paper introduces AATEAM (Achieving the Ad hoc Teamwork by Employing Attention Mechanism), a novel framework that utilizes attention-based recurrent neural networks to fluidly adapt to new teammate behaviors. By dynamically weighting action recommendations from an ensemble of networks trained on diverse past teammates, AATEAM achieves superior performance. Experimental results in the RoboCup 2D simulation environment demonstrate that AATEAM significantly outperforms existing state-of-the-art methods when paired with both known and completely novel teammates.

Introduction

In traditional multiagent systems, coordination is typically achieved through predefined protocols. However, the growing deployment of AI in open-world scenarios—such as search and rescue—necessitates agents capable of ad hoc teamwork: cooperating with unknown partners created by different developers without prior synchronization.

Existing solutions often assume simple, discrete environments. In complex, continuous domains, the current state-of-the-art, PLASTIC-Policy, utilizes a "hard-switching" approach: it identifies which past teammate the current partner most resembles and switches entirely to a corresponding policy. This method is often sub-optimal if the new teammate's behavior is a blend of styles or if the identification process is slow. AATEAM addresses these limitations by providing a real-time, fluid adaptation mechanism.

Methodology

AATEAM employs an ensemble of attention-based encoder-decoder networks, specifically utilizing Gated Recurrent Units (GRUs). The architecture is designed to move beyond rigid switching toward a "soft-ensemble" of behaviors.

The AATEAM architecture featuring the Encoder, Attention Module, and Decoder components.

The AATEAM Architecture

  1. Ensemble Training: A distinct attention network is trained for every known past teammate type.
  2. Context Extraction: During execution, the encoder processes a sequence of recent states. The attention mechanism dynamically weights these states to extract temporal correlations, forming a "context" of the current interaction.
  3. State Prediction as Similarity: Each network predicts both the next action and the next environmental state. AATEAM compares these predicted states to the actual observed state. A high degree of accuracy in a specific network indicates that the current teammate is behaving similarly to the past teammate that network was trained on.
  4. Soft-Ensembling: Rather than selecting a single policy, AATEAM aggregates action probabilities from all networks in the ensemble. Each network's contribution is weighted based on its state-prediction accuracy, allowing the agent to execute the action with the highest weighted probability.

Experimental Setup

Experiments were conducted in the Half Field Offense (HFO) domain of the RoboCup 2D simulation. This environment provides a high-dimensional, continuous state and action space with significant uncertainty. To evaluate ad hoc capabilities, the authors utilized externally created RoboCup agents from the 2013 competition as teammates. The training set included five distinct teammate types (aut, axiom, agent2D, gliders, yushan), while the testing set featured five completely unseen types (yunlu, utaustin, legend, ubc, warthog).

Results and Discussion

AATEAM demonstrated superior performance across both known and unknown teammate scenarios. By blending knowledge from multiple networks, the agent can fluidly shift its strategy frame-by-frame as teammate behavior evolves.

Scoring rates of AATEAM compared to PLASTIC and Baseline methods when paired with five completely unknown teammates.

As shown in Figure 6, AATEAM consistently outperformed the PLASTIC-Policy state-of-the-art and the standard baseline when paired with unseen teammates. Ablation studies further confirmed that the attention module is critical; removing it (treating all past states with equal weight) resulted in a significant increase in action loss and a decrease in coordination efficiency. This highlights that dynamic temporal attention is essential for understanding complex teammate behaviors in real-time.

Conclusion

AATEAM represents a significant step forward in ad hoc teamwork by successfully adapting NLP-inspired attention mechanisms to real-time reinforcement learning. While the approach is data-intensive, its ability to use state-prediction error as a self-supervised similarity metric allows for continuous, label-free evaluation of teammate behavior. Future work will focus on scaling AATEAM to even larger action spaces and testing its robustness against a broader variety of agent architectures.

Summary updated

BibTeX
@inproceedings{chen2020aateam,
  author = {Shuo Chen and Ewa Andrejczuk and Zhiguang Cao and Jie Zhang},
  title = {{AATEAM: Achieving the Ad Hoc Teamwork by Employing the Attention Mechanism}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i05.6196},
}
Figure