IPDToolkit: An R package for simulation and Bayesian analysis of iterated prisoner’s dilemma game-play under third-party arbitration

This is a Preprint and has not been peer reviewed. This is version 1 of this Preprint.

Add a Comment

You must log in to post a comment.


There are no comments or no comments have been made public for this article.


Download Preprint


Cody Ross, Thomas Fikes, Hillary Lenfesty, Richard McElreath


Recently, researchers have begun studying the role that third-party arbitration may play in the evolution of cooperation. Using the iterated prisoner’s dilemma (IPD), they show that arbitration can mitigate the negative effects of perception errors on the stability of cooperative strategies. Open questions, both theoretical and empirical, however, remain. To promote research on the role of third-party arbitration, we introduce an R package, IPDToolkit, which facilitates both simulation of synthetic data and Bayesian analysis of empirical data. To address theoretical questions, IPDToolkit provides a Monte Carlo simulation engine that can be used to generate play between arbitrary strategies in the IPD with arbitration and assess expected pay-offs. To address empirical questions, IPDToolkit provides customizable,
Bayesian finite-mixture models that can be used to identify the strategies responsible for generating empirical gameplay data. We present a complete workflow using IPDToolkit to teach end-users its functionality.




Anthropology, Political Science, Psychology, Social and Behavioral Sciences



Published: 2024-06-03 17:49


CC BY Attribution 4.0 International

Additional Metadata