The Evolution of Cooperation 
on Hostility Gradients

William Harms

Centre for Applied Ethics
University of British Columbia

U(Unpublished work, 
Copyright William Harms, 1999.)

Capture02a.gif (1777 bytes) Capture04a.gif (2944 bytes)
Capture05a.gif (3627 bytes) Capture06a.gif (3871 bytes)

Hostile environments, especially variably hostile environments appear to offer unique opportunities for cooperative behavior (i.e. conferring benefits on others) to evolve. It is generally understood  that the stability of cooperation requires non-random assortment between cooperators and non-cooperators (i.e. "defectors"). Otherwise, the non-reciprocating beneficiaries of cooperative behaviors have the edge. This is the basic insight behind group selection theory8, and there are a variety of mechanism which may result in this non-random assortment. Most purely spatial mechanisms of segregation (e.g. population viscosity3,7) work only in the short term, however, since increasing population densities and the attendant spatial spread of populations compromise the required isolation.

The simulations demonstrated below model an environment in which the risk of individual mortality increases as one moves out from the "origin", the upper left-hand corner. (Cf. 2.) The environment is an unwrapped 25x25 grid of locales or "patches", which provide locations for limited foraging and cooperative interaction between agents. (Notice that the simulator is not the familiar cellular automaton, but rather, the cellular grid forms the environment over which autonomous agents move.) Details below. Agents move between patches at a low rate, feed, interact, survive and reproduce if they are lucky.

It is easy to see that cooperators can tolerate higher mortality rates than non-cooperators, since they are more productive and thus reproduce quicker. So it is not surprising that they can survive in regions where groups of defectors cannot. What is surprising is that the fragmentation of the cooperator population created by the stochastic operation of mortality risks partially insulates the population from invasion and creates "firebreaks" against the spread of defectors from successfully invaded colonies. This allows long term stability of a fluctuating cooperator population in the "boundary region" between the area where defectors alone can make it and the outer area where even cooperators can't make it.

This sets the stage for the evolution of discriminating mechanisms. Gradualist considerations suggest that cooperation must succeed first before complex mechanisms of discrimination arise to enforce it. We model the emergence of the simplest discriminating strategy - TitForTat. - in 3 round repeated interactions.1 TitForTat successfully mutates and reinvades the low-risk area. The addition of "crowding costs", which are necessary to keep TitForTat. from growing exponentially in this region result in the virtual elimination of defectors. (They are maintained at low rates by mutation and short term luck.)

The links below each lead to a page with a time series of images which   illustrates typical stages in the process, accompanied by further explanation. Some information is given regarding how typical they are, and how robust the phenomenon is over parameter changes.

We explore this process in five steps. Each of the time series demonstrated are quite typical.

  1. Benchmarking the Process: Initial population of mixed cooperators and non-cooperators migrates into benign frontier.
  2. Refuge in the Badlands I: Initial population of mixed cooperators and non-cooperators migrate into increasingly hostile territory. Cooperator population survives in boundary region.
  3. Refuge in the Badlands II: Cooperator mutants from initial population of non-cooperators eventually migrate into boundary region, and stabilize.
  4. Taking Back the Heartland: mutant cooperators with the ability to remember past moves and discriminate in repeated encounters (they play TitForTat.) arise and reinvade benign territory, eliminating virtually all non-cooperators.
  5. Addendum: The Evolution of Individual Movment Rates. We allow each individual its own movement rate, and allow offspring to differ from their parents with respect to this parameter. Selection increases defector movement rate, while cooperator movement rate oscillates around the original value of 1%.

The following explanations of the design and functioning of the simulator apply to all four steps. More information on the EAME Agent-Patch simulator can be found elsewhere.


  1. Axelrod, R. (1984): The Evolution of Cooperation, New York: Basic Books.
  2. Epstein, J. M. (1998): "Zones of Cooperation in Demographic Prisoner's Dilemma," Complexity, 4(2), 36-48.
  3. Hamilton, W. D. (1964): "The Genetical Evolution of Social Behavior I & II," Journal of Theoretical Biology, 7, 1-52.
  4. Hanski, I. A. and M. e. Gilpin, eds. (1997): Metapopulation Biology: Ecology, Genetics, and Evolution, Academic Press.
  5. Harms, William.(Forthcoming) "The Evolution of Cooperation in Hostile Environements." Journal of Consciousness Studies.
  6. Harms, William (In Review) "Biological Altruism in Hostile Environments." (PDF version available.)
  7. Skyrms, B. (1996): Evolution of the Social Contract, Cambridge University Press.
  8. Sober, E. and D. S. Wilson (1998): Unto Others: The Evolution and Psychology of Unselfish Behavior, Cambridge, MA: Harvard.

Copyright William Harms 1999. (Author, designer, and programmer.)
Evolving Artificial Moral Ecologies Project
Centre for Applied Ethics, UBC