NetLogo User Community Models
by Jen Badham (Submitted: 11/21/2011)
WHAT IS THIS SIMULATION FOR?
This simulation demonstrates the haystacks model developed by John Maynard Smith (1964), used in evolutionary biology and economics to investigate the conditions under which altruism can develop in groups over time despite the personal cost (and hence evolutionary disadvantage) to the altruist. The model implemented is the version described in Theodore Bergstrom's (2002) overview paper from the economics perspective.
WHAT IS THE HYPOTHESIS?
John Maynard Smith argued that altruism could be maintained (and eventually fixed) in a population under specific conditions.
WHAT ARE THE ELEMENTS OF THE MODEL?
There are several haystacks. A founding population of mice starts in each haystack. Each haystack has the same sized founding population but with (potentially) different distributions of altruists and egoists. An altruist is willing to incur a personal cost so as to improve the reproductive rate of all the mice in their own haystack. An egoist is not willing to do so, but benefits from the sacrifice of the altruists.
For the purposes of the model, mice breed asexually; that is, altruists breed altruists and egoists breed egoists, and there is no need to track males and females. The success of the group is operationalised as reproduction. After some generations where each haystack is isolated, all the mice from the various haystacks intermingle and new founding populations for each haystack are drawn from the entire mouse population. This reproduction and mixing continues until the whole population is of only one type, altruists or egoists.
The only agents are haystacks. The key properties of the haystack are the number of altruists and the number of egoists. These are updated each timestep based on reproduction rates. Mice are implicit rather than modelled.
Additional haystack properties are for visualisation purposes and have no behavioural influence. The total number of mice (that is, the sum of the number of altruists and the number of egoists) governs the size, so that the differential impact of breeding can be seen.
There is no meaningful geographic or network relationship. The patches have no impact. Each haystack has a location only for visualisation purposes.
HOW DOES THIS SIMULATION WORK?
The world view shows several haystacks (number given by 'num-haystacks' slider). The colour of the haystack represents the mix of altruists and egoists in the haystack: blue for primarily (>65%) altruists, red for primarily (>65%) egoists, and green if roughly balanced. The size is determined by the number of mice.
There are three input boxes for the reproduction rates to update the number of altruists and egoists in each haystack.
Mathematically (following Bergstrom), if N is the number of existing mice in the haystack, x is the proportion of altruists, r is the base reproduction, b is the group benefit (additional mice) and c is the personal cost (to each altruist):
The 'Population Counts' monitor displays the combined haystack total number of altruists (blue) and egoists (red). Total is displayed in the 'Population' output. The 'Altruist Proportion' monitor displays the number of altruists as a proportion of the total altruist and egoist population.
There are two sliders to control the iterative isolation and mixing process. The 'founding-popn-N' slider sets the total number of mice in each haystack at the beginning of the isolation phase. The 'generations-T' slider sets the number of generations for which mice will reproduce within their haystack during the isolation phase. At the end of the isolation phase, new founding populations are established for each haystack. The mix of altruists and egoists is proportional to the entire mouse population. Conceptually, this is equivalent to drawing these founding populations randomly from the mice in every haystack and any mice left over die.
The cycle of reproduction and mixing continues until an evolutionary stable equilibrium has been achieved. At this point the entire mouse population is altruistic (in which natural selection at the group level has occurred) or egoistic (in which natural selection at the individual level has occurred).
The mix of altruists and egoists in each haystack initially is controlled by two sliders. The 'initial-prop-altruists-x' slider sets the proportion of altruists in the population at the start of the simulation. This proportion changes over time due to differential reproduction rates.
The 'assortativity-a' slider affects how the founding mice are distributed between haystacks at the start of each isolation phase. A value of 0 means that all haystacks have a mix of altruist and egoist mice in the same proportion. A value of 1 means that some haystacks have only altruistic mice and others have only egoistic mice, but no haystack has a mixed population. This is operationalised using the subgroup matching method: if (a) is the index of assortativity, then the first proportion (a) of the haystack's founding population is of one type (with the type is selected randomly using the population proportion). The remainder of the founder population is generated with the type selected randomly at the individual level.
WHAT HAPPENS WHEN RUNNING THE SIMULATION WITH THE DEFAULT SETTINGS?
The default settings have been selected to demonstrate that egoists win in normal evolutionary arrangements. That is, egoists do better than altruists and eventually comprise the whole population despite an equal mix at the start.
The settings are:
WHAT HAPPENS WITH CHANGES IN THE INTERFACE SETTINGS?
To demonstrate Maynard Smith's idea, changes are only required in 3 of the settings. The other settings are available for further exploration. Use the same settings for reproduction rates, initial proportion of altruists and number of haystacks. Only the altruism in isolated populations will be changed.
Variation 1: small founding population
Variation 2: moderate founding population, longer isolation
Variation 3: positive assortativity
GAME THEORY BACKGROUND
There are two types of games used extensively in evolutionary biology: the conflict game of Prisoners' Dilemma, and the cooperation game of Stag Hunt.
PRISONERS' DILEMMA: Consider the situation where two people commit a crime. The police have enough evidence to convict the offenders of a lesser crime, but need the testimony of either one to convict the other of the more serious crime. The police offer a deal: confess and testify to receive a reduced sentence. Each offender has to choose whether to confess without knowledge of the choice of the other offender.
If they both confess, they each receive sentences of 5 years. If neither confesses, they are sentenced to 2 years. If only one confesses, that offender receives no sentence and the other receives 10 years. It is clearly in the interest of each to confess, but that leads to a worse outcome than if neither confesses.
STAG HUNT: Consider the situation where two (or more) people are required to successfully hunt a stag. Alternatively, each person could decide to hunt a rabbit. The amount of food available per person from a successful stag hunt is more than he or she would obtain from a successful rabbit hunt. However, the stag hunt is only successful if all the hunters participate.
The benefits of participating in the stag hunt are higher than not participating, so participants are not being altruistic. The best response for a hunter is to participate in the stag hunt if all others participate, but to hunt rabbits if any of the others decides to do so. Therefore, the stag hunt requires a level of cooperation and trust.
Within a haystack, the egoists always reproduce faster than the altruists, so the haystacks model is usually set up with the same incentives as a Prisoners' Dilemma. However, if there is a very high proportion of altruists and their share of additional reproduction is greater than their personal costs to obtain that reproduction, then the game is of Stag Hunt form. However, Maynard Smith's thesis does not rely on this Stag Hunt solution. Instead, altruist populations can emerge even within a Prisoners' Dilemma game if subpopulations with higher levels of altruism remain isolated for some time.
CREDITS AND REFERENCES
This model was developed by Jennifer Badham (firstname.lastname@example.org) in September 2011.
Maynard Smith J 1964, "Group selection and kin selection" in Nature, No. 4924 (March 14, 1964), pp 1145-1147.
Bergstrom T 2002, "Evolution of Social Behavior: Individual and Group Selection" in Journal of Economic Perspectives, vol 16(2), pp 67-88.
(back to the NetLogo User Community Models)