This site aims to be a comprehensive repository of informations on the Iterated Prisoner's Dilemma, and furthermore on the representation, study and knowledge of cooperation (and evolution of cooperation) between agents.

Stuff presented here has been collected by the SMAC team, which belong to the LIFL, as part of a project called PRISON. The goal of the project being the use of computer science tools in order to collect informations on the way cooperation between autonomous agents could arise and be maintaned.

On this site you will find a presentation of the Classical Iterated Prisoner's Dilemma (CIPD), SMAC published papers as well as a bibliography about the prisoner's dilemma, simulation softwares, available for downloading as well as for online testing, and some links of close interest.

Keywords: (Iterated) Prisoner's Dilemma, Cooperation, Artificial Life, Evolution, Game Theory, Multi-Agents Systems



We completely disagree with the way prisoner's dilemma competition at CEC'2004 has been done as well as the way it will be done at CIG'05. You can read and sign our statement on this competition and the dissemination of results some participant try to attribute themself from the results of this competition.
A prisoner's dilemma competition is organized at CEC'2000 . We encourage you to participate !
Added the sources of the classes of jprison in the distributions..
Added the jprison package.
Added the first three applets using jprison.
Added the description of basic strategies.
The site is open on the new adress.
The preliminary applet versions are available.

[Back to contents]

The Classical Iterated Prisoner's Dilemma

A formal model for cooperation

Let two artificial rational agents have the choice between two moves:

They play one against the other, in a synchronous manner, so that they do not know what the other will play. They get a score according to the situation of the move:

The classical choice of value for payoff is (row player payoff are given first):

Cooperate R = 3
R = 3
S = 0
T = 5
Defect T = 5
S = 0
P = 1
P = 1

To have a dilemma, temptation must pay more than cooperation, which must pay more than punishment, which must be better than to be the sucker. This is formalised by:

T > R > P > S

Since the one-shot version of the Prisoner's Dilemma is not very interesting (the most rational choice is to defect), the game is repeated an unknown number of times.
The game is said iterated.
The final score of a payer is the sum of all its moves score.
Since none player knows when the game will be ended, it is possible to study each agent's strategy, to look, for instance, how each player tries to put cooperation in the game.

In order to favour cooperation, i.e. common interest at the expens of selfish interest, this inequation is respected:

2 R > T + S

With this restriction, strategies have no advantage in alternatively cooperate and defect. To study the behavior of strategies, two kinds of computation can be done.

[Back to contents]

Some strategies

Here is a description of some of the basic strategies used in our simulations as well as in the literature:
Always cooperates. [c]*
Always defects. [d]*
The tit_for_tat strategy was introduced by Anatole Rapoport. It begins to cooperate, and then play what its opponent played in the last move.
It cooperates until the opponent has defected, after that move it always defects.
Plays opponent's majority move, if equal then cooperates. First move is considered to be equality.
Plays periodically : [d,d,c]*
Plays periodically : [c,c,d]*
Defects, then plays opponent's move.
Plays periodically [c,d].
The win-stay/lose-shift strategy was introduced by Martin Nowak and Karl Sigmund. It cooperates if and only if both players opted for the same choice in the previous move.
Cooperates except if opponent has defected two consecutive times.
Cooperates except if opponent has defected at least one time in the two previous move.
Plays [c,c], then if opponent plays two consecutive time the same move plays its move.
Plays opponent's majority move, if equal then defects. First move is considered to be equality.
Cooperates with probability 1/2.

[Back to contents]

The SMAC team

As for today our team is composed by people working in the SMAC team of the LIFL:

Other peoples are, or has been, involved in the development of our works:

[Back to contents]


SMAC published papers

Here are an extensive list of the papers written, and published by members of the team. They mainly present our ideas and results about the cooperation through the IPD model.

English papers

French papers

[Back to contents]


SMAC's bibliography

An automatically generated complete bibliography of all papers or books we have is available here.

Axelrod's bibliography

An annotated bibliography on the Evolution of Cooperation has been set up by Robert Axelrod and Lisa D'Ambrosio, and is available here.
The original file is at

[Back to contents]


Playing online

You can try to learn the model a little bit more deeply by trying some of our online applets.

In order to may be able to run it you have to ensure your browser is able to run JAVA program constructed with the JDK 1.1.*, and is able to render AWT objects
For instance Netscape browser are able of that only since release 4.06, so that our applets will not work only with previous releases.

