## Well-mixed populations:

# Mixed strategies

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

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

In well-mixed populations with pure strategies the replicator equation returns the equilibrium fractions of cooperators and defectors. The system has up to three equilibria depending on the parameter values ` R, S, T` and

`:`

*P*`and`

*x*= 0_{1}`are always fixed points and`

*x*= 1_{2}`is a third fixed point whenever it lies in the interval`

*x*= (_{3}*S - P*)/(*T + S - R - P*)`(0,1)`. The same results hold for well-mixed populations adopting mixed strategies where each individual cooperates with a certain probability

`. This propensity to cooperate`

*p*`evolves towards one of the fixed points derived for pure strategies. To illustrate this, consider a homogenous population where all individuals cooperate with probability`

*p*`. The fate of a rare mutant`

*p*`is then given by`

*q**m*/d

*t = m*(

*P*)

_{q}-**P**where ` m` denotes the frequency of the mutant and

`the average population payoff. Since the mutant strategy is rare this can be approximated by`

**P***m*/d

*t = m*(

*P*)

_{q}- P_{p}which means the mutant can invade whenever ` P_{q} - P_{p} > 0`. Again for small

`we obtain`

*m*`and similalry`

*P*(1 -_{q}= p q R + p*q*)*S*+ (1 -*p*)*q T*+ (1 -*p*)(1 -*q*)*P*`. Thus,`

*P*(1 -_{p}= p q R + p*q*)*S*+ (1 -*p*)*q T*+ (1 -*p*)(1 -*q*)*P*`successfully invades whenever`

*q**q - p*) [

*p*(

*R - T*) + (1 -

*p*) (

*S - P*) ] > 0

holds. This result can now be applied to the Prisoner's Dilemma and Snowdrift or Hawk-Dove games. The Prisoner's Dilemma is characterized by ` T > R > P > S` and therefore the expression in square brackets is always negative. Consequentially, any mutant with

`can invade and take over the population (the latter can be derived from the first equation which is not restricted to rare mutants). Thus, in the long run, the propensity to cooperate converges to`

*q < p*`- just as in the pure strategy case.`

*x*= 0_{1}The argument for the Snowdrift or Hawk-Dove game is slighlty more complicated. Because of the payoff ranking ` T > R > S > P` the expression in square brackets can be both positive or negative, depending on the value of

`. It switches sign for`

*p**p*= (

*S - P*)/(

*T - R + S - P*) =

*x*.

_{3}For simplicity let us consider only mutants with arbitrarily small deviations from the resident strategy ` p`. It follows that for

`, a mutant with a slightly higher`

*p < x*_{3}`can invade but if`

*q*`only mutants with slightly lower`

*p > x*_{3}`can invade. Thus, eventually the propensity to cooperate in the population converges to`

*q*`- again as in the case of pure strategies.`

*x*_{3}Note that the above argument is easily generalized to random, arbitrarily large mutations but then one can no longer assume homogenous resident populations. Rather, the resident population may consist of a mixture of two strategies ` p`,

`with`

*p'*`and`

*p < x*_{3}`. But then the mutant`

*p' > x*_{3}`either satisfies the conditions for invasion for`

*q*`and`

*p*`or for neither of them.`

*p'*## 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 propensity to cooperate in well-mixed populations with individuals adopting mixed strategies and engaging in prisoner's dilemma and snowdrift interactions.
| ||||
---|---|---|---|---|---|

## Prisoner's DilemmaIn the Prisoner's Dilemma mutants with lower probabilities to cooperate are better off which leads to a continuous decrease of the readiness to cooperate in the population until cooperative behavior vanishes*. The sample simulation shows the time evolution of the readiness to cooperate in a well-mixed population playing the Prisoner's Dilemma when starting with a mean initial propensity to cooperate of 99% in a population of 10'000 individuals. | |||||

## Snowdrift and Hawk-Dove gameIn the Snowdrift or Hawk-Dove game the success of mutant strategies depends on the current state/composition of the population. As demonstrated above, the mean readiness to cooperate eventually approaches an intermediate value as specified by the fixed point The sample simulation shows the time evolution of the readiness to cooperate in a well-mixed population playing the Snowdrift or Hawk-Dove game when starting with an initial mean propensity to cooperate of 1% in a population of 10'000 individuals. |

(*) In individual based simulations, mutations lead to some variance in the strategies present in the population and therefore the applets plot not only the mean propensity to cooperate but also the minimum and maximum values. Besides, in biologically motivated models it is reasonable to assume that mutations add only minor changes to the parental strategy. Therefore mutants are assigned a new strategy ` q = p + s` where

`is the parental strategy and`

*p*`is a Gaussian distributed random variable with a small standard deviation. For small standard deviations the difference in payoffs for mutants and residents becomes very small. This can result in an enormous slowing down of the simulations because the reproductive success is proportional to`

*s*`. To avoid this we set the reproductive success proportional to`

*P*_{q}- P_{p}`(1 + exp[ (`where

*P*)/_{q}- P_{p}*k*])^{-1}`denotes a noise term. With this rule, small differences in payoffs are amplified for small`

*k*`and in addition it introduces an interesting form of errors since worse performing individuals may still manage to reproduce with a small probability - which is certainly a reasonable assumption in an imperfect world. Strictly speaking this update rule no longer corresponds to the replicator equation but it still reproduces the essential results even quantitatively. The update rule of the players is one of the many parameters that can be changed in the`

*k**VirtualLabs*and you are encouraged to compare the two approaches.

## VirtualLab

Along the bottom of the *VirtualLab* there 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: | Maximum | Minimum | Mean |
---|

Strategy code: | Defect | Cooperate |
---|

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

*Note:* For the strategies, the shades of grey indicates the individual's readiness to cooperate with black indicating defection and white full cooperation.

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 start, resume or stop the simulations. |

Data views | |

Structure - Strategy | Snapshot of the spatial arrangement of strategies. |
---|---|

Mean frequency | Time evolution of the strategy frequencies. |

Histogram | Frequency distribution of mixed strategies |

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 mean, init sdev:
- initial fractions of cooperators and defectors. If they do not add up to 100%, the values will be scaled accordingly.
- Mutation rate:
- the probability for a mutation to occur whenever an individual reproduces. This parameter is found on the
*Misc*parameter tab. - Mutation type, mutation sdev:
- mutations can occur either uniformly distributed in the interval
`[0,1]`or modify the parental strategy by a Gaussian distributed random variable with mean zero and the specified standard deviation. This parameter is found on the*Misc*parameter tab.