Learning to Cooperate with Humans using Generative Agents

Yancheng Liang, Daphne Chen, Abhishek Gupta, Simon Shaolei Du, Natasha Jaques

Introduction

Zero-Shot Coordination (ZSC) remains a significant challenge in Multi-Agent Reinforcement Learning (MARL). The goal is to develop AI agents capable of effective collaboration with novel human partners without prior interaction. Traditional methods often rely on training against populations of simulated agents, which frequently fail to capture the diversity and suboptimality of human behavior. This leads to a distribution shift where agents excel in AI-only environments but struggle to adapt to human teammates.

The GAMMA Framework

To address these limitations, researchers at the University of Washington introduced GAMMA (Generative Agent Modeling for Multi-agent Adaptation). Instead of training against a discrete set of static bots, GAMMA leverages a generative model to represent a continuous landscape of partner strategies.

The GAMMA framework: Stage 1 learns a generative model from trajectories; Stage 2 trains a cooperator agent using RL against partners sampled from the latent space.

The framework operates in two primary stages:

  1. Generative Modeling: A Variational Autoencoder (VAE) is trained on interaction trajectories. The encoder maps actions to a latent variable $z$ representing a specific strategy, while the decoder generates actions conditioned on $z$.
  2. Cooperator Training: The cooperator agent is trained via Reinforcement Learning against partners sampled from this continuous latent space. This allows the agent to encounter an infinite variety of interpolated strategies, better preparing it for the "messy" nature of human play.

Latent Space and Human Adaptation

A key innovation in GAMMA is Human-Adaptive (HA) Sampling. By using a small amount of human data, the researchers can identify regions in the latent space that correspond to human-like behaviors. Biasing the training distribution toward these regions ensures the cooperator is specifically tuned for human coordination.

t-SNE visualizations of the latent space z across different data sources, demonstrating how generative agents provide a continuous coverage of the strategy landscape.

As shown in the visualizations, traditional simulated populations appear as discrete clusters. In contrast, GAMMA’s generative model fills the gaps, providing a "terrain map" of behaviors that includes the interpolations humans often exhibit. This interpolation capability is a core strength, allowing agents to practice against the "in-between" behaviors that occur in real-world human interaction.

Experimental Results

The framework was evaluated in the Overcooked environment, including a new "Multi-strategy Counter" layout designed to test intent inference. In a user study with 80 participants, GAMMA-HA demonstrated significant improvements:

  • Performance: On the complex layout, GAMMA-HA achieved a score of 93.09, a 43% improvement over the best simulated baseline (64.02).
  • Human Preference: Participants rated GAMMA agents as more adaptive and less frustrating. Qualitative feedback highlighted that GAMMA agents were perceived as more consistent and deliberate compared to the erratic behavior of baseline agents.

Conclusion and Future Directions

GAMMA demonstrates that training against a continuous generative model significantly enhances an agent's ability to coordinate with humans. While currently focused on two-player scenarios with static latent styles, future work aims to scale the framework to multi-player environments and implement online inference, allowing agents to adapt to shifting human strategies in real-time.

Summary updated

BibTeX
@inproceedings{liang2024learning,
  author = {Yancheng Liang and Daphne Chen and Abhishek Gupta and Simon Shaolei Du and Natasha Jaques},
  title = {{Learning to Cooperate with Humans using Generative Agents}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=v4dXL3LsGX},
}
Figure