Abstract
The behavior of Large Language Models (LLMs) as artificial social agents is largely unexplored, and we still lack extensive evidence of how these agents react to simple social stimuli. Testing the behavior of AI agents in classic Game Theory experiments provides a promising theoretical framework for evaluating the norms and values of these agents in archetypal social situations. In this work, we investigate the cooperative behavior of three LLMs (Llama2, Llama3, and GPT3. 5) when playing the Iterated Prisoner's Dilemma against random adversaries displaying various levels of hostility. We introduce a systematic methodology to evaluate an LLM's comprehension of the game rules and its capability to parse historical gameplay logs for decision-making. We conducted simulations of games lasting for 100 rounds and analyzed the LLMs' decisions in terms of dimensions defined in the behavioral economics literature. We find that all models tend not to initiate defection but act cautiously, favoring cooperation over defection only when the opponent's defection rate is low. Overall, LLMs behave at least as cooperatively as the typical human player, although our results indicate some substantial differences among models. In particular, Llama2 and GPT3. 5 are more cooperative than humans, and especially forgiving and non-retaliatory for opponent defection rates below 30%. More similar to humans, Llama3 exhibits consistently uncooperative and exploitative behavior unless the opponent always cooperates. Our systematic approach to the study of LLMs in game theoretical scenarios is a step towards using these simulations to inform practices of LLM auditing and alignment.
| Original language | English |
|---|---|
| Title of host publication | Proceedings of the International AAAI Conference on Web and Social Media |
| Number of pages | 14 |
| Volume | 19 |
| Publisher | AAAI Press |
| Publication date | 7 Jun 2025 |
| Pages | 522-535 |
| DOIs | |
| Publication status | Published - 7 Jun 2025 |
| Event | International AAAI Conference on Web and Social Media - Copenhagen, Denmark Duration: 23 Jun 2025 → 26 Jun 2025 Conference number: 19 https://ojs.aaai.org/index.php/ICWSM/index |
Conference
| Conference | International AAAI Conference on Web and Social Media |
|---|---|
| Number | 19 |
| Country/Territory | Denmark |
| City | Copenhagen |
| Period | 23/06/2025 → 26/06/2025 |
| Internet address |
Keywords
- Large Language Models
- Iterated Prisoner's Dilemma
- Cooperation
- Game Theory
- Behavioral Economics
Fingerprint
Dive into the research topics of 'Nicer Than Humans: How Do Large Language Models Behave in the Prisoner's Dilemma?'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver