View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Iterated Prisoner's Dilemma

4.0 | 2 ratings Rate this file 8 Downloads (last 30 days) File Size: 9.11 KB File ID: #27611 Version: 1.0
image thumbnail

Iterated Prisoner's Dilemma



The iterated prisoner's dilemma game for multiple players and multiple submissions per player.

| Watch this File

File Information

The iterated prisoner's dilemma (IPD) game has long been studied in game theory, economics, programming, decision theory and other fields. It is a 2-player scenario where each player must decide to either 'cooperate' or 'defect' in a sequence of games, and their respective choices determine the relative success or failure of each player. Will you cooperate with your opponent or look to steal all the points for yourself?

This code runs a tournament among two or more players. Each player may submit as many "personalities" as they wish. Each personality submitted by each player plays the IPD game against all personalities submitted by all other players. Results are then plotted and outputted.

An example has already been set up in this submission among 3 example players and a number of simple sample personalties for each player. To create your own players and personalites, simply swap out the player directories and example functions. To run the example,
>> IPDshell

For more detail, specific rules and instructions for creating your own personalities,
>> help IPDshell

For more information on the prisoner's dilemma see:

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
02 Jan 2017 martina testori

I have a problem with this code.
I have a mac and when I try to compile I get an error related to the addpath function.
Do you know how to solve this problem?

Comment only
07 Apr 2016 Xin

Xin (view profile)

21 Jan 2014 Luci Tanasa

Contact us