Will Systems of LLM Agents Cooperate: An Investigation into a Social Dilemma

Richard Willis, Yali Du, Joel Z. Leibo, Michael LuckarXiv 2025 · DOI

Introduction

As Large Language Models (LLMs) are increasingly deployed as autonomous agents, understanding their collective behavior in multi-agent environments is critical. A central concern is the "social dilemma"—situations like the Prisoner's Dilemma where individual self-interest conflicts with the group's best interest. This study investigates whether populations of LLM agents will naturally cooperate or converge toward aggressive, suboptimal equilibria.

Unlike previous research that focused on granular, round-by-round decision-making, this paper shifts the focus to strategic abstraction. By prompting models to design entire algorithmic strategies in Python, the researchers leverage Evolutionary Game Theory to predict long-term societal outcomes.

Methodology: From Prompts to Python

The researchers utilized the Iterated Prisoner’s Dilemma (IPD) as a testbed. The core of their approach involves generating strategies rather than individual actions.

Strategy Generation and Prompting

LLMs (specifically ChatGPT-4o and Claude 3.5 Sonnet) were assigned one of three attitudes: Aggressive, Cooperative, or Neutral. To explore how different communication styles affect strategy quality, three distinct prompting techniques were employed:

Description of the three prompting styles used to generate LLM strategies.

These natural language strategies were then translated into executable Python functions. This "abstraction advantage" allowed the models to implement complex logic, such as pattern recognition and threshold-based retaliation, which they often fail to grasp in turn-based play.

Simulating Evolution: The Moran Process

To observe how these strategies interact over time, the study employed a Moran process. In this evolutionary model, agents with higher payoffs (more successful strategies) are more likely to be "cloned" into the next generation, while less successful ones are replaced. This process continues until the population reaches a stable equilibrium where all individuals share the same attitude.

Key Insights and Results

The Pro-Social Bias and the Impact of Refinement

Initial findings revealed a strong "pro-social" bias in both models, likely a byproduct of Reinforcement Learning from Human Feedback (RLHF). Even when prompted to be "neutral," models tended toward cooperation.

However, the "Refine" prompting style acted as a double-edged sword. While it improved strategy logic, it significantly enhanced the effectiveness of aggressive strategies. By critiquing their own approaches, models created more ruthless agents capable of exploiting cooperative peers. In a balanced population, ChatGPT-4o using the "Refine" prompt converged to an aggressive equilibrium 19% of the time.

The Role of Environmental Noise

The introduction of "noise"—a 10% chance of an action being unintentionally flipped—drastically altered the landscape. In noisy environments, cooperation became fragile. Agents struggled to distinguish between a deliberate defection and a random error, often triggering "death spirals" of mutual retaliation. Under these conditions, the rate of aggressive convergence for ChatGPT-4o jumped to 28%.

An example of the Moran process where an aggressive strategy eventually dominates the population over multiple iterations.

Model Comparisons

The study noted distinct behavioral differences between the models. ChatGPT-4o proved to be more "competently aggressive," whereas Claude 3.5 Sonnet often produced "soft" aggressive strategies or refused to generate aggressive content in certain scenarios, making it more susceptible to exploitation by more ruthless opponents.

Conclusion and Future Directions

The research demonstrates that while LLMs possess an inherent cooperative bias, specific prompting techniques and environmental factors can easily push agent societies toward conflict. The release of the EvoLLM benchmark provides a foundation for further study into emergent agent behaviors.

Future research should expand beyond the $n=12$ population limit and explore more diverse game theoretic scenarios, such as "Stag Hunt" or "Chicken," to determine if the observed cooperative bias remains robust across different types of social dilemmas. Additionally, investigating interactions in "mixed societies" comprising different LLM architectures will be vital for real-world deployment.

Summary updated

BibTeX
@misc{willis2025will,
  author = {Richard Willis and Yali Du and Joel Z. Leibo and Michael Luck},
  title = {{Will Systems of LLM Agents Cooperate: An Investigation into a Social Dilemma}},
  year = {2025},
  eprint = {2501.16173},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.16173},
}
Figure