The equilibrium frequencies of cooperators and defectors in structured populations can differ considerably from the results for well-mixed populations with random encounters. To model spatial structures the individuals are arranged on a lattice and interact only within a limited local neighborhood. Various choices for the lattice geometry are possible: square lattice with neighborhood size N = 4 or N = 8, triangular with N = 3 or hexagonal with N = 6. Whenever a site x is updated, the present occupant and all its neighbors compete for recolonizing the focal site x with their offspring. We assume that a neighbor y succeeds in reproducing with a probability proportional to the difference in payoffs Px - Py provided it is positive and with probability zero otherwise. In well-mixed populations, this assumption leads to the replicator equation. A spatial analogue of the replicator dynamics is then to set the competitive success of neighbor y proportional to

wy = (Px - Py)+/a

where a is a normalization constant such that 0 < wy < 1 holds (a = T - S in the Prisoner's Dilemma and a = T - P in the Snowdrift or Hawk-Dove game). With probability px = (1 - wy1)(1 - wy2) … (1 - wyN) all neighbors yi fail to reproduce and the focal individual succeeds in placing its own offspring in site x. Otherwise, with probability 1 - px, one neighbor takes over the focal site. The relative probability for success of a neighbor y is wy/w where w = w1 + w2 + … + wN.

Updating of the lattice can be synchronous referring to populations with discrete non-overlapping generations or asynchronous for populations with overlapping generations in continuous time. For synchronous updates, all individuals interact and accumulate payoffs and then everbody attempts to reproduce with successrates relative to each individuals payoff within its neighborhood. For asynchronous updates only a single randomly selected focal site gets updated at a time: first the payoffs of the selected individual and all its neighbors are determined and then they compete to re-populate the focal site as outlined above.

Dynamical regimes

The following examples illustrate and highlight different relevant or otherwise interesting scenarios but at the same time they are meant as suggestions and starting points for further exploring and experimenting with the dynamics of the system. If your browser has JavaScript enabled, the following links open a new window containing a running lab that has all necessary parameters set as appropriate.


Time evolution of cooperators and defectors in spatially structured populations where individuals interact only within a limited local neighborhood and engage in prisoner's dilemma and snowdrift games.

Color code:CooperatorsDefectors
 New cooperatorNew defector

Evolutionary kaleidoscopes:
Prisoner's Dilemma

In the spatial Prisoner's Dilemma cooperators can survive by forming clusters and thereby outweighing losses against defectors along the boundary with interactions within the cluster. For suitable parameters such clusters can expand along straight boundaries but are vulnerable to invasion along rugged boundaries and corners.

For deterministic update rules (synchronous lattice update, best player in neighborhood reproduces) and symmetrical initial configurations this can lead to fascinating spatio-temporal patterns. Such evolutionary kaleidoscopes are certainly only of limited scientific interest but they do have quite some entertainment value.


Evolutionary kaleidoscopes:
Snowdrift and Hawk-Dove games

In the spatial Snowdrift or Hawk-Dove game it is favorable to adopt a strategy which opposes the neighboring ones. This leads to smaller and filament like clusters.

As for the Prisoner's Dilemma, determinsitic update rules can again produce fascinating evolutionary kaleidoscopes. Simply by watching the time evolution of the lattice configuration the qualitative difference of the underlying mechanisms become obvious. Given the static pictures to the left, this would be far more difficult to decide.


Space promotes cooperation:
Prisoner's Dilemma

In the Prisoner's Dilemma cooperators can thrive in spatial arrangements for sufficiently small r - recall that the payoffs can be rescaled to R = 1, P = 0, T = 1 + r and S = -r where r is the cost-to-benefit ratio as derived in the definition of the game. The spatial structure enables cooperators to form compact clusters and thereby reducing explotation by defectors. However, for larger r the benefit from clustering beomes too small and cooperators go extinct.

The snapshot on the left shows a typical lattice configuration near the extinction threshold of r where cooperators just manage to persist.


Space inhibits cooperation:
Snowdrift and Hawk-Dove games

In the Snowdrift and Hawk-Dove game cooperators and defectors co-exist in well-mixed populations as opposed to the Prisoner's Dilemma where cooperators are doomed and go extinct. Co-existence results from the payoff ranking which favors strategies opposing those of the co-players. Ironically, this mechanism which promotes cooperation in well-mixed population results in a decrease of cooperation in spatially structured populations. For larger r cooperators even go extinct - recall that R = 1, P = 0, T = 1 + r and S = 1 - r where r denotes the cost-to-benefit ratio as derived in the definition of the game.

The snapshot on the left shows a typical lattice configuration near the extinction threshold of r. The underlying mechanism now favors small, isolated and filament like clusters of cooperators.


Prisoner's Dilemma

In order to get a better understanding of the relevant mechanisms in the spatial prisoner's dilemma, consider a single broad straight stripe of cooperators bounded by defectors. The cost-to-benefit ratio r is the same as above, i.e. near the extinction threshold of cooperators. Defectors can not penetrate the straight boundary but coopertors can expand. Such unconcerted expansion renders the boundary irregular and now defectors can invade. Small compact clusters of cooperators get separated and meander into the defectors realm. Due to stochastic fluctuations the clusters vary in size. If they grow, they often divide into two, but if they shrink, they are likely wiped out because the clustering advantage of cooperators decreases.

The snapshot on the left shows a typical lattice configuration after 150 Monte-Carlo (MC) steps. In each MC step, every site gets update once on average.


Snowdrift and Hawk-Dove games

The relevant mechanisms in the spatial snowdrift or hawk-dove game are quite different from the prisoner's dilemma: only in the beginning they are similar in that the straight boundary of cooperators resists invasion by defectors and cooperators can expand. Cooperators can even grow dendrite like structures into the territory of defectors. Branches may break off but tiny isolated or even single cooperators can persist. Once the boundary is irregular, then defectors are able to invade the domain of cooperators. Related to the dendrites, the defectors reduce the cooperators only to a skeleton like structure. The reason and advantage of such a fine mixing of cooperators and defectors lies in the characteristics of the game: each players best option depends on the neighboring strategies - if they cooperate it is best to defect and vice versa.

The snapshot on the left shows a typical lattice configuration for the same cost-to-benefit ratio r near the extinction threshold after 50 MC steps.

The key result that spatial structure promotes cooperation in the Prisoner's Dilemma but fails to do so under the apparently relaxed conditions of the Snowdrift or Hawk-Dove game is very robust. In particular, the qualitative results remain unaffected by changes in the updating of the lattice (synchronous versus asynchronous) or the lattice geometry (square, triangular or hexagonal lattices) leading to different neighborhood sizes. This can be easily veryfied using the VirtualLabs and changing e.g. the lattice geometry on the Population tab of the parameter panel.


Along the bottom of the VirtualLab applet are several buttons arranged to control the execution and the speed of the simulations. Of particular importance are the Param button and the data views pop-up list on top. The former opens a panel that allows to set and change various parameters concerning the game as well as the population structure, while the latter displays the simulation data in different ways.

Color code:CooperatorsDefectors
 New cooperatorNew defector
Payoff code:Low       High

Note: The yellow and green strategy colors are very useful to get an intuition of the activitiy in the system. The shades of grey of the payoff scale are augmented by blueish and reddish shades indicating payoffs for mutual cooperation and defection, respectively.

Java applet on cooperation in structured populations. Sorry, but you are missing the fun part!
ParamsPop up panel to set various parameters.
ViewsPop up list of different data presentations.
ResetReset simulation
RunStart/resume simulation
NextNext generation
PauseInterrupt simulation
SliderIdle time between updates. On the right your CPU clock determines the update speed while on the left updates are made roughly once per second.
MouseMouse clicks on the graphics panels generally start, resume or stop the simulations.
Data views
Structure - Strategy Snapshot of the spatial arrangement of strategies. Mouse clicks cyclically change the strategy of the respective site for the preparation of custom initial configurations.
Mean frequency Time evolution of the strategy frequencies.
Structure - Fitness Snapshot of the spatial distribution of payoffs.
Mean Fitness Time evolution of the mean payoff of each strategy together with the average population payoff.
Histogram - Fitness Histogram of payoffs for each strategy.

Game parameters

The list below describes only the few parameters related to the Prisoner's Dilemma, Snowdrift and Hawk-Dove games. Follow the link for a complete list and detailed descriptions of all other parameters such as spatial arrangements or update rules on the player and population level.

reward for mutual cooperation.
temptation to defect, i.e. payoff the defector gets when matched with a cooperator. Without loss of generality two out of the four traditional payoff values R, S, T and P can be fixed and set conveniently to R = 1 and P = 0. This means mutual cooperation pays 1 and mutual defection zero. For example for the prisoner's dilemma T > R > P > S must hold, i.e. T > 1 and S < 0.
sucker's payoff which denotes the payoff the cooperator gets when matched with a defector.
punishment for mutual defection.
Init Coop, init defect:
initial fractions of cooperators and defectors. If they do not add up to 100%, the values will be scaled accordingly. Setting the fraction of cooperators to 100% and of defectors to zero, then the lattice is initialized with a symmetrical configuration suitable for observing evolutionary kaleidoscopes.