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 particular choice of the parametes determines the character of the interaction ranging form cooperation to competition to synchronization. Certainly the most prominent representative is the prisoner's dilemma  a powerful framework to discuss and explain the emergence of altruistic cooperative behavior among unrelated and selfish individuals. Cooperation has long established as a central topic in evolutionary biology because, at least at a first glance, such behavior seems to contradict the principles of darwinian selection. At the same time, cooperation in various repsects must have played a pivotal role in the history of life leading to major transitions such as from genes to chromosomes, from cells to organisms or from individuals to societies. Extensive theoretical studies identified several mechanisms capable of promoting cooperation. The illustration of some of these findings is the main topic of this tutorial.
The following tutorial illustrates several scientific articles and provides interactive Java applets to visualize and experiment with the system's dynamics for parameter settings of your choice.
Different scenarios
Wellmixed populationsIn this simplest scenario encounters between players are completely random. Such a meanfield approximation is valuable because for the replicator equation the dynamics of 2×2 games can be fully analysed.  
Structured populationsIn structured populations players are arranged on a lattice or network and interact only with their nearest neighbors. This enables cooperators to thrive by forming clusters and therby offsetting losses against defectors along the cluster boundaries. 
Prisoner's dilemma, chicken & co.
In the traditional formulation of the prisoner's dilemma, two players have to simultaneously decide whether to cooperate (C) or defect (D). Their joint decisions then determine the payoffs for each player. Mutual cooperation pays a reward R while mutual defection results in a punishment P. If one player opts for D and the other for C, then the former obtains the temptation to defect T and the latter is left with the sucker's payoff S. From the rank ordering of the four payoff values T > R > P > S follows that a player is better off by defecting, regardless of the opponents decision. Consequentially, rational players always end up with the punishment P instead of the higher reward for cooperation R  hence the dilemma. Fortunately there are different mechanisms that allow to overcome this dilemma. This includes repetitions of the interactions with sufficiently high probabilities  the shadow of the future encourages participants to cooperate, i.e. the fear from future retaliation creates incentives to cooperate in the present. Other mechanisms are indirect reciprocity, where individuals carry a reputation, voluntary participation and (spatially) structured populations.
Formally closely related to the prisoner's dilemma is the chicken or hawkdove game. Actually it changes only the rank ordering of S and P, i.e. the sucker's payoff being more favorable than the punishment: T > R > S > P. Nevertheless, this game addresses quite different biological scenarios of intraspecies competition or, in the form of the snowdrift game, explains cooperation under less stringent conditions. The prisoner's dilemma and the snowdrift game are prominent representatives of the more general 2×2 games. Each 2×2 game is characterized and determined by the ranking of the payoffs T, R, S, P and refers to distinct and substantially different interaction scenarios. All 2×2 games are summarized in Fig. 1.
A. A general (symmetric) 2×2 game is determined by the payoff matrix (for the column player) indicating the payoffs for the player's joint decisions. The rank ordering of the four payoff values R, S, T, P determines the characteristics of the game. Without loss of generality we may assume R > P (if this does not hold, we simply interchange C and D) and normalize the payoff values such that R = 1, P = 0 holds.  B. The 12 different rank orderings with R = 1, P = 0, which correspond to very different strategic situations. Each game refers to a region in the S, Tplane depicted above: 1 Prisoner's Dilemma; 2 Chicken, HawkDove or Snowdrift game; 3 Leader; 4 Battle of the Sexes; 5 Staghunt; 6 Harmony; 12 Deadlock; all other regions are less interesting and have not been named.  

This work was originally published as The cover shows the equilibrium fraction of cooperators in wellmixed populations as a function of two parameters S, T (see above). 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. 
Further publications on 2×2 games in spatially structured populations:
 Hauert, Ch. (2001) Fundamental clusters in spatial 2×2 games, Proc. R. Soc. Lond. B 268 761769.
 Szabó, G. & Hauert, Ch. (2002) Evolutionary prisoner's dilemma games with voluntary participation, Phys. Rev. E. 66, 062903.
 Hauert, Ch. & Szabó, G. (2003) Prisoner's dilemma and public goods games in different geometries: compulsory versus voluntary interactions, Complexity 8 (4) 3138.
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 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.