{'fraction_non_alphanumeric': 0.035581092414482256, 'fraction_numerical': 0.01224103781160222, 'mean_word_length': 4.551461119366023, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Stochastic evolutionary game dynamics

In this review, we summarize recent developments in stochastic evolutionary game dynamics of finite populations.

of the situation. Instead, their rationality is bounded and the way they make decisions is very different. In this case the prediction of the action of others is usually no longer possible. Nonetheless, bounded rationality turned out to be a crucial concept to overcome the problematic rationality assumption in economics.
A completely different way to deal with this problem in biology has been proposed by John Maynard Smith and George Price in the 1970s [61,62]. They introduced the idea of evolutionary game theory. The utility function (which is usually the payoff from the game) is identified with the reproductive fitness. In this way, successful strategies spread in the population and less successful strategies diminish. Two important aspects differ from the traditional setting of classical game theory: (i) Evolutionary game theory always deals with populations of individuals instead of two (or few) players. (ii) In contrast to the static classical game theory analysis, evolutionary game theory provides a natural way to introduce a dynamics into the system.
There are two interpretations of evolutionary game dynamics. The first one is the traditional setting, in which strategies are encoded by the genome of individuals and successful types spread in the population due to their higher reproduction. Examples from biology include the competition of different bacterial strains [58], cooperation in virus populations [113], or the cyclic dominance of mating strategies in lizards [94,95]. Biological reproduction selects successful strategies and does not require rational agents or other forms of cognitive abilities.
The second interpretation is cultural evolution. In this setting, successful behaviors are copied by other individuals through imitation. Successful strategies propagate through imitation and learning. Although individuals now have to make decisions, this is very different from the rational decisions in classical game theory. Instead of analyzing the situation in detail, the players just imitate those that are more successful. Such strategies are possible even with minimal cognitive premises. This approach is taken for comparisons between predictions of evolutionary game theory and behavioral studies.
More recently, ideas of evolutionary game theory have been reintroduced to economics, where they are tackled with great mathematical rigor [85].

The replicator dynamics
Traditionally, evolutionary game dynamics is described for very large, unstructured populations. In this case, a differential equation governs the evolution of the densities of the different strategies [50,102,118], (1.1) Here, x i is the fraction of type i in the population, π i is the fitness of this type and π is the average payoff in the whole population. If the fitness of a type is above the average fitness in the population, its density will increase. If the fitness is below the average fitness, then the corresponding density will decrease. Each type i has a fixed strategy. If the fitness values π i are fixed, we speak of constant selection. In general, π i depends on the composition of the population, i.e. on the fractions of all other strategies x j . Then, π becomes quadratic in the fractions x j . Therefore, the dynamics is nonlinear in general. Since the variables in the replicator equation represent the fractions of each strategy in the population, the natural coordinate system is a probability simplex, i.e., for 2 strategies, we have a line, for 3 strategies an equilateral triangle, for 4 strategies an equilateral tetrahedron and so on.
As an example, let us consider the simplest possible games. These are so called two player normal form games or 2 × 2 games. Such games can be described by a payoff matrix of the following form This is a way to specify the interactions of two types: If A interacts with another A, it obtains a and b if it interacts with B. Similarly, B obtains c from interactions with A and d from interactions with B. The payoffs are determined by the fraction of interactions with a given type. Since we have only two types, the population state is fully determined by x = x 1 = 1 − x 2 . The payoffs are then π A = a x + b(1 − x) and π B = c x + d (1 − x). This leads to the replicator equatioṅ Apart from the trivial fixed points x = 0 and x = 1, the replicator equation can have a third fixed point x * for a > c and d > b or for a < c and d < b, We can distinguish four generic cases [77], see Fig. 1.1: • Dominance. In this case, one strategy is always a better choice, regardless of the action of the opponent. Either A dominates B (a > c and b > d) or B dominates A (a < c and b < d). In the first case, the fixed point at x = 1 is stable and the fixed point at x = 0 is unstable and vice versa in the latter case.
• Bistability. This is the case for a > c and d > b. The fixed points at x = 0 and x = 1 are stable, separated by an unstable fixed point x * . The corresponding games are called coordination games. What is the best strategy in such a game? As a first approximation, one can ask for the maximum payoff in the equilibrium. However, if the opponent is unreliable, one should also try to avoid large losses. This leads to the concept of risk dominance: The strategy that has a larger basin of attraction is called risk dominant. In our case, strategy A is risk dominant for a + b > c + d (or, equivalently x * < 1 2 ). For a + b < c + d (or x * > 1 2 ), strategy B is risk dominant.
• Coexistence. For a < c and b > d, there is a stable fixed point at x * .
Hence, the population becomes a stable mixture of A and B types. Both x = 0 and x = 1 are unstable fixed points.
• Neutrality. For a = c and b = d, the replicator dynamics predicts neutrally stable fixed points for all values of x. While this non-generic case is of limited interest in the replicator dynamics, neutral selection becomes an important reference case in the stochastic evolutionary dynamics of finite populations.
In a genetic setting, the replicator equation is obtained when individuals reproduce at a rate proportional to their fitness. In cultural settings, the replicator equation results from individuals imitating better performing actions with a probability proportional to the expected increase in the payoff. Moreover, the replicator equations are intimately connected to the Lotka-Voltera equations describing predator-prey dynamics in theoretical ecology. In fact, a direct mathematical mapping from one framework to the other exists [50].
In general, replicator equations can exhibit very rich dynamics. However, in most cases, the location and stability of fixed points can be determined analytically. In addition, symmetry properties can lead to constants of motion. In this case, the dynamics follows closed orbits. In higher dimensions, the replicator equations can also exhibit deterministic chaos [87,88,90]. However, the replicator dynamics is just one particular variant of a deterministic selection dynamics. If individuals switch to better strategies independent of the increase in the payoff, one obtains a dynamics sometimes called "imitate the better". Naturally, this would change the form of the differential equation (1.1). The replicator equation and "imitate the better" are two examples of non-innovative selection dynamics, i.e. a strategy that goes extinct will never re-appear. However, in social models, individuals could also choose the "best reply" to the current composition of the population, even if such a strategy is not present in the population. This is an example of innovative game dynamics for which equally simple differential equations as (1.1) can no longer be defined.

Evolutionary games in finite populations
While replicator equations have very nice mathematical properties and provide many important insights into evolutionary game dynamics, they essentially describe the deterministic dynamics in an infinitely large population. In general, it is not a priori clear under which circumstances this is a good approximation of the dynamics in a realistic system which is finite and subject to fluctuations. One important source of fluctuations is internal noise arising from the finiteness of the population. To answer these questions, we take the following approach: First, we describe evolutionary game dynamics as a stochastic process in a finite population. Then, we increase the population size and infer under which circumstances we recover the replicator dynamics. This also allows us to identify parameter combinations for which it is a good approximation. Moreover, we can investigate whether other limits result in qualitatively different dynamics.

Stochastic evolutionary game dynamics
Evolutionary games in finite populations have been considered for a long time in various fields such as theoretical ecology, behavioral economics or sociology. For computer simulations of multi-agent systems, this is the only natural approach to model the dynamics. In all cases, we have to specify the microscopic mechanisms which govern the transmission of strategies from one individual to another. Examples for such selection dynamics are • Pairwise comparison processes. In this class of processes, two individuals, a focal individual and a role model, are sampled at random from the population. The focal individual accepts the strategy of the role model with probability p, depending on a payoff comparison. If both individuals have the same payoff, the focal individual randomizes between the two strategies. For example, the probability p could be a linear function of the payoff difference [104], Here, w (0 ≤ w ≤ 1) is the intensity of selection, which specifies the importance of neutral drift compared to the selection dynamics. This determines the noise intensity. The functions π f and π r are the payoffs of the focal individual and the role model, respectively, and ∆π is the maximum payoff difference. For w 1, one speaks of "weak selection". Most importantly, the focal individual does not always switch to the better strategy -sometimes, it also adopts worse strategies.
One common choice of a nonlinear function of the payoff difference for p is the Fermi function from statistical mechanics, leading to Here, the intensity of selection relates to an inverse temperature and can be any positive number. For weak selection w 1, the probability p reduces to a linear function of the payoff difference. For strong selection, w → ∞, this process converges to the imitation dynamics. In this case, p becomes a step function being positive for π r > π f and negative for π r < π f . In this limit, only the order of the payoffs is important -an arbitrarily small difference in the payoffs leads to the same outcome.
• Moran process. The Moran process is a classical model of population genetics [68] and has been transferred to game theory only recently [74,101]. Here, one individual is chosen at random, but proportional to fitness. This individual produces one identical offspring. To keep the number of individuals constant, a randomly chosen individual is removed from the population before the offspring is added. The Moran process represents a simple birth-death process. To illustrate the selection mechanism, it is instructive to think of a roulette wheel in which the size of the different fields is proportional to the fitness. Fitness is a convex combination of a background fitness (usually set to one) and the payoff from the game, i.e. f = 1 − w + wπ. Again, w determines the intensity of selection. For w = 0, selection is neutral and we have an undirected random walk. For w → 1, fitness equals payoff. However, if the payoffs π can become negative, there is a maximum intensity of selection, because the fitness has to be positive. This restriction can be overcome if fitness is defined as an exponential function of payoff, f = exp [wπ]. In this case, the selection intensity w can take any positive value [111].
• Wright-Fisher process. The Wright Fisher process has its roots in population genetics as well. In contrast to the selection dynamics in the Moran process, where only one individual reproduces at a time, the Wright-Fisher process reflects discrete generations. In every generation, each of the N individuals produce a large number of offspring, proportional to their fitness. From this large offspring pool, a new generation again of size N is randomly sampled. Thus, the composition of the population can change much faster. In principle, the population could go back to a single ancestor in a single generation. This reflects the fact that the Wright-Fisher process is not a simple birth-death process, but a more general Markov process. Although it becomes very similar to the Moran process under weak selection, the fixation probabilities (see next section) cannot be calculated exactly [54].
The replicator equation determines how the frequencies of strategies in the population change: For each point in state space, the direction of selection and its velocity is determined. For finite populations, we have to deal with probabilities instead. Moreover, the state space is discrete. In this discretized space, we can calculate into which direction the system will evolve with what probability. This imposes significant restrictions on analytically accessible results. However, the general properties can already be inferred from the simplest possible case, consisting of only two strategies.

Fixation probabilities
For non-innovative game dynamics, we have two absorbing states: either all individuals are of type A or of type B. One important determinant of the dynamics is given by the probabilities of fixation: If a mutation leads to a new strategy, how likely is it that this individual takes over the entire population? For the sake of simplicity, let us focus on birth-death processes in which only a single individual reproduces at a time (we thus exclude processes as the Wright-Fisher process). We consider a population of size N where the number of A players is j and the number of B players is N − j. The probability to increase the number of A individuals from j to j + 1 is T + j . Similarly, T − j is the probability to decrease j by 1. Our goal is to calculate the fixation probabilities φ j , i.e. the probability that j individuals of type A succeed and take over the population. For the absorbing states, we have For the intermediate states, the fixation probabilities are given by We can rearrange this to This equation can be written as a recursion for the differences between fixation Using this iteration, we find . . .
As usual, the empty product is one, ∏ 0 j=1 γ j = 1. Let us now calculate the sum over all y j . This sum is a "telescope-sum" and simplifies to (1.14) Using Eqs. (1.12) and (1.14), we can finally calculate φ 1 , Hence, the fixation probability of a single A individual, φ 1 , is given by For T − j = T + j , we have γ j = 1. Hence, all products are simply one and we find φ 1 = 1/N. This is the case of neutral selection, where all individuals have the same fitness. Any random walk in which the probability to move to the left or to the right is identical for the transient states leads to the same result.
So far, we have focused on the fixation probability of a single mutant in a resident population, φ 1 . In general, the fixation probability φ i is given by For neutral selection, we have T + j = T − j , which results in γ j = 1. In this case, the fixation probability reduces to φ i = i/N.
Formally, the fixation probability can be calculated in systems in which the replicator equation predicts coexistence, i.e. no fixation. However, it can also be shown that in these cases, the average time until fixation grows exponentially with increasing population size [3] and increasing intensity of selection [109].
Often, the comparison between the probability that a single A individual takes over a population of N − 1 resident B individuals, ρ A = φ 1 , and the probability that a single B individual takes over a population of N − 1 resident A individuals, ρ B , is of interest in order to determine in which state the system spends more time [71]. Formally, the probability ρ B is equal to the probability that N − 1 individuals of type A fail to take over a population in which there is just a single B individual. Hence, we find Therefore, the ratio of the two fixation probabilities is given by For small mutation rates, ρ B < ρ A means that the system spends more time in the A state, because less invasion attempts are necessary to reach fixation by A. The A mutants have a higher probability to reach fixation in a B population compared to B mutants in an A population.

Fixation times
Another quantity of interest in evolutionary dynamics of finite population is the average time until fixation occurs [24]. For two strategies, three different fixation times are of interest: (i) The average time t j until either one of the two absorbing states, A or B, is reached when starting from state j. This is the unconditional fixation time. For weak selection, this time increases with the distance between j and the two absorbing boundaries.
(ii) The conditional fixation time t A j specifies the average time it takes to reach the absorbing state A when starting from state j, provided that A is ultimately reached. The time t A j increases with the distance between the states j and A. If fixation of strategy A is almost certain, t A j is very similar to the unconditional fixation time t. Of particular interest is t A 1 , or t A for short, which denotes the average fixation time of a single A mutant in a resident B population.
(ii) In analogy to t A j , t B j represents the average time to reach the absorbing state B when starting in state j (i.e. with j individuals of type A and N − j of type B), provided that B is ultimately reached. t B j increases with the distance between state j and B.
Unconditional fixation time. The unconditional average fixation time t j , starting from state j, is determined by This equation can be rationalized as follows: In one time step (this results in the 1), the process can either move to j − 1, stay in j or move to j + 1. Then, the fixation time from that state matters. When we start in 0 or in N, fixation has already occurred, thus t 0 = t N = 0. Eq. (1.26) can be written as (1.27)

Evolutionary games in finite populations 11
With the notation γ j = T − j T + j from above, iteration yields . . .
For the sum of the z k , we find In particular, we have for j = 1 From this, the first fixation time, t 1 , is obtained Here, φ 1 is the fixation probability given by Eq. (1.16). Thus, the average unconditional fixation time for general j is finally given by It is important to notice that the variance of these fixation times is usually high, depending on the population size, the game and the intensity of selection [20,109]. In particular for coexistence games, where the replicator dynamics predicts a stable coexistence of A and B, the fixation times do not only diverge with the population size and the intensity of selection, but they represent averages of a very broad distribution [109].

Conditional fixation times.
Given that the process reaches the absorbing state with A individuals only, how long does this take when starting in state j? To calculate this time t j A , we follow Antal and Scheuring [3]. It is convenient to start from Here, φ j is the fixation probability of j individuals of type A, see Eq. (1.20).
With the abbreviation θ A j = φ j t A j , we can write this as Eq. (1.36) has the same structure as Eq. (1.27). Thus, we can use a similar iteration as above to obtain At the lower boundary, we have θ A 0 = 0, because φ 0 = 0. We also have θ A N = 0 at the upper boundary, because t A N = 0. Summing over w k leads to ∑ N k=j+1 w k = −θ A j . In particular, for j = 1, we obtain Often, this is the quantity of interest, because it corresponds to the average time it takes for a single mutation to reach fixation in the population. For general j, we have Of course, this quantity can also obtained from Eq. (1.38) by symmetry arguments. Finally, we obtain for the time until fixation of B when starting from an arbitrary number of B individuals This formulation is valid for general birth-death processes. In addition to the fixation probabilities, the two types of fixation times are of particular interest to characterize the evolutionary process because they represent global quantities that include information on all transition probabilities.

The Moran process and weak selection
As a specific example, let us consider the frequency dependent Moran process [74,101]. Apart from calculating the above quantities for a specific case, our goal is to find simpler expressions for the fixation probabilities under weak selection. In this case, we are close to neutral selection, which seems to be a biologically relevant limit [17,78]. First, we need to specify the payoffs of the two types A and B. The payoffs of A and B individuals, π A and π B , are given by Here, we have excluded self interactions, i.e. in a population of j individuals of type A, each one of them interacts with j − 1 others of its type. Fitness is assumed to be a linear combination of background fitness (which we set to 1) and the payoff, The transition probabilities are For the ratio of the transition probabilities, we have Let us now consider the limit of weak selection, i.e. w 1, and derive an approximation for the fixation probability φ 1 . For weak selection, γ j simplifies to The product in Eq. (1.16) can then be simplified to (1.53)

Evolutionary games in finite populations 15
Next, we introduce a new notation for π A − π B . From Eqs. (1.45) and (1.46), we find With this we can solve the sum over the payoff difference, Now we have derived a simple form for ∏ k j=1 γ j under weak selection. Let us analyze the ratio of fixation probabilities: For Ξ > 0 we have ρ A > ρ B . For large populations, N 1, we can approximate which is equivalent to As we have discussed above, this condition indicates risk dominance and establishes a relation to fixation probabilities: For weak selection, strategies with higher fixation probabilities have greater basins of attraction.
Inserting Eq. (1.55) into Eq. (1.16), we obtain an approximation for the fixation probability of a single A individual: The same fixation probability under weak selection is found for a large variety of processes [54,60,104]. For general i, we have Let us now compare the fixation probability φ 1 to the result for neutral selection, w = 0. This leads to the so called 1/3-rule. Neutral selection means that we have no selective forces and that only randomness determines fixation. In this case, we have φ 1 = 1/N. Since we are only interested if the fixation probability is larger or smaller than 1/N, we have to consider only the sign of Γ. If Γ > 0, the fixation probability is larger than 1/N. For large N this condition reduces to This condition is equivalent to (1.63) The 1/3-rule states that "In a coordination game, the fixation probability of a strategy under weak selection is larger than 1/N, if the unstable fixed point is closer than 1/3 to the strategy to be replaced". The intuitive justification of this rule goes back to the fact that during invasion, a single invader will interact on average 1/3 with its own type and 2/3 with the other type [79]. If we increase the advantage of strategy A in such a coordination game systematically (e.g. by increasing the payoff against itself), and hence shifting the mixed equilibrium x * to lower values, the following scenarios occur [74]: A is disadvantageous and B is advantageous (ρ A < 1/N and ρ B > 1/N) 2/3 > x * > 1/2 B is risk dominant, but both A and B are disadvantageous (ρ A < ρ B , ρ A < 1/N and ρ B < 1/N) 1/2 > x * > 1/3 A becomes risk dominant, but both A and B remain still A is advantageous and B is disadvantageous Interestingly, a analogous condition as the 1/3-rule also holds for coexistence games. In this case, the stable interior fixed point has to be closer than 1/3 to the strategy that is reached during fixation. In other words, "In a coexistence game, the fixation probability of a strategy under weak selection is larger than 1/N, if the stable fixed point is further than 2/3 to the strategy to be replaced". However, fixation probabilities are only of limited interest here, as fixation times become very large for large populations. The fixation times under weak selection are discussed in [2].

The Fermi process
The Moran process leads to simple analytical results under weak selection but no similar simplifications are possible for higher selection strengths. In contrast, a pairwise comparison process with p given by the Fermi function of the payoff difference (see above) admits simple analytical results for any intensity of selection. The transition probabilities are (1.64) The analytical accessibility of this process is based on a very simple ratio of these transition probabilities, (1.65) In the weak selection limit, w 1, we recover Eq. (1.52). Thus, the fixation probabilities are identical to the Moran process and the 1/3 rule remains valid. For arbitrary values of w, let us return to the ratio of fixation probabilities: Here, Ξ is defined as in Eq. (1.56). Again we have ρ A > ρ B for Θ > 0. For large N, we find again that ρ A > ρ B is equivalent to x * < 1 2 . But now, the relation between the fixation probabilities and risk dominance is valid for arbitrary intensities of selection, not only for weak selection.
The expressions for fixation probabilities simplify, because the products over γ j reduce to sums that can be solved exactly. One special case is determined by frequency independence of the payoff difference a − c = b − d. This case has been termed "equal gains from switching", because switching from strategy B to A leads to the same payoff change, irrespective of the opponents move [75]. In this special case, even the outer sum in Eq. (1.20) can be solved exactly for any w. We find This result is identical to the fixation probability of k individuals with fixed relative fitness r = e wv [17,24]. Thus, a game with equal gains from switching has the same fixation properties as constant selection in frequency independent settings with fixed fitness values. Since the Fermi process only depends on payoff differences, this is no surprise. But it also shows that properties of constant selection apply not only for the Moran Here, erf(x) = 2 √ π x 0 dy e −y 2 is the error function and Q k = w(N−1)

2u
(ku + v) with u, v as in Eq. (1.54) [107]. The result is valid for u = 0 and in the limit of u → 0, it reduces to Eq. (1.67). In the weak selection limit, w → 0, Eqs. (1.68) and (1.67) recover the neutral selection result φ k = k/N. Numerical simulations of the fixation probabilities agree very well with this approximation and hold even for small populations where the approximation of sums by integrals becomes inadequate (see Fig. 1.2).
The Fermi process covers all intensities of selection and leads to strong selection results that are outside the realm of the standard Moran process. The closed expressions allow to derive approximations for the fixation probabilities under weak and under strong selection. As for the Moran process, the time to fixation grows exponentially with N for games with internal Nash equilibria, such that fixation will practically never occur. Here, it also grows exponentially with the intensity of selection w.

From finite to infinite populations (and back again)
So far, we have introduced two descriptions for evolutionary game dynamics: The deterministic replicator dynamics for large populations and stochastic evolutionary game dynamics in finite populations. Here, we discuss how both dynamics are related to each other. In the limit of large N, this is accomplished by performing a Kramers-Moyal expansion of the Master equation [30,57]: where P τ j denotes the probability to be in state j at time τ. To consider large N, we introduce the notation x = j/N, t = τ/N and the probability density ρ(x, t) = N P τ (j). For the transition probabilities, we replace T ± j → T ± (x). This yields For N 1, the probability densities and the transition probabilities are expanded in a Taylor series at x and t. More specific, we have Let us now look at the terms depending on their order in 1/N. The terms independent of 1/N cancel on both sides of Eq. (1.70). The first non-vanishing term is of order 1/N. On the left hand side, we have the term ∂ ∂t ρ (x, t) and on the right hand side, we have This term describes the average motion of the system. In physics, it is called the drift term but in biology, it is referred to as selection term. Next, we consider terms of the order 1/N 2 . On the right hand side, we have This second term, called diffusion in physics, leads to a widening of the probability distribution in the course of time. In biology, it is called genetic or neutral drift, which can be a source of confusion. In the following, higher order terms will be neglected. Thus, we can approximate Eq. (1.70) by This is the Fokker-Planck equation of the system, which describes the deterministic time evolution of a probability distribution. Equivalently, one can describe the process by a stochastic differential equation that generates a single trajectory. If the noise is microscopically uncorrelated, as in our case, the Itô calculus has to applied [30]. In this framework, the Fokker-Planck equation above corresponds to the stochastic differential equatioṅ where ξ is uncorrelated Gaussian noise, a(x) is the drift term (selection in biology). In general, the diffusion term b(x) (genetic drift in biology) depends not only on the composition of the population, but also on the payoffs. However, for many processes, the payoff dependence vanishes. In particular for weak selection, b(x) is independent of the payoffs. Note that the noise is multiplicative and that the drift term vanishes at the boundaries x = 0 and x = 1, which is important to avoid that these boundaries are crossed. For additive noise, processes leading to x < 0 or x > 1 have to be excluded artificially [110] For N → ∞, we have b(x) → 0 and only the term a(x) determines the dynamics. This case reduces to the deterministic differential equation, and recovers the replicator equation [104] (see Fig. 1.3). The same procedure also works for more than two strategies, although in this case, the mathematics is more tedious [105]. A similar procedure can also be applied to spatially extended systems, where a stochastic partial differential equation is obtained [83,84]. Note that we have only considered the limit N → ∞, keeping everything else fixed. To perform a thermodynamical limit, the intensity of selection w has to be scaled with N [9]. The approximation of the process for large N can be used to address the evolutionary dynamics in large populations under weak selection. For example, we can verify the 1/3-rule. Starting from the Fokker-Planck equation, the probability of fixation can be written in terms of the drift and diffusion coefficients as see [24,30,108]. For neutral selection, we have a(z) = 0 and thus φ j = j N . In general, the comparison of the full fixation probability to neutral selection has to be done numerically. In the limit of weak selection, w 1 the 1/3rule is recovered when comparing the fixation probability of a small group of mutants to neutral selection [108]. More precisely, the 1/3 rule is obtained for Nw 1. For Nw 1, the result expected from the replicator equation is recovered: A disadvantageous rare strategy will never reach fixation with a significant probability.

Applications
Complementing the general theory of evolutionary game dynamics we now turn to the two most important applications in evolutionary biology and across behavioral sciences: the problem of cooperation and the maintenance of biodiversity. In game theory, cooperation refers to behavioral actions that benefit others at some cost to the actor. Thus, groups of cooperating individuals fare better than groups of non-cooperating defectors. However, each individual faces the temptation to defect and free-ride on the benefits produced by others. This generates a conflict of interest between the individuals and the group, which characterizes social dilemmas [18,21,43]. Social dilemmas are abundant in nature. They represent a recurrent theme ranging from defense formations in musk oxen to defend their young against wolves [36], sentinel behavior in meerkats [13], predator inspection in fish [65,81], grooming in baboons [89,96], protein production in phages [113,114] to microorganisms producing extra-cellular products such as enzymes in yeast [33], biofilms [82] or antibiotic resistance [70], to name only a few prominent examples. However, social dilemmas also occurred on evolutionary scales and life could not have unfolded without the repeated incorporation of lower level units into higher levels entities. Every resolution of a social dilemma marks a major transition in evolutionary history: the formation of chromosomes out of replicating DNA, the transition from unicellular to multicellular organisms or from individuals to societies all require cooperation [63]. In human interactions, social dilemmas are equally abundant in terms of social security, health care and pension plans but even more importantly when it comes to the preservation of natural resources from local to global scales, including drinking water, clean air, fisheries and climate [37,66,67].
The viability of ecological systems is determined by the biodiversity, which includes species, habitat and genetic diversity [48,97,103]. Species coexistence is promoted by non-hierarchical, cyclic interactions where R beats S beats P beats R, just as in the children's game Rock-Scissors Paper. This occurs in bacterial strains of E. coli, where a neutral strain is eliminated by a toxin producing strain, which is then outgrown by an immune but non-toxic strain, which is in turn outgrown by the neutral strain and so on. Further examples of cyclic dominance hierarchies include mating strategies in lizards [94,95] or competition for space in coral reef invertebrates [55] and links to the problem of cooperation if participation in social dilemmas is voluntary rather than compulsory [39,40,92] (see Sect. 1.5.3).

The Prisoner's Dilemma
Let us begin with the Prisoner's Dilemma, which has a long tradition as a mathematical metaphor to analyze the problem of cooperation [4,5]. In the Prisoner's Dilemma, two players can choose between cooperation and defection. A cooperative act costs c > 0, but leads to a benefit b > c for the other player. Thus, the highest payoff, b, is obtained when only the partner is cooperating. In this case, the partner obtains −c. Mutual cooperation leads to b − c and mutual defection a zero payoff. The game is characterized by the payoff matrix The Prisoner's Dilemma represents the most stringent form of a social dilemma because the strategy D dominates strategy C. No matter what the opponent does, one should defect since b > b − c and 0 > −c. Unilateral deviation from mutual defection decreases the payoff and hence mutual defection represents the only Nash equilibrium [51,69] but mutual cooperation corresponds to the social optimum (b − c > 0). Note that the parametrization in terms of costs and benefits represents the most intuitive and mathematically convenient form of the Prisoner's Dilemma. However, it is equally important to note that this reflects a special case because the sum of the diagonal elements equals the sum of the non-diagonal elements of the payoff matrix. In other words, the game is an example of "equal gains from switching" (see section 1.3.5). This property leads to a payoff difference between cooperators and defectors, π C − π D = −c, that is independent of the fraction of cooperators x C . In this special case the replicator dynamics readṡ and can be solved exactly: The fraction of cooperators x C is always decreasing and converges to the only stable fixed point x C = 0. Cooperators are doomed and disappear.
In finite populations and under weak selection, w 1, we find, in agreement with Eq. (1.61), for the fixation probability of i cooperators in a population of N − i defectors Since φ i < i N , cooperators are at a disadvantage compared to neutral mutants. Similarly, for strong selection, we find from the Fermi process in the limit w → ∞ the fixation probabilities φ i = δ i,N . In other words, cooperation cannot evolve from individual selection alone.
The stark contrast between theoretical predictions of the Prisoner's Dilemma and the observed abundance of cooperation in nature calls for explanations. Over the last decades, a number of mechanisms capable of promoting cooperation in biological and social systems have been proposed [21,72]. Among related individuals, cooperators may thrive due to kin selection [35] and competition among groups may promote cooperation through group selection [26,106,116,117]. Conditional behavioral rules that strategically respond to previous encounters in repeated interactions or adjust their behavior according to an individuals' reputation in non-repeated settings can establish cooperation through direct [112] or indirect reciprocity [76]. Local interactions in structured populations support cooperation in the Prisoner's Dilemma [73,80] but not necessarily in other social dilemmas [41]. Finally, extensions of the strategy space that enable individuals to abstain from social dilemmas and render participation voluntary or options to punish non-cooperating interaction partners both support cooperation [40,45] (see Sects. 1.5.3, 1.5.4).

Rock-Paper-Scissors
Rock-paper-scissors games are the simplest example of cyclic dominance, where any strategy can be beaten by another one: Rock crushes scissors, scissors cut paper and paper wraps rock. This simple game not only entertains children (and adults [52]) but equally serves as a mathematical metaphor to investigate the dynamics and maintenance of biodiversity [83,99,100]. The game can be characterized by the matrix (1.83) This parametrization assumes symmetric strategies but the payoff for winning (+1) is not necessarily equal to the payoff for losing (−s < 0). For the standard choice s = 1, we have a zero-sum game -one player's gain is the other ones' loss. Apart from the three trivial homogeneous equilibria, the replicator dynamics admits a non-trivial equilibrium at x * = (x R , x P , x S ) = ( 1 3 , 1 3 , 1 3 ). The dynamics of the system is determined by the Lyapunov function (1.84) If the determinant of the payoff matrix (1.83), d = 1 − s 3 , is positive, then ∂H ∂t < 0 and the interior fixed point x * is asymptotically stable. For d < 0, the fixed point x * is unstable and the system approaches a heteroclinic cycle along the boundary of the simplex S 3 . Finally, for the zero-sum game with s = 1, the function (1.84) is a constant of motion, and the system infinitely oscillates around x * , see Fig. 1.4.
In finite populations, the dynamics is stochastic but characteristic features can be derived from the average drift towards the internal fixed point [11]. For large N, the average drift of the Moran process computed over the entire simplex is given by For N → ∞, the replicator equations lead to ∆H = 0 for zero-sum games (s = 1) as well as for neutral selection (w = 0). In finite populations, we obtain ∆H N = 1 20N 2 > 0 in both cases instead. For s = 1, stochasticity turns the neutrally stable, closed orbits of infinite populations into an unstable system by introducing a drift towards the heteroclinic cycle. Only in the limit N → ∞, the neutrally stable orbits characterized by ∆H = 0 are recovered from the Moran process or other forms of finite population dynamics. However, even in the infinite system it is not trivial to numerically determine these closed orbits of the replicator equation and the numerical integrator has to be chosen with great care [49].
For s < 1, the sign of ∆H N depends on the intensity of selection w, the payoff parameter s as well as on the population size N. This leads to a critical population size Since 42 is the answer to life, the universe, and everything, this result is not surprising [1]. For N < N c , the system cycles towards the boundaries and fixation is expected to be fast. For N > N c , the system converges towards x * on average. This game is an example of a system that changes its qualitative dynamics if the population falls below a certain threshold. Such thresholds are often found in other evolutionary games in finite populations [10,74,101,104].

Voluntary Public Goods Games
So far, we focussed on interactions among pairs of individuals. Now, we turn to Public Goods Games [56] in which a group of M players interact. Public Goods Games represent a generalization of pairwise Prisoner's Dilemma interactions to interaction groups of arbitrary size M [44].
In typical Public Goods experiments, M individuals have the opportunity to cooperate and invest a fixed amount c into a common pool or to defect and invest nothing. The total investment is multiplied by a factor r and distributed equally among all participants -irrespective of whether they contributed or not. Thus, every invested unit returns rc/M units to the investor (as well as to all other participants). If r < M then rational players withhold their investments because they are costly -but if all participants reason in this manner, no investments are made and the group foregoes the benefits of the public good. In contrast, had everybody cooperated, they would have been better off with a return of (r − 1)c. Again we have a social dilemma and the Nash equilibrium is different from the social optimum. However, if r > M then investments have a positive net return, and rational players will invest in the public good [43].
In infinite populations with a fraction x cooperators and y defectors (x + y = 1) the average payoff of defectors is π D = (M − 1)xrc/M and of cooperators it is π C = π D − (1 − r/M)c. Thus, for r < M cooperators decline and eventually disappear because π C < π D . However, for r > M cooperators dominate (π C > π D ) and eventually displace defectors. In this case cooperation evolves as a by-product [15].
The above analysis is based on the assumption of compulsory participation in public goods interactions but what happens if participation is voluntary and risk averse individuals may choose to abstain? This situation can be modeled by introducing a third strategic type, the non-participating loners [39,40]. Loners obtain a fixed payoff σ, which lies between the payoff in groups consisting solely of cooperators, (r − 1)c, and the payoff in groups of defectors (which is zero). Interaction groups are randomly formed by sampling M individuals from an infinite population with a fraction x cooperators, y defectors and z loners. Thus, the effective interaction group size S of the Public Goods Game decreases with increasing abundance of loners. If only a single individual participates in the Public Goods interaction, the game does not take place and the individual is forced to act as a loner. The average payoffs of defectors, cooperators and loners are given by [39]: Note that with few loners, z → 0, defectors dominate cooperators, π D > π C , but for z → 1, cooperators outperform defectors, π C > π D . This generates a Rock-Scissors-Paper type cyclic dominance among the three strategies: if cooperators abound it pays to defect and if defection is common it is best to abstain but this reduces the effective interaction group size S until eventually r > S holds and cooperators thrive, which in turn increases S, restores the social dilemma and the cycle continues, see Fig. 1.5b. By definition S ≥ 2 must hold because a single participant (S = 1) is unable to sustain the public good. Therefore, the above reasoning requires r > 2. In this case, a heteroclinic orbit along the boundary of the simplex S 3 reflects the cyclic dominance of the three strategies and in the interior a neutrally stable fixed point Q exists, which is surrounded by closed orbits such that the system exhibits stable periodic oscillations of the strategy frequencies, see Fig. 1.5b. For r ≤ 2, the heteroclinic orbit still exists but the interior is filled with homoclinic orbits of the state with all loners, z = 1. Therefore, only brief intermittent bursts of cooperation are observed before the system returns to the loner state, see Fig. 1.5a. In order to allow for a compact analytical description of the stochastic dynamics in finite populations, we assume small mutation rates µ such that a strategy reaches fixation or extinction much faster than mutants are produced [29,45,53]. This is fulfilled if µ is much smaller than the inverse of the squared population size. Thus, the system is usually homogeneous and only occasionally switches from one homogeneous state to another. The dynamics is essentially reduced to a stochastic process along the boundaries of the discretized simplex S 3 and we can approximate the system by an embedded Markov chain on the pure states of the system, C, D and L. The average time the system spends in each state depends on the updating process, the intensity of selection as well as on the game parameters. For simplicity, let us consider imitation dynamics (c.f. Eq. (1.6) in the limit of strong selection, w → ∞). In this case, a single defector takes over a cooperator population with probability 1. Similarly, the probability that a single loner takes over a population of defectors is also 1. Finally, a loner population is taken over by cooperators with probability 1/2. This is because the first cooperator is neutral (no Public Goods games take place) and disappears with the same probability as it gets imitated. However, as soon as there are two cooperators, they have an advantage and eliminate the loners with certainty. This leads to the transition matrix Note that the system stays e.g. in state C with probability 1/2 because the probability that the mutant is an unsuccessful loner is 1/2. Under imitation dynamics the transition matrix is parameter independent as long as the cyclic dominance applies (which only requires r < M and 0 < σ < r − 1). The stationary distribution P is given by the eigenvector corresponding to the eigenvalue 1 of this stochastic matrix, P = (P C , P D , P L ) = ( 1 4 , 1 4 , 1 2 ). Thus, the system spends 50% of the time in the loner state and 25% in the cooperator and and defector states, respectively. In compulsory interactions, i.e. in the absence of loners, the system would spend essentially all the time in the defector state. Interactive Java simulations of this system can be found online [38].
In summary, voluntary participation in Public Goods Games provides an escape hatch out of states of mutual defection. This maintains cooperation, but fails to stabilize it. The cyclic dynamics of voluntary Public Goods Games has been confirmed in behavioral experiments [92]. In the next section, we demonstrate that the time spent in cooperative states can be vastly extended by introducing opportunities to punish defectors.

Punishment
Punishment is ubiquitous in nature ranging from bacterial colonies to human societies [12,23,25,27,34,93]. In game theoretical terms, punishment is defined as behavioral actions that impose a fine β on a co-player at some cost γ < β to the actor. Punishment enables cooperators to retaliate against noncooperating defectors and therefore seems capable of stabilizing cooperation. However, this raises a second-order social dilemma because non-punishing cooperators outperform those that do punish. Thus, in an evolving population, mild cooperators undermine the punishers' efforts and pave the way for the successful invasion of defectors. Moreover, if punishers are rare, they suffer tremendous costs from punishing left and right, while inflicting little harm on the defecting members of the population and hence it remains unclear how punishment behavior could have gained a foothold in a population. Colman aptly summarizes this by stating: "we seem to have replaced the problem of explaining cooperation with that of explaining altruistic punishment" [14].
In the previous section we demonstrated that voluntary participation in Public Goods Games promotes cooperation without being able to stabilize it. Here we extend this setting by introducing a fourth strategic type, the punishers. Punishers are individuals that cooperate but, in addition, punish defectors. The combination of volunteering an punishment was originally proposed by Fowler [28], but it turns out that the replicator dynamics in infinite populations is unsuitable to draw clear-cut conclusions because the system is bi-stable (i.e. the evolutionary end state depends on the initial configuration) and also structurally unstable (i.e. the evolutionary dynamics may undergo significant changes upon introducing stochastic components) [6].
In the following, we consider the stochastic dynamics of volunteering and punishment in Public Goods Games in finite populations [45,46]. As in the case without punishment, we take the limit of small mutation rates and strong selection. Again, this implies that the population is homogeneous most of the time, i.e. in states C, D, L or P. An occasional mutant will have taken over the population or disappeared before the next mutation arises. Therefore, the dynamics is determined by a Markov chain based on the different transition probabilities. In the limit of strong selection, the derivation of these transition probabilities is particularly simple: (i) in the cooperator state C, a single defector is advantageous and takes over the population with probability 1. Loners are disadvantageous and cannot invade. Punishers can invade through neutral drift with probability 1 N . (ii) in the defector state D, a mutant cooperator or punisher is disadvantageous and disappears. Loners are advantageous and take over with probability 1. (iii) in the loner state L, the dynamics is neutral if a mutant of any type arises. With probability 1/2 another individual adopts the mutant strategy (or the mutant disappears with the same probability). A pair of mutant cooperators or punishers is advantageous and takes over but a pair of defectors is disadvantageous and at least one disappears. (iv) in the punisher state P, both defectors and loners are disadvantageous. The former because they are punished and the latter because they do not take advantage of the common good. However, cooperators obtain the same payoff as punishers and can take over through neutral drift with probability 1 N . This yields the transition matrix Thus, for large N, the system spends almost all the time in the punisher state. The reason is that the transition leading away from the punisher state is neutral and thus very slow compared to all other transitions. The punisher state is the only pure Nash equilibrium, but it is not a strict Nash equilibrium, as cooperators are equally well off. Despite the vanishing time the system spends in the loners' state, voluntary participation plays a pivotal role for cooperation and punishment because it provides recurrent opportunities for establishing social norms based on punishing non-cooperating defectors, see Fig. 1.6. In contrast, in compulsory Public Goods Games, i.e. in the absence of loners, the cyclic dominance of C, D, and L is missing and once cooperation breaks down, it cannot get re-established, see Fig. 1.6. Interestingly, punishment emerges only if the participation in Public Goods Games is voluntary. This conclusion nicely relates to recent experiments, where individuals can choose whether to join a Public Goods Game with or without punishment, they voluntarily commit themselves to the sanctioning rules [34]. For interactive simulations of volunteering and punishment, see [38].
This approach to punishment, which is most common in behavioral economics, raises moral concerns because enforcing cooperation through peerpunishment means that individuals take the law into their own hands, but mob law is clearly socially unacceptable. (a) For the voluntary Public Goods Game, a cyclic dominance between cooperators, defectors and loners emerges. We find that the system spends 50% in the Loner state and 25 % in the cooperator and defector states, respectively. This result is independent of all parameters. (b) In voluntary Public Goods Games with punishment, punishers can invade the loner state. The system then spends a long time in the punisher state because only cooperators can invade and only through neutral drift. Once the system is in the cooperator state it is prone to invasion by defectors and may undergo several cooperator-defector-loner-cycles before punishment is re-established. In the long run, punishers dominate the population most of the time. (c) In compulsory Public Goods Games with punishment, the ultimate outcome is defection. Even when starting in the punisher state, cooperators can invade by neutral drift and once defectors take over, the system has reached its evolutionary end state (population size N = 92).

Concluding remarks
This review mainly focusses on the particularly insightful class of 2 × 2 games. We have analyzed the stochastic dynamics of evolutionary games in finite populations, as it is, for example, described by the Moran process. The connection to the traditional description of evolutionary games by the deterministic replicator equation is established through approximations in the limit of large populations.
As applications and extensions of the theoretical framework, we provide brief excursions into interactions with more strategic options, as in the case of Rock-Scissors-Paper games, which are relevant in the context of biodiversity, as well as to interactions among larger groups of individuals to address the problem of cooperation in the Prisoner's Dilemma and in Public Goods Games with voluntary participation and/or punishment opportunities. Other important games that have not been covered here include the Snowdrift Game [22,41], where cooperation is not strictly dominated by defection, and the Minority Game, which turned into a paradigm for simplified market models [7,8,16].
Further important directions of the field include spatial games, which have recently been summarized in an excellent review by Szabó and Fáth [98], as well as recent advances in ecological games with variable population densities [42,47] and for games with continuous strategy spaces [22,59] based on adaptive dynamics [19,31,64].
Over the past few years, the tremendous progress of our understanding of evolutionary dynamics can be largely attributed to numerous insights gained from stochastic dynamics in finite populations as well as from considering the analytically accessible limits of weak selection and rare mutations. The often counter intuitive results are inaccessible from traditional approaches based on replicator equations.
Stochastic evolutionary game dynamics is more difficult to handle analytically as compared to deterministic approaches such as the replicator dynamics. Nonetheless, it is a very powerful tool, because it implements a natural source of noise that actually renders the results more robust. For example, in bistable systems it allows to calculate transition rates between the different states rather than concluding that the dynamics depends on the initial conditions. Most importantly, any real population is subject to noise and incorporating such essential features into game theoretical scenarios significantly improves their relevance in modeling the real world.