## Well-mixed populations:

# Pure strategies

#### by Christoph Hauert, Version 1.0, April 2004.

- Location:
- VirtualLabs
- » Cooperation
- »
*Well-mixed populations - pure strategies*

In well-mixed populations the equilibrium fractions of cooperators and defectors are easily calculated using the replicator equation:

*x*/d

_{i}*t*=

*x*(

_{i}*P*)

_{i}-**P**where ` x_{i}` denotes the frequency,

`the payoff (fitness) of strategy`

*P*_{i}`and`

*i*`the average population payoff. The replicator equation simply states that the success of a strategy depends on its relative performance in the population. Therefore, strategies with a higher than average payoff will spread. In a population with a fraction of`

**P**`cooperators and`

*x*`defectors the replicator equation reduces to`

*y = 1 - x**x*/d

*t*=

*x*(1 -

*x*) (

*P*)

_{c}- P_{d}where *P _{c}* and

*P*denote the average payoffs of cooperators and defectors, respectively. The above equation has three equilibria: two trivial ones with

_{d}`and`

*x*= 0_{1}`as well as a non-trivial one for`

*x*= 1_{2}`which leads to`

*P*_{c}= P_{d}*x R*+ (1 -

*x*)

*S = x T*+ (1 -

*x*)

*P*

*x*= (

_{3}*S - P*) / (

*T + S - R - P*).

The stability of all three equilibrium points is easily obtained by checking `d x/dt` near the equilibium points:

`is stable if`

*x*= 0_{1}`,`

*P > S*`stable if`

*x*= 1_{2 }`and`

*R > T*`is stable if`

*x*_{3}`and`

*S > P*`, i.e. whenever both`

*T > R*`and`

*x*_{1}`are unstable.`

*x*_{3}Instead of referring to the fraction of cooperators, ` x` may equally refer to the propensity of cooperation in a continuous strategy space. This equivalent interpretation leaves the above calculations and conclusions unaffected but it does affect the individual based simulations. In particular, we need to introduce mutations. The replicator equation then determines the fate of a rare mutant

`when competing against the resident`

*y*`. If the mutation is favorable the mutant will spread and usually displace the resident.`

*x*## Dynamical regimes

The following examples illustrate and highlight different relevant 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.

## Legend | Time evolution of the fraction of cooperators and defectors in well-mixed populations with individuals engaging in prisoner's dilemma and snowdrift interactions.
| |||
---|---|---|---|---|

## Prisoner's DilemmaThe Prisoner's Dilemma is characterized by the payoff ranking is stable, x=0_{1} unstable and x=1_{2} not in x_{3}[0,1]. Therefore, regardless of the initial configuration of the population cooperators are bound to go extinct. Consequentially everybody in the population ends up with the payoff instead of the preferrable P for mutual cooperation - hence the dilemma.RThe sample simulation shows the time evolution of the fraction of cooperators in a well-mixed population playing the Prisoner's Dilemma when starting with 99% cooperators. | ||||

## Snowdrift and Hawk-Dove gameFor the Snowdrift and Hawk-Dove game the characteristic payoff ranking is and x=0_{1} are unstable but x=1_{2} is stable. Consequentially a stable mixture of cooperators and defectors evolves. Note that the average population payoff in equilibrium is smaller than x_{3} - just as in the Prisoner's Dilemma. Thus the paradox of cooperation is also apparent in the Snowdrift or Hawk-Dove games.RThe sample simulation shows the time evolution of the fraction of cooperators in a well-mixed population playing the Snowdrift or Hawk-Dove game. Since the sample simulations consider finite populations, small fluctuations around the equilibrium occur. |

## Virtual lab

Along the bottom of the *VirtualLab* are several buttons to control the execution and the speed of the simulations. Of particular importance are the * Param* button and the data

*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.*

**views**Color code: | Cooperators | Defectors |
---|---|---|

New cooperator | New defector |

Payoff code: | Low | High |
---|

*Note:* The yellow and green 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, which indicate the payoffs for mutual cooperation and defection, respectively.

Controls | |

Params | Pop up panel to set various parameters. |
---|---|

Views | Pop up list of different data presentations. |

Reset | Reset simulation |

Run | Start/resume simulation |

Next | Next generation |

Pause | Interrupt simulation |

Slider | Idle time between updates. On the right your CPU clock determines the update speed while on the left updates are made roughly once per second. |

Mouse | Mouse 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:
- reward for mutual cooperation.
- Temptation:
- temptation to defect, i.e. payoff the defector gets when matched with a cooperator.
- Sucker:
- sucker's payoff which denotes the payoff the cooperator gets when matched with a defector.
- Punishment:
- 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.