Online Learning in Iterated Prisoner's Dilemma to Mimic Human Behavior

Baihan Lin, Djallel Bouneffouf, Guillermo Cecchi · DOI

TL;DR

This paper explores how different online learning algorithms (bandits, contextual bandits, and reinforcement learning) perform in the Iterated Prisoner's Dilemma (IPD) game, both against each other and in mimicking human behavior. They find that simpler bandit algorithms without context are surprisingly effective at mimicking humans, suggesting humans might not heavily rely on immediate context in such social dilemmas.

What Problem Does This Paper Address?

The Iterated Prisoner's Dilemma (IPD) is a classic game theory scenario that models the tension between cooperation and defection in social interactions. Understanding how agents, particularly artificial intelligence agents, learn to navigate these dilemmas is crucial for developing more sophisticated AI systems that can interact effectively and ethically in complex social environments. While many studies focus on finding winning strategies, this paper aims to understand the behavioral dynamics of various online learning algorithms within the IPD framework and, importantly, to see how well these algorithms can mimic human decision-making in this context. The authors highlight a gap in research that hasn't comprehensively evaluated the full spectrum of common online learning agents (from simple bandits to full reinforcement learning) in social dilemma settings and their ability to replicate human behavior.

Methods

The paper investigates three classes of online learning algorithms:

  • Multi-Armed Bandits (MAB): These agents select actions without considering any information about the environment's state (context). Examples include Thompson Sampling (TS), Upper Confidence Bound (UCB), and epsilon-Greedy.
  • Contextual Bandits (CB): These agents make decisions conditional on the current state of the environment (context). Examples include Contextual Thompson Sampling (CTS) and LinUCB.
  • Reinforcement Learning (RL): These agents extend contextual bandits by making decisions conditional on both the current state and the potential next state. Examples include Q-Learning (QL) and SARSA.

The study employs two main experimental setups:

  1. Multi-Agent Tournament: Algorithms from the three classes (along with some handcrafted strategies like "Coop," "Defect," and "Tit-for-Tat") compete against each other in IPD tournaments (pairwise and three-agent settings). This allows for analysis of learned policies and their dynamics.
  2. Behavioral Cloning with Demonstration Rewards (BCDR): This novel setup trains algorithms to mimic human behavior using a dataset of human decisions in IPD. The goal is to assess how well each algorithm class can capture human decision-making patterns.

Datasets

The paper utilizes a dataset of human decisions from numerous experiments involving the Iterated Prisoner's Dilemma. This dataset comprises 168,386 individual decisions from subjects who played the game with real financial incentives. For the behavioral cloning task, 8,257 behavioral trajectories with sufficient historical information (up to 9 past actions) were selected, with 8,000 used for training and 257 for testing.

Key Insights and Ideas

  • Context is not always king in social dilemmas: Surprisingly, the paper's tournament results suggest that contextual bandit algorithms, which explicitly use the current situation to make decisions, perform worst in the IPD game. This implies that for this specific social dilemma, either ignoring the situation entirely or considering a broader range of past information might be more effective than focusing solely on the immediate context.
  • Simplicity can mimic humanity: In the behavioral cloning experiments, the simpler Multi-Armed Bandit algorithms (without context) were the best at fitting human data. This leads to the hypothesis that humans might not heavily consider the immediate context when playing the IPD, or at least that their decision-making process can be well-approximated by models that don't rely on it.
  • RL agents show complex dynamics: Reinforcement learning agents, while not always the best performers in the tournament, exhibit more nuanced and evolving strategies, often becoming more defective over time, especially in multi-agent settings.
  • Cooperation vs. Reward: The study found that a higher cooperation rate doesn't necessarily translate to a higher reward, suggesting a complex interplay between cooperation, defection, and payoff maximization in these social games.

Key Results

  • Tournament Performance: In the multi-agent tournaments, handcrafted agents generally performed best, followed by RL agents, then MAB agents. Contextual Bandits consistently received the lowest rewards.
  • Behavioral Cloning Accuracy: MAB algorithms (specifically UCB1 and epsilon-Greedy) demonstrated the lowest prediction error in mimicking human cooperation rates, indicating they best captured human behavior.
  • RL Agents' Behavior: RL agents tended to become more defective when facing agents from other classes (MAB or CB) than when facing other RL agents.
  • CB Agents' Behavior: CB agents were observed to be the most cooperative in the three-agent setting, but paradoxically, they often defected against "Coop" agents in pairwise games, exploiting their trust.

Limitations and Future Work

The authors acknowledge that their study focuses on a specific set of online learning algorithms and the IPD game. Future work could involve:

  • Extending to other social dilemmas: Evaluating these algorithms in more complex environments like the Fruit Gathering game or Wolfpack hunting game.
  • Comparing with predictive modeling: Benchmarking their mechanistic decision-making models against predictive modeling surrogate models.
  • Developing RL-based recommendation systems: Building systems that can model human decision-making properties for personalized recommendations.
  • Investigating other context levels: Further exploring the impact of different levels of information (no information, context without state, context with state) on algorithm performance.
  • Clinical implications: The paper strongly suggests that the findings have implications for understanding reward processing in various neurological and psychiatric disorders, opening avenues for future research in this interdisciplinary space.

Summary updated

BibTeX
@inproceedings{lin2020online,
  author = {Baihan Lin and Djallel Bouneffouf and Guillermo Cecchi},
  title = {{Online Learning in Iterated Prisoner's Dilemma to Mimic Human Behavior}},
  booktitle = {PRICAI},
  year = {2020},
  doi = {10.1007/978-3-031-20868-3\_10},
}
Figure