Prisoners Dilemma Project

What is Prisoners Dilemma Game ?

The game played by two player. Players may chose to Cooperate or Defect. So there will be three different scenarios.

Defect
Cooperator
Defect
P (punishment)
T (temptation)
Cooperator
S (sucker)
R (reward)
Defect&Cooperator Matrix

So if the values chosen like : T>R>P>S. The player who chose to play the role of Defect seems to have best strategy but, if player always encounter with the players whose also choose defect, he will be in disadvantage because R>P.

In this paper, they only consider two kind of Players. One of them will be always cooperating while the other type will always defect.The game will be starting like this:

There will be a grid NxN and each cell in that grid will represent a player which might be either 'D' or 'C' . In every round player will play the game with it's neighbours and will the get score from each of it's game. The score of the player will be the sum of the scores that it get from it's neighbours. At the start of the next generation, the owner of cell will be decided by the checking highest score among the previous owner and its neighbours.

They did not mention this in the paper but, after each generation scores should be resetted otherwise those figures can not be obtained.

By the way, when they say neighbours it means 8 adjustgent cell. UP,DOWN,LEFT,RIGHT,UP_LEFT,UP_RIGHT,DOWN_LEFT,DOWN_RIGHT

Defect
Cooperator
Defect
RED
YELLOW
Cooperator
GREEN
BLUE
Color Scheme for Player Type

Each type of player will have different color as it can be seen from the figure above.

Figure 1 : 3X3 Grid with Defect in the Center

Here is the example how game works with simple 3x3 grid and when the T=1.75. In Figure 1, there is only one D and the rest is C. Since all of D's neighbours are C. from each of them it will get T. So the score will be Score = 8*T => 8*1.75 = 14. This will be the highest score for 3x3 grid, since the D is at the center all of the C's score will be lower than this, because they will get punishment.

Figure 2 : 3X3 Grid with Defect in the Center

After first generation, all of the neighbours of the D's at the center will be converted to defect too. Since these news defects were previously cooperators, they will be represented with different color like Yellow.

Figure 2 : 3X3 Grid with Defect in the Center

Another generation later, whole grid will be covered with Red because of their Score dominances.

Here is the first part of project. It can be also used as homework 14.

For the first two Figure in the paper. They started game in a 200x200 grid. Each cell in that grid randomly assigned to be either Defect 'D' or Cooperator 'C'. Defect rate was %10. The Following figure shows the initial distribution of D and C.

Initial picture of 200x200 board with %10 Defect Rate
N=200 b = 1.76 Time Step = 200

The image above created with on a 200x200 grid with 10% defect rate b = 1.76 when the time step is 200.

b=1.86 Time Step= 200

The image above created with on a 200x200 grid with 10% defect rate b = 1.86 when the time step is 200.

N=400x400 Initial 10% defect rate
N=400x400 Initial 20% defect rate
N=400x400 Initial 40% defect rate

As it can be seen from the figures above. Even with the different initial Defect (Cooperator) rates, frequiencies of Cooperators yields to the same value fc = 0.3.

Images in the Paper

Following figures obtained and they are identical to the figures represented in the paper.

Grid Size: 99x99, Time Step :30
Grid Size: 99x99, Time Step :217
Grid Size: 99x99, Time Step :219
Grid Size: 99x99, Time Step :221

Here some examples with Grid Size:99x99 and one defect at center at different time steps. It seems like this approach generates infinite figures like this.

SPACE