Comment on page
Beginner Experiment: Prisoner's Dilemma
In this beginner-level tutorial, you will build a simple two-player experiment from scratch, based on the classic “Prisoner’s Dilemma” game. This tutorial introduces the major building blocks of an Empirica experiment, including players, rounds, stages, and UI design.
This tutorial can be used independently or as a supplement to the Empirica workshop and tutorial (to be) filmed at the International Conference for Computational Social Science in July 2023.
Many experiments can be built up from this basic foundation with small changes to the way information is presented or the choices participants are presented with. The goal of this tutorial is to help you become more comfortable with Empirica and understand how to translate your experiments from ideas to tangible code.
For resources that can help you become a more capable developer, see:
The Prisoner's Dilemma is a classic concept in game theory that explores the tension between cooperation and self-interest. It is often used as an experimental tool in social psychology to study decision-making, trust, and cooperation.
In the standard version of the Prisoner's Dilemma, two individuals are arrested for a crime and are held in separate cells. They are both given the opportunity to cooperate with each other or betray each other by confessing to the crime. The outcomes are as follows:
- 1.If both prisoners remain silent (cooperate), they each receive a moderate sentence for a lesser charge.
- 2.If one prisoner confesses (betrays) and the other remains silent, the betrayer receives a minimal sentence, while the other prisoner receives a severe sentence.
- 3.If both prisoners confess (betray), they both receive a moderately severe sentence.
The dilemma arises because each prisoner must decide whether to trust the other person and cooperate for a potentially better outcome for both or act in their self-interest by betraying the other, which might lead to a better personal outcome if the other remains silent.
This tutorial was developed by James Houghton, Mohammad Alsobay, and Michael Li, with support from Millie Gu and others.