Evaluating Collective Behaviour of Hundreds of LLM Agents

Richard Willis, Jianing Zhao, Yali Du, Joel Z. LeiboarXiv 2026

TL;DR

This paper introduces a scalable framework to evaluate how populations of hundreds of LLM agents behave in social dilemmas where individual incentives clash with group welfare. By decoupling high-level strategic planning from low-level code execution, the authors reveal that while individual models vary wildly in their cooperative tendencies, large-scale ecosystems of competing agents inevitably undergo an evolutionary "race to the bottom" toward selfish, low-welfare outcomes.

What Problem Does This Paper Address?

Large Language Models (LLMs) are increasingly deployed as autonomous AI assistants acting on behalf of human users. While we thoroughly benchmark their individual capabilities, we know very little about their collective behavior at scale. What happens when hundreds of these agents interact in social dilemmas—scenarios where individual rationality conflicts with collective welfare (such as competing for shared API rate limits or scraping data from small websites)?

Prior multi-agent LLM evaluations have been restricted to small groups because querying an LLM round-by-round across long horizons is computationally and financially prohibitive. This paper addresses this gap by introducing a method that scales to populations of hundreds of agents, allowing researchers to study the emergent "cultural evolution" of AI ecosystems.

Methods

The core innovation of the paper is a two-step strategy generation process:

  1. Natural Language Specification: The LLM is prompted once with a game's rules and given a high-level attitude—either Collective (prosocial, altruistic) or Selfish (individualistic, opportunistic). It outputs a strategic plan in plain English.
  2. Code Translation: The same LLM translates its own natural-language plan into an executable Python class conforming to a standard interface.

By running the resulting Python code directly in simulations rather than prompting the LLM at every single turn, the authors eliminate action-level parsing bugs and drastically reduce API costs.

Using this method, the authors perform three distinct analyses:

  • Behavioural Fingerprinting: Mapping out an algorithm's responses across all 5,461 possible opponent history trajectories in a 7-round game using Principal Component Analysis (PCA).
  • Self-play Robustness: Sweeping the mix of Collective vs. Selfish agents across different group sizes to observe how gracefully social welfare degrades.
  • Cultural Evolution: Simulating a population of 512 users who iteratively update their choice of LLM and prompt attitude based on which combinations achieve the highest payoffs (using the Fermi pairwise-comparison rule).

Datasets

The authors evaluate three state-of-the-art models—Claude Haiku 4.5, Gemini 3.1 Flash Lite, and GPT-5.4 Mini—across three classic game-theoretic social dilemmas:

  • Public Goods Game (PGG): Agents decide whether to invest in a pool that multiplies and redistributes rewards equally, creating an incentive to free-ride.
  • Collective Risk Dilemma (CRD): Agents must collectively contribute enough to meet a threshold and avoid a catastrophic loss, creating a coordination challenge.
  • Common Pool Resource (CPR): A dynamic game where over-extraction depletes a shared resource permanently, introducing history-dependent payoffs.

The authors generated a new benchmark dataset of 9,216 fixed strategies (512 per model-attitude pair per game) to conduct their analysis.

Key Insights and Ideas

  • Decoupling Strategy from Execution Scales: Forcing LLMs to generate code rather than step-by-step actions allows for pre-deployment behavior checking (developers can read the code before shipping it) and makes massive population simulations computationally tractable.
  • Ecosystem Scale Changes the Outcome: Group size fundamentally alters selection pressures. In small groups ($n=4$), cooperative behaviors can survive due to "group selection" (cooperative groups outperforming selfish ones). In large groups ($n=64$), this protective effect vanishes, and selfish strategies completely take over.
  • Gemini's Paradoxical Selfishness: When prompted with a "Selfish" attitude, Gemini was uniquely prone to cooperating in the very first round. This accidental "nice" opening move made its selfish strategies highly robust in self-play, as it successfully triggered reciprocal cooperation from conditional cooperators.

Key Results

  • The Race to the Bottom: Under cultural evolution in large groups ($n=64$), the population consistently converged to Selfish-dominated equilibria across all three games. In the Public Goods Game, this caused welfare efficiency to collapse to a mere 4%.
  • Distinct Model Fingerprints: PCA visualization revealed that models interpret high-level instructions quite differently. As seen in Figure 1, Gemini's "Collective" centroids sit consistently to the left of Claude's and GPT's, indicating that Gemini generates systematically less cooperative strategies even when told to be prosocial.
Figure 1: First two principal components of the shared PCA over all model–attitude–game strategies, with cluster centroids and reference strategies overlaid. PC1 appears to track cooperation rate, with always defect (A-D) and always cooperate (A-C) anchoring the extremes; Gemini’s Collective centroids sit consistently left of Claude’s and GPT’s, indicating less cooperative Collective strategies across all three games.
  • Threshold Over-Cooperation: In the Collective Risk Dilemma, Collective agents frequently over-contributed, paying unnecessary individual costs even after the safety threshold was met. This made them highly vulnerable to exploitation by Selfish mutants during evolutionary cycles.

Limitations and Future Work

  • Binary Action Spaces: The framework relies entirely on binary choices (Cooperate vs. Defect). Real-world AI assistants will operate in continuous action spaces with far more nuance.
  • No Direct Communication: Agents in these games are anonymous and cannot negotiate. Introducing communication channels could fundamentally alter the evolutionary dynamics and potentially rescue cooperation in larger groups.
  • Static Code: Strategies are fixed at generation time. Future work should explore adaptive agents that can revise their underlying algorithmic logic during the course of a game or evolutionary cycle.

Summary updated

BibTeX
@misc{willis2026evaluating,
  author = {Richard Willis and Jianing Zhao and Yali Du and Joel Z. Leibo},
  title = {{Evaluating Collective Behaviour of Hundreds of LLM Agents}},
  year = {2026},
  eprint = {2602.16662},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.16662},
}
Figure