Cooperation
by Manfred Füllsack
This model demonstrates the Demographic Prisoner's Dilemma as suggested by Joshua Epstein. See below how it works.
In Prisoner's Dilemmas, "defection" is the dominant strategy. For themselves, players are on the safe side when choosing "defection". As a community however, they could gain more, when "cooperating". Thus, the question is, how to accomplish the step from individually beneficial defection to communally beneficial cooperation.
Robert Axelrod and others found cooperation emerging when "iterating", i.e. repeating the Prisoner's Dilemma. The players remember unsuccessful encounters and realign their strategy when put in the dilemma again. This Iterated Prisoner's Dilemma assumes players who are able to memorize. But memory is a costly achievement. Biologically it seems questionable, whether complex achievements like memories can evolve prior to cooperation.
Therefore, the Demographic Prisoner's Dilemma has been suggested.
Pushing <setup> generates a random distribution of white and red "agents", each of them endowed with a certain strategy. White agents always cooperate, red agents always defect. When pushing <go>, these agents randomly move to an empty patch within their <vision> and play a Prisoner's Dilemma with all Von-Neumann-Neighbors they encounter on this field (That is, with all other agents they encounter on immediate neighboring patches to the North, East, South and West). If there is no empty field available, they stay and play the PD where they are. The pay-off they can gain in the game can be set with the <temptation>, <reward>, <punishment> and <sucker's-pay-off>-sliders (At start-up, they are put at the values Epstein suggested).
When accumulating a certain amount of pay-off, of <wealth> so to say, agents can reproduce. The necessary amount can be set with the <clone-wealth>-slider. If there is an empty patch within their vision, they "bear" an offspring there, which - in Epstein's version - inherits their strategy and part of their wealth (in Epstein's version 6 pay-off-points which are substracted from their parent's wealth). If on the other hand, wealth falls below zero agents "die". They are removed from the game.
Switching on the <die-at-max-age>-switch gives the agents a maximum age, which can be set with the <max-age>-slider.
In this setting, cooperation is likely and pretty persistant. For testing this, you can try different pay-offs. You can also switch off the <random-%>-switch and set the percentage of initial cooperators by hand. In some rare cases, even a group of just 5% cooperators in a population of 100 can turn a red community more or less white. (Just leave the <go>-button on and push <setup> over and over whenever defectors die out)
Note that defectors can not live on their own. Although they fare better against cooperators, they mutually eat away their gains when confronted only with each other. In some settings (e.g. try for example t = 9, r = 2, p = -2, s = -9) you can see cooperation evolve at first, only to be eaten away by defection after some time and defectors dying out when all cooperators are gone. Sometimes however (try for example t = 9, r = 2, p = -5, s = -6) , cooperation can survive in niches and reblossom when the number of defectors has diminished to a point where the probability of cooperators encountering other cooperators is high enough. In this case, the curve in the population plotter shows the typical Lotka-Volterra development.
Learning
In his model, Epstein asumes offsprings inheriting the strategy of their parents. He discusses mutation, but only as a "perturbance" to reproduction. The <mutation-probability>-slider lets you set the probability of offsprings having the same strategy as their parent. (At <mutation-probability> of 100% the odds of offsprings to be born as cooperators will be exactly 50:50) Note that cooperation can withstand surprisingly high mutation rates, although oscillation runs pretty high. However, when you push conditions to the edge (try for example t = 9, r = 2, p = -5, s = -7, with a <mutation-probability> of 100% and an initial cooperators-defectors-ratio of 50 : 50), cooperation does not persist and eventually populations will die out.
But what if players can "learn" beneficial behaviour? That is, what if they simply get used to cooperating and defecting when being reciprocated a couple of times?
To check if cooperation can persist in this case, I added a simple <learn>-possibility to Epstein's scenario. Players still won't recognize each other in the sense of remembering who has played what strategy in an earlier confrontation. But they will reduce their <mutation-probability> by a certain <learn-rate> whenever they are reciprocated in their strategy. At times this reduction suffices to change 50:50-reproduction into full-blooded cooperation- or defection-inheritance before populations die out (Set <mutation-probability> at 100%, the initial cooperators-percentage at 50% (<random-%> off), the pay-offs at t = 9, r = 2, p = -5, s = -7, the <learn-rate> at 2 and while <go> is running keep pushing <setup> whenever populations die out. In my trials, "learning" succeeded at least once in 20 attempts). The <mutation-probability-distribution>-plotter lets you follow this "learn"-process.
Coded by Manfred Füllsack (source code on demand), Feb. 2009 (to be improved and continued)
Literature:
Epstein, Joshua M. (1998): Zones of Cooperation in Demographic Prisoner's Dilemma, in: Complexity 4 (2): p. 36-48.