Cellular Automata Simulation
of the Iterated Prisoners Dilemma

The n-person Iterated Prisioners' Dilemma (IPD) simulations shown here (where n = 2500 persons on a 50 x 50 grid) illustrate the complexity of decision making in a non-cooperative setting.  The Prisoners' Dilemma is a well-studied classical problem of game theory that captures the effects of various strategies in competition.  One finding of study of the IPD is that a simple "tit-for-tat" strategy is an effective and robust approach to dealing with an adversary (see books by Robert Axelrod below). This web site gratefully acknowledges the article by  M. Nowak, R. May, and K. Sigmund and the computer program by Alan Lloyd in the Amateur Scientist section of the June 1995 issue of Scientific American.  This animated depiction of the IPD is meant to be of help to students of decision science, game theory, and CA modeling.  Enjoy.

This n-person Iterated Prisoners' Dilemma captures some of the complexity of real-world decision making.  In this case each prisoner plays the game with each of the surrounding 8 players and himself.  The player then takes on cooperator or defector status depending on the more successful strategy.  Each 2-person game is scored as follows:
both cooperate  - each receives a score of 1.0
both defect - each receives a score of 0
one defects & receives a score of  a variable b (here set to1.85), and the cooperator (who goes to jail) receives a score of 0.

The game is set to b = 1.85 where b is the advantage to defection, also termed the "sucker's payoff".

Two grids are shown below. (Each grid wraps around at the edges, like a torus.)  Use the buttons on the bottom right corner of each grid to populate the grid (top button), clear (middle button), or start/pause (bottom button) the simulation.

Victor Blue (March 25, 1999).  Send email with comments to: vicblue@ulster.net

The color code is:
cooperated previously and is now a cooperator - magenta (purple)
cooperated previously and is now a defector - yellow
defected previously and is now a cooperator - green
defected previously and is now a defector - cyan (aquamarine)

Small group of defectors at center of  field of cooperative players starts the game:


Your browser doesn't support Java applets. This is a screen shot of the applet

The above pattern only lasts about 750 time steps.  Try a clean restart with a slightly different starting group by clicking the mouse over cells you want to activate as defectors.   By startting with any symmetrical pattern, a symmetrical pattern results.

A very different evolution takes place with a randomized start (below).  The cutting edge of change is indicated by the yellow and green cells.

Random allocation of 10% defectors in field of cooperative players starts the game:


Your browser doesn't support Java applets. This is a screen shot of the applet

 


A never-ending panoply of patterns in dynamic flux emerges from the contest between cooperators and defectors.

Check out the dmoz website for further links on the Iterated Prisoners' Dilemma..
For a well developed discussion see the books by Robert Axelrod "The Evolution of Cooperation" and "The Complexity of Cooperation" and the University of Michigan Complexity website.   Or check out the Scientific American article mentioned above.

Also try Exploring Emergence and  Artificial Life Online for further explanations and examples of CA.  Check out  TRANSIMS for research ongoing with CA vehicular traffic simulations pioneered by Kai Nagel. Also, the models of Craig Reynolds and Dirk Helbing, though not CA models, may be of interest because their models deal with self-organization of individual, autonomous agents.

Click to go back to homepage , bidirectional, or 4-directional pedestrian simulations.

Victor Blue (March 25, 1999).  Send email with comments to: vicblue@ulster.net