
In behavioral sciences, the essence of various interactions among humans and animals can be modeled by so called 2×2 games. Such games describe pairwise interactions between individuals with two behavioral strategies to choose from. The most prominent representative is certainly the prisoner's dilemma  a powerful framework to explain the emergence of cooperative behavior among unrelated and selfish individuals. Extensive theoretical studies identified several mechanisms capable of promoting cooperation. One of them refers to spatially extended systems which represents the main topic of the following text. In particular, a Java applet allows to experiment with such spatially extended 2×2 games and to investigate effects of different parameter settings and update rules on the systems dynamics and the equilibrium frequencies of cooperators and defectors.
This work was originally published as Hauert, Ch., (2002) Effects of Space in 2×2 Games, Int. J. Bifurcation Chaos 12 15311548. The cover shows the equilibrium fraction of cooperators in wellmixed populations as a function of two parameters S, T (see below). Cooperative regions are colored blue and noncooperative, i.e. regions with prevailing defection, are red. Intermediate fractions of cooperators are shown in light blue, green and yellow (decreasing). The dashed line separates four quadrants with different dynamical characteristics: dominating defection (top left), coexistence (topright), prevailing cooperation (bottom right) and bistability (bottom left). In the last quadrant, the colors indicate the size of the basin of attraction. In blue regions even few cooperators thrive while in reddish regions cooperators prosper only in populations that are already highly cooperative. 
The following pages are designed as additional material to this article and provide interactive Java applets to visualize and experiment with the system's dynamics for various parameter settings.
Virtual lab 
Color code:
Note: The yellow and green colors are very useful to get an impression of the activitiy in the system. Controls:
Note: Mouse clicks on the lattice start, resume or stop the simulations. 
Examples 
All of the following examples and suggestions for experimenting with the virtual lab on spatial 2×2 games refer to players interacting in the Moore neighborhood, i.e. with all neighbors reachable by a chesskingsmove. Most of the phenomena are found for the smaller von Neumann neighborhood, too. However, this requires appropriate adjustments of the parameter values S, T. In some cases specially indicated parameter values are given to demonstrate differences and similarities between simulations with the two neighborhoods. Settings that are not explicitely mentioned are assumed to take on their default values, i.e. lattice size 51×51, synchronized updates and players update their strategy with certainty.
For particular parameter values dynamical coexistence of cooperators and defectors is observed producing intriguing and ever changing patterns. Without noise, i.e. for deterministic update rules, the symmetry of a particularly prepared initial configuration is preserved and the emerging patterns ressembles a caleidoscope  actually an evolutionary caleidoscope since the driving force results from an evolutionary process.
Setting the initial fraction of cooperators to 100% (or 0%) creates such a symmtrical initial configuration with a single defector (cooperator) in a world of cooperators (defectors). For parameter values S=0, T=1.65 with synchronized board updates and the Best takes overrule for the players the symmetric evolution of intriguing spatiotemporal patterns are observed. These settings correspond to the predefined defaults when the applet is loaded.
Suggestions:
The prisoner's dilemma requires T>1 and S<0. In well mixed populations such parameter values eventually lead to the extinction of cooperators. In general, this equally holds for spatially extended systems. Only for a very small parameter range with roughly T<S+5/3 cooperators can outweigh their losses against defectors by forming clusters. The size of this range is further reduced by stochastic components of the different update rules. Nevertheless and despite its small size, this range is particularly important because it demonstrates that cooperative behavior can survive and prosper just by adding spatial extension and without the requirement for any sophisticated strategic behavior.
Suggestions:
The hawk dove game requires 0<S<1 and T>1. In well mixed populations these parameter values lead to coexistence of hawks and doves, i.e. of cooperators and defectors. The equilibrium frequencies of the two strategies depends on S, T: f_{c}=S/(S+T1). This implies that the equilibrium state is essentially independent of the initial configuration.
The spatial arrangement does not change the qualitative picture. However, it does affect the exact equilibrium frequencies of cooperators and defectors. For the deterministic Best takes over update rule local configurations have a strong influence on the evolution of the system. As a consequence the fractions of cooperators and defectors occur only at discrete levels. The transition points can be directly related to growth conditions of particular spatial configurations. These levels are less pronounced for the weakly stochastic Imitate the better and are almost absent for the Proportional update rule.
Suggestions:
For S>0 and T<1 a well mixed population eventually relaxes into a homogenous state of cooperators regardless of the initial configuration. In spatially extended systems this is generally equally true. However, for parameter values S<T/N it becomes increasingly unlikely that an isolated cooperator is able to expand in a neighborhood of size N (von Neumann: N=4; Moore N=8). This is particularly pronounced for Best takes over. In that case, cooperators expand only if at least one cooperator finds other cooperators in its neighborhood. This then acts as a seed for the future success of cooperators. On finite grids such configurations require either many realizations or a certain initial frequency of cooperators. Obviously the probability to find neighboring cooperators scales with the lattice size.
Suggestions:
For S<0 and T>1 defection dominates and the system eventually reaches a homogenous state of defectors regardless of the initial configuration. In general this also holds for spatially structured populations. Only for a very small parameter range cooperators are able to survive through cluster formation. For further details see the example on the prisoner's dilemma above.
For S<0 and T<1 a well mixed population is bistable, i.e. depending on the initial configuration the system approaches either a state of homogenous cooperation or homogenous defection. In this parameter range spatial extension has the most pronounced effect on the long term fate of the strategies. The parameter values S, T determine the stability i.e. average lifetime of certain local configurations. The probability for their creation at initialization time sensitively depends on the initial fraction of cooperators.
Suggestions:
In well mixed populations coexistence requires that S>0 and T>1. The equilibrium frequency of cooperators is then given by f_{c}=S/(S+T1). Interestingly, in this parameter region spatial extension generally favours defectors. For further details and suggestions for simulations see the example on the hawk dove game  the most prominent representative of this category.
Table of contents 
Acknowledgements 
For the development of these pages help and advice of the following two people was
of particular importance: First, my thanks go to Karl Sigmund for insipiring discussions
and helpful comments on the game theoretical parts and second, my thanks go to Urs Bill
for introducing me into the Java language and for his patience and competence in
answering my many technical questions.
Financial support of the Swiss National Science Foundation
is gratefully acknowledged.
Updated on Tuesday, January 5, 2002 by Christoph Hauert. 