At that time you may try three applets :

  1. The first one enables you to try simple meeting of two strategies playing to the Classical Iterated Prisoner's Dilemma, in order to understand the way strategies acts. Click here to try it.
  2. The second one enables you to test strategies, playing to the Classical Iterated Prisoner's Dilemma, with tournaments, or championship, so that you can appreciate the basic way of evaluating a particuliar strategy. Click here to try it.
  3. The third one enables you to test the evolution of population of agents playing any two by two game you may imagine and define through the payoff matrix. You may choose the size of each population, view tournament results as well as a graphical results of the population evolution. Click here to try it.

[Back to contents]

Others products

We have produced a lot of simulation software, since the beginning of our studies of the dilemma.

Here is the description of each of those software projects:
  1. This project aims to define a user friendly way of working on the Iterated Prisoner's Dilemma. The purpose is to allow all kind of people to make simulations on cooperation and evolution of cooperation. Strategies can be choosen in a predefined set, set-up by customizing generic frame. This tool is perfect for non specialist, and thus for lecture on the IPD or other two player games (Game Theory meaning) project.
  2. You can exclusively use it on Windows (3.x, 95 or NT). The program is written in Visual Basic 3.0 and is thus not as fast as the PRISON project.
  3. All operations are made graphically with the mouse (screenshot).
  4. Download (315kb):
  1. This project aims to define an optimized, powerful and efficient way, to make big experimentations, as we do, on the Iterated Prisoner's Dilemma. It is written entirely in ANSI C. It allows you to write any possible strategy using the expression power of the C language. Use it only if you make big experimentations or if you need speed or special strategies.
  2. You can use it on any platform with an ANSI-C compiler, needed to modify, or create new strategies. If you want to see graphics interpretations of your results you will need to have GNUPLOT installed on your system, with which it is interfaced, otherwise you will have to treat yourself the results which are stored in data text file.
  3. All operations are made in text and command line mode, but on UNIX platforms, using X/Window and the Xview toolkit, you can use a graphical interface called xprison (screenshot). Read the README file before downloading any archives.
  4. Download it:
  1. The goal of this project is to offer JAVA classes which could be used to easily create Iterated Prisoner's Dilemma simulations. It is clearly devoted to people with some JAVA programming skills, but are simple enough for beginners to use. All kind of strategies may be user implemented. The simulations are open to all two by two games, i.e. with a different payoff matrix than the one of the IPD. This tool is perfect for programming lecture, as well as for people wanted to design their own simulations. It is a library not a program.
  2. You can use it on any platform with a Java Virtual Machine available. The classes are entirely written in JAVA, and have been tested with the Sun JDK 1.1.x, with x > 5. The power of the simulations created are tributed to the power of the Java Virtual Machine used.
  3. Some examples applets are distributed with the archive and are available on this site in the previous section. Read the README file before downloading any archives. Full sources and API documentation are also distributed in the archives. Documentation is also available online here.
  4. Download it:
  1. This project aims to help a user to compute ecological evolution based on a defined payoff matrix involving only 3 strategies. The computation may be done in 3 differents ways (using integers, float, etc.)
  2. This is a Micro$oft Excel 2000 sheet using some macros.
  3. All operations are made via the Mico$oft Excel 2000 software tool.
  4. Download it:

It is although to be noticed that a new product, based on the ideas of WinPri, and on the classes of jprison is at work. It will be available as soon as the site will be updated.. So check the page often to have more informations.

[Back to contents]


You can join us by e-mail at :

Otherwise we could be joined by snail mail at this address :

Philippe Mathieu - PRISON project headmaster
Laboratoire d'Informatique Fondamentale de Lille
Université des Sciences et Technologies de Lille
59655 Villeneuve d'Ascq Cedex

We could also be joined by phone or fax at those numbers :

Phone Fax
P. Mathieu :
+33 3 20 43 45 04
B. Beaufils :
+33 3 20 43 69 02
+33 3 20 43 65 66

[Back to contents]


Some links on the subject are collected here.

[Back to contents]


The PRISON project is sponsored by :

[Back to contents]

This page has been accessed times since
Valid HTML 4.0!

Copyright © 1998 by LIFL, <>
Last modified: 1999/11/10 - 18:51