PLoS Computational Biology
Home Freedom to choose between public resources promotes cooperation
Freedom to choose between public resources promotes cooperation
Freedom to choose between public resources promotes cooperation

The authors have declared that no competing interests exist.

Article Type: research-article Article History
Abstract

As cooperation incurs a cost to the cooperator for others to benefit, its evolution seems to contradict natural selection. How evolution has resolved this obstacle has been among the most intensely studied questions in evolutionary theory in recent decades. Here, we show that having a choice between different public resources provides a simple mechanism for cooperation to flourish. Such a mechanism can be at work in many biological or social contexts where individuals can form different groups or join different institutions to perform a collective action task, or when they can choose between collective actions with different profitability. As a simple evolutionary model suggests, defectors tend to join the highest quality resource in such a context. This allows cooperators to survive and out-compete defectors by sheltering in a lower quality resource. Cooperation is maximized, however, when the qualities of the two highest quality resources are similar, and thus, they are almost interchangeable.

How is selfishness curbed in many biological populations to solve collective action problems? A simple answer to this question arises by noting that, in many populations, individuals can join different groups to perform a collective action task. Similarly, individuals often face situations where they can join different collective action tasks with different profitability. As we show here, this provides a natural mechanism for solving collective action problems. In such contexts, defectors predominantly join the higher quality public resource. This enables cooperators to survive and out-compete defectors by working cooperatively in a lower quality resource. However, cooperation is maximized when different public resources have similar qualities, and thus, similar attractiveness for the individuals.

Salahshourand Hilbe: Freedom to choose between public resources promotes cooperation

Introduction

The public goods game, also known as n person prisoner’s dilemma, has been one of the paradigms used in many studies on the evolution of cooperation [121]. This game is played among n individuals. Each individual can either cooperate or defect. Cooperators contribute an amount c to a public good. Defectors contribute nothing. All the contributions are multiplied by an enhancement factor r < n and are distributed equally among the players. When played in an evolutionary context in a well-mixed population, defectors, not paying the cost of cooperation, reach the highest payoff and dominate the population. However, contrary to this expectation, empirical evidence from bacteria to animals and humans suggests a high level of cooperation has evolved in the course of evolution [2225]. As a result of many attempts to resolve this apparent paradox, some mechanisms which are capable of promoting cooperation in public goods game have come into the light [2629]. Examples include indirect reciprocity, such as reputation effects [1, 2], direct reciprocity [3, 4], network and spatial structure [57], voluntary participation [79], reward [1014], and punishment [1521].

As we show here, freedom to choose between different public resources provides yet another road to the evolution of cooperation. When having a choice between multiple public resources, individuals can form sub-groups of varying sizes. In sufficiently small sub-groups, cooperation becomes dominant. This leads to the evolution of cooperation in the population. This mechanism can be at work in a situation where individuals can choose between different public resources to perform a collective action task. Such a situation can naturally occur in many examples of collective action dilemmas observed in animal and human societies [30]. For instance, different public resources can be different collective actions with different profitability, different groups an individual can join to perform a collective action task, such as fishing or foraging [30, 31], or different places or groups an individual can join to perform an economic activity [3235]. As our analysis shows, in such a situation, defectors tend to join the highest quality public resource. This enables cooperators to survive and out-compete defectors by sheltering in a lower quality public resource. This phenomenon is reminiscent of some arguments according to which cooperative strategies fare better in harsh environments [3638]. However, cooperation is maximized when the two highest quality public resources have similar qualities, and thus, similar attractiveness for the individuals. Thus, our results show that being able to choose between different collective action tasks provides a natural mechanism for solving collective action problems.

The model

To see how the freedom to choose between different public resources promotes cooperation, we consider a general framework where n ≥ 2 public resources with enhancement factors r1 to rn exist. For simplicity, we begin with a case where two different public resources with enhancement factors r1 and r2 exist. More precisely, we consider a population of N individuals, each having a strategy s (which can be cooperation (C), or defection (D)), and a preferred game i (which can be game 1 or game 2). At each time step, groups of g individuals are formed at random from the population pool. Individuals in each group enter their preferred public goods game, play the game, and derive payoffs according to the outcome of the game. In addition, they receive a base payoff π0 from other activities not related to the public goods game. After playing the games, individuals reproduce with a probability proportional to their payoff. The new generation replaces the old one such that the population size remains constant. Offspring inherit the strategy and the preferred game of their parents, subject to mutations. Mutations in the strategy and the preferred game occur independently, each with a probability ν. In the case that a mutation occurs, the value of the corresponding variable is flipped to its opposite value (e.g., C to D for the strategy and game 1 to game 2 for the preferred game).

Results

Dynamics of the model and the phase diagram for n = 2 public resources

As shown in the section Materials and methods, the model can be solved analytically in terms of the replicator-mutator equation. Analysis of the model by simulations and numerical solution of the replicator dynamics reveals that the dynamics can settle in a fixed point or a periodic orbit depending on the parameter values and the initial conditions. We begin by studying cyclic behavior. In Fig 1A, we plot the density of cooperators (solid blue) and defectors (dashed red) in the game i, denoted as, respectively, ρCi and ρDi, for i = 1 and i = 2, as a function of time. The density of cooperators (defectors) in the game i is defined as the fraction of individuals in the population who prefer public resource i and cooperate (defect). In Fig 1B the total density of cooperators ρC=ρC1+ρC2 (solid blue), and the density of the individuals who prefer public resource 1, ρ1=ρC1+ρD1, (dashed red) are plotted. The total density of defectors, ρD=ρD1+ρD2, and the density of individuals who prefer public resource 2, ρ2=ρC2+ρD2, can be inferred from these by noting ρD = 1 − ρC, and ρ2 = 1 − ρ1. Here, g = 10, r1 = 4.4, r2 = 2.8, ν = 10−3, and the initial condition is a random initial condition in which both the strategy and the preferred game of the individuals are assigned at random. Here, and in the following, we fix c = π0 = 1. The top panels show numerical solutions of the replicator dynamics, and the bottom panels show the results of a simulation in a population of size N = 10000.

Dynamics of the model for n = 2 public resources.
Fig 1

Dynamics of the model for n = 2 public resources.

A: The density of cooperators (solid blue), ρCi, and defectors (dashed red), ρDi, in a game i, for i = 1 and 2, as a function of time. The two top panels result from the replicator dynamics, and the two bottom panels result from a simulation. B: The total density of cooperators, ρC=ρC1+ρC2 (solid blue), and the density of the individuals who prefer public resource 1, ρ1=ρC1+ρD1 (dashed red), as a function of time. The top panel results from replicator dynamics and, the bottom panel results from a simulation. Parameter values: g = 10, ν = 10−3, r1 = 4.4, and r2 = 2.8. Simulations are performed in a population of size N = 10000.

A comparison shows a high level of agreement between simulations in a finite population and solutions of replicator dynamics, which is an exact solution of the model in the infinite population limit. Both simulation and analytical solutions show that cooperators are preserved and cyclically dominate the population. When cooperators’ density in a public resource i increases, defectors in the game i obtain a high payoff and increase in frequency. This decreases the payoff of cooperators in the game i, and consequently, they obtain a higher payoff by switching to the other public resource. This, in turn, decreases the payoff of defectors in the game i, and thus ρDi starts to decrease when ρCi decreases enough.

As mentioned before, cyclic behavior is not the only attractor of the dynamics. To see this, in Fig 2A and 2B, the phase diagrams of the system in the r1r2 plane for g = 10, and respectively, ν = 10−5 and ν = 10−3 are plotted. For too small enhancement factors, having a choice between public resources can not alleviate the strong disadvantage cooperators experience due to a small enhancement factor. Consequently, the dynamics settle into a fixed point in which defectors dominate the population. As either enhancement factors increase beyond a threshold (marked by blue triangles), cooperators can survive. In this region, the dynamics become bistable, and depending on the initial condition, settle either in a defective fixed point or a periodic orbit. By further increasing the enhancement factors, at a second bifurcation line (denoted by red crosses), the defective fixed point loses stability. The dynamics become mono-stable and settle in a periodic orbit, starting from all the initial conditions. The phase boundary between the defective and cyclic phases in the r1r2 plane can be defined as the line where the transition between the two phases occurs starting from a homogeneous initial condition (that is ρC1=ρD1=ρC2=ρD2=0.25) [39]. Green circles in the figure denote this boundary.

The phase diagram of the model for n = 2 public resources.
Fig 2

The phase diagram of the model for n = 2 public resources.

The phase diagram of the model for ν = 10−5, A, and ν = 10−3, B. The model shows two distinct mono-stable phases where the dynamics settle into a fixed point (denoted by FP) or a periodic orbit (denoted by PO). In between, for small enhancement factors, the system possesses a bi-stable region where both the periodic orbit and the fixed point are stable (the region between blue (triangles) and red (crosses) lines, denoted by PO+FP). The phase boundary (green line marked by circles) can be defined as the line where the transition between the two phases occurs starting from a random assignment of strategies (that is ρC1=ρC2=ρD1=ρD2=0.25). Here, g = 10 and the replicator dynamics is used to derive the phase diagrams.

By further increasing the enhancement factors, beyond a final transition line (the line where different marker types coalesce), the periodic orbit becomes unstable, and the dynamics settle in a fixed point in which cooperators dominate. We note that in contrast to the transition from the defective fixed point to the cyclic orbit, the transition between the cyclic orbit and the cooperative fixed point shows no bi-stability and happens continuously (in the sense that the amplitude of fluctuations decreases gradually by increasing the enhancement factors until fluctuations vanish at the transition line). Consequently, this transition line occurs at the same value of r1 and r2 for all initial conditions. A comparison of the phase diagram for different mutation rates shows that the same scenario occurs for all the mutation rates. Quantitatively, however, larger mutation rates decrease the size of the region in the r1r2 plane where cyclic behavior can occur.

Cooperation level of the population for n = 2 public resources

An interesting question is how the level of cooperation in the population depends on the enhancement factors? To see this, in Fig 3A, we plot the time average of the total density of cooperators, ρC=ρC1+ρC2, in the r1r2 plane. In all panels of Fig 3, g = 10, ν = 10−3, and a homogeneous initial condition is used. The top panels result from the replicator dynamics, and the bottom panels show the result of a simulation in a population of size N = 20000. As can be seen, the density of cooperators is the highest close to the diagonal, where r1 = r2, and decreases with increasing the distance from the diagonal. This shows that increasing the enhancement factor of one of the games beyond its optimal value can have a surprisingly detrimental effect on the evolution of cooperation.

Cooperation level of the population in the model with n = 2 public resources.
Fig 3

Cooperation level of the population in the model with n = 2 public resources.

A: The contour plot of the time average density of cooperators, ρCt=ρC2+ρC1t. Cooperation evolves for large enough enhancement factors, and it is maximized when the enhancement factors of the two resources are similar. B and C: The time average density of cooperators B, and defectors C, in resource 1. Compared to cooperators, defectors are more likely to prefer the highest quality resource. Consequently, cooperators can use the low-quality resource as a shelter when defectors dominate. D: Contour plot of γ=ρC1/(ρC1+ρC2)-ρD1/(ρD1+ρD2)t. This is a measure of how much the cooperators are more likely to prefer resource 1, compared to defectors. Cooperators are more likely to prefer resource 1, when it is the lower quality resource, and defectors are more likely to prefer resource 1 when it is the higher quality resource. Here, g = 10 and ν = 10−3. Top panels result from the replicator dynamics, and bottom panels show the result of a simulation in a population of size N = 20000.

To shed more light on the mechanism by which freedom to choose between different public resources promotes cooperation, and to see why cooperation is maximized when the two competing resources have similar enhancement factors, in Fig 3B and 3C, we plot the time average density of, respectively, cooperators and defectors in resource 1 (Due to the symmetry of the two games, the corresponding densities in resource 2 result from this by reflection with respect to the diagonal). As can be seen, most individuals prefer resource 1, as long as it has a higher enhancement factor. Interestingly, the low-quality resource is often immune to invasion by defectors: while the inferior resource can attract cooperators, defectors strongly prefer the higher quality resource. This phenomenon can be made more quantitative by calculating the fraction of cooperators who prefer resource 1 as ρC1/(ρC1+ρC2), and the fraction of defectors who prefer resource 1, ρD1/(ρD1+ρD2). These quantities measure how likely a cooperator or a defector is to prefer resource 1. The time average difference between these two quantities, γ=ρC1/(ρC1+ρC2)-ρD1/(ρD1+ρD2)t is plotted in Fig 3D. As can be seen, cooperators are always more likely to prefer the lower quality resource than the defectors are. On the other hand, defectors are more likely to prefer the higher quality resource than the cooperators are. This phenomenon is crucial for freedom to choose between the two resources to promote cooperation: When the density of defectors increases in the population, cooperators can shelter in the lower quality resource and make it the more profitable one, and thus, by enjoying a higher growth rate, out-compete defectors. However, when the inferior resource’s quality is much lower than that of the superior resource, it becomes more difficult for cooperators to make the inferior resource the more profitable one. This, in turn, leads to a reduction in the cooperation level of the population by increasing the difference between the quality of the resources.

The case of n = 3 public resources

As mentioned in the section The model, the framework can be extended to a general case where individuals can choose among an arbitrary number, n, of public resources. In this section, we study the case of n = 3 public resources. The phase diagram of the model with three resources is plotted in Fig 4A and 4B, for respectively, ν = 10−5 and ν = 10−3. Here, the replicator dynamics is used to derive the phase diagrams in the r1r2 plane, fixing the enhancement factor of game 3 to r3 = 3, and setting g = 10. The model shows a similar phase diagram to that observed for the case of n = 2 resources: For small enhancement factors, the dynamics settle into a defective fixed point. As the enhancement factors increase, the system becomes bistable and can settle in either the defective fixed point or a periodic orbit in which cooperators survive and cyclically dominate the population. The blue line (marked by blue triangles) shows the lower boundary of the coexistence region above which the periodic orbit becomes stable. The red line (marked by crosses) shows the upper boundary of the coexistence region, above which the defective fixed point becomes unstable, and the dynamics settle in the periodic orbit. In between the two bifurcation lines and in the coexistence region, both the defective fixed point and the periodic orbit are stable, and the dynamics settle into one of these attractors depending on the initial conditions. The phase boundary, defined as the boundary above which the transition from the fixed point to periodic orbit occurs starting from a homogeneous initial condition [39], is indicated by the green line (marked by circles). Finally, for large enhancement factors, the system shows a final bifurcation line above which the dynamics settle in a cooperative fixed point, in which the vast majority of the individuals cooperate. This boundary is indicated by the line in large enhancement factors where different marker types coincide.

The phase diagram of the model with n = 3 public resources.
Fig 4

The phase diagram of the model with n = 3 public resources.

The phase diagram of the model with n = 3 public resources, for ν = 10−5, A, and ν = 10−3, B. For small enhancement factors, the model shows bistability and can settle in either a fixed point (FP) where defectors dominate or a periodic orbit (PO) in which cooperators survive. The blue line (marked by triangles) shows the lower boundary of the coexistence region above which the cyclic orbit becomes stable, and the red line (marked by crosses) shows the upper boundary of the coexistence region, above which the defective fixed point becomes unstable. The green line (marked by circles) shows the phase boundary resulted from an unbiased (homogeneous) initial condition. Here, g = 10, r3 = 3, and the replicator dynamics are used to derive the phase diagrams.

To see how the cooperation level of the population changes in different regions of the phase diagram, in Fig 5A and 5B, we plot the time average population’s cooperation level, ρCt=ρC1+ρC2+ρC3t. Here, and in Fig 6 in the following, ν = 10−3, g = 10, and r3 = 3. The initial condition is a homogeneous initial condition in which the individuals’ strategies and preferred games are randomly assigned. Fig 5A shows the solutions of the replicator dynamics, and Fig 5B shows the result of simulations in a population of N = 10000 individuals. As was the case in the model with n = 2 resources, the cooperation level of the population is maximized close to the diagonal, where the two higher quality games have similar enhancement factors and decreases by going away from the diagonal.

Cooperation level of the population in the model with n = 3 public resources.
Fig 5

Cooperation level of the population in the model with n = 3 public resources.

The contour plots of the time average cooperation level of the population, ρCt=ρC1+ρC2+ρC3t, resulting from numerical solutions of the replicator dynamics with n = 3 games, A, and a simulation in population of size N = 10000, B. The population’s cooperation level is the highest when the two highest quality resources have similar enhancement factors. Here, g = 10, r3 = 3, and ν = 10−3. The initial condition is a homogeneous initial condition in which the strategies and the preferred game of the individuals are assigned at random.

The densities of different strategies in the model with n = 3 public resources.
Fig 6

The densities of different strategies in the model with n = 3 public resources.

The time average density of cooperators in resource 1 A, the time average density of defectors in resource 1 B, the time average density of cooperators in resource 3 C, and the time average density of defectors in resource 3 D, are plotted. The top panels show the replicator dynamics results, and the bottom panels show the result of a simulation in a population of size N = 10000. Here, g = 10, r3 = 3, and ν = 10−3. The initial condition is a homogeneous initial condition in which the strategies and the preferred games of the individuals are assigned at random.

To take a deeper look into the model’s behavior for n = 3 games, we plot the time average density of cooperators in resource 1, ρC1t, and that of defectors in resource 1, ρD1t, in respectively, Fig 6A and 6B. The time average density of cooperators in resource 3, ρC3t, and the time average density of defectors in resource 3, ρD3t are plotted in, respectively, Fig 6C and 6D. The top panels show the result of the replicator dynamics, and the bottom panels show the result of simulations in a population of size N = 10000. We note that, due to the symmetry of resource 1 and 2, the densities of cooperators and defectors in resource 2 result from that in resource 1, in Fig 6, by reflection with respect to the diagonal.

In the region where both r1 and r2 are larger than r3 = 3, that is when resource 3 is the most inferior resource, the third resource becomes almost obsolete: Very few individuals prefer resource 3, and the dynamic is determined by the interaction of the two higher-quality resources. However, the mere possibility of playing the third game has a positive effect on cooperation, even when it does not attract individuals significantly. We note that, in the case r1 = r2, it can happen that cooperators, but not defectors, choose resource 3, provided its enhancement factor is not too small compared to the enhancement factors of the two higher-quality resources. This, once again, shows cooperators are more likely to choose an inferior resource.

On the other hand, in the region where either r1 or r2 are smaller than r3 = 3, that is when resource 3 is the second high-quality resource, the third resource always attracts cooperators, but not defectors (compare Fig 6C and 6D). This observation shows, similarly to the case of n = 2 resources, when individuals can choose between three resources, defectors tend to prefer the highest quality resource. This makes a second high-quality resource a shelter for cooperators to work cooperatively and grow safely when the density of defectors increases in the population. The lowest quality resource, on the other hand, remains almost obsolete (as long as its quality is sufficiently lower than the other two resources). This is because the second high-quality resource, having a low fraction of defectors, is already a good enough shelter for cooperators, and they do not need to switch to the lowest quality resource.

Discussion

We have shown that freedom to choose between different public resources can promote cooperation. In such competitive contexts, while defectors predominantly prefer the highest quality resource, cooperators show an inclination to choose lower-quality resources as well, where they can work cooperatively to out-compete defectors. However, the cooperation level of the population is maximized when the two highest quality resources have similar qualities. In the Supporting Information S1 Text, we further argue for the robustness of our result for other parameter values. In particular, finite-size analysis of the model reveals, while having a choice between different public resources promotes cooperation in small population sizes, this mechanism is more potent in large population sizes [See Figure B in S1 Text]. In this regards, having a choice between public resources seems to contrast many mechanisms for the evolution of cooperation which suffer from the so-called scalable cooperation problem [40, 41], according to which cooperation diminishes in large population sizes. Our analysis thus shows freedom to choose between public resources can fruitfully be at work to give rise to a high level of cooperation not only in small scale societies but more prominently, in many large scale societies where individuals can choose among different groups or activities, possibly with different profitability, to engage in collective actions.

Empirical examples of a situation where having a choice between public resources is at work to promote cooperation appear to abound in different species, from resource competition in microorganisms [37, 42] to many collective actions in human societies [3235, 43]. For instance, an interesting example in microorganisms appears to be resource competition in yeast populations, where individual organisms can choose between different resources with different profitability [37].

Fission-fusion dynamics, observed in many group-living animals [44, 45], such as primates [4648], dolphins [49], elephants [50], bats [51], carnivores [5254], and hunter-gatherer human societies [44, 55], appears to provide another example. In such cases, subgroups are formed in the group, for instance, during foraging [49, 53, 55], cooperative breeding [48], or cooperative defending [53]. The composition of subgroups are usually dynamic, and individuals can choose or form different subgroups or switch between subgroups in a matter of hours (for example, in spotted hyenas [53]) to a day or a few months (for example, in hunter-gatherer human societies [55]). In many such cases, individuals in subgroups need to work together to solve collective action problems. Our analysis suggests the fission-fusion dynamics can serve as a natural mechanism to solve such collective action problems. This role in solving collective action problems, in turn, can be argued to be one of the advantages of fission-fusion dynamics. Although the existence of possible links between cooperative behavior and fission-fusion dynamics has been noted [48, 51], the question of whether fission-fusion dynamics serve a role in promoting cooperative behavior in many species that exhibit both fission-fusion dynamics and a high level of cooperation remains to be empirically studied.

In modern human societies, competition between different political parties, or team incentive within firms [43], where the success of a group in competition with others require cooperation between individuals, seems to provide examples where individuals can form and join different groups to perform a collective action task. It is argued that competition between different groups can promote cooperation in such contexts [43]. Arguably, teamwork in other human communities, such as schools, where individuals can form and join different groups to perform a collective action task, provides other examples. Choosing between different geographic locations, such as cities, based on public good provision [56, 57], or having a choice between different type of collective action tasks, such as communal hunting or communal agriculture [58], can be among yet other examples of a situation where having a choice between different public resources can be at work to promote cooperation in human societies.

One might wonder what prevents cooperators from going to extinction in our model? The key to the answer to this question comes from the observation that while the group size, g, is fixed, the number of individuals who prefer a public resource i in a group, ni, is subject to fluctuations. When in a group, ni falls below ri, individuals’ in this group no longer face a social dilemma, and cooperation becomes the dominant strategy. In this case, although those who defect in a game i fare better in the group, when averaged over all such groups, the game i-cooperators reach a higher payoff compared to game i-defectors and increase in number. A similar phenomenon is observed in voluntary participation, where it is noted that it is an instance of Simpson’s paradox [8]. This phenomenon seems to be particularly the reason why finite-size effects favor defection in our model, as the likelihood that averaging over groups does not wash away the advantage defectors experience in each group increases with decreasing population size.

The mechanism introduced here has similarities with voluntary participation [8]. In the case of voluntary participation, individuals can abstain from playing a public goods game and resort to a safe income. It is shown that abstaining can lead to a rock-paper-scissor like dynamics through which cooperators, loners (those who abstain from the game), and defectors cyclically dominate the population [8]. Our model can exhibit similar cyclic dominance of different strategies. In the case of two public goods games, four strategies, C1, D1, C2, and D2, can cyclically dominate the population. Similarly, in the case of 3 resources, depending on the parameter values, all or a subset of the 6 possible strategies can alternately dominate the population. However, in our model, instead of having the option of resorting to a safe income, individuals can switch to another public goods game, the income from which can be negative or positive depending on the communities’ ability to solve the social dilemma. If the individuals somehow manage to solve the social dilemma in one public goods game, a positive income from this game is assured, which can induce cooperation in the other coupled games through cyclic dominance of cooperators and defectors. If not, defection prevails in all the public goods games in a defective fixed point. In contrast to voluntary participation, this interdependent dynamics of different social dilemmas introduces bistability: The fate of the dynamics depends on the community’s ability to solve the social dilemmas, encoded in the initial conditions.

An interesting question is the effect of population structure on the evolution of cooperation when individuals can choose between different public resources. As is well-known, population structure can promote cooperation [5, 6, 29]. For this reason, one might expect due to the constructive role of network assortativity, having a choice between public resources may promote cooperation in a structured population with more ease and in more hostile conditions, compared to an unstructured population. Furthermore, it might be expected that due to smaller effective group size, having a choice between public resources can increase cooperation beyond what is supported by network reciprocity. Preliminary simulations suggest these expectations are correct. Future research can shed light on these questions and on the spatial patterns emerging when individuals have a choice between different public resources.

Materials and methods

The replicator dynamics

In the limit of infinite population size, the dynamics of the model can be described in terms of the replicator-mutator equation [59]. This equation describes the evolution of the densities of different strategies in an evolutionary context where the strategies grow proportional to their fitness and are subject to mutations. In the general case that individuals can choose among n different public resources, the replicator-mutator dynamics for the model can be written as follows:

Here, x, y, and z refer to strategies and can be either C or D, and i, j, and l refer to the public resources numbered from 1 to n. νy,jx,i is the mutation rate from a strategy combination that prefers public resource j and plays strategy y to a strategy combination that prefers public resource i and plays strategy x. These can be written in terms of mutation rates. In the case of n = 2 public resources, these read as follows:
Where we have assumed that the mutation rate in the strategies is νs and the mutation rate in the game preference is νg (through this study, we set νs = νg = ν). In Eq (1), πyj is the expected payoff of an individual who prefers public resource j and plays strategy y. These can be written as:
Here, crj1+nCj1+nCj+nDj-c in the first equation is the expected payoff of a cooperator who prefers the public resource j, in the case that nCj cooperators and nDj defectors in the group prefer the public resource j. Similarly, crjnCj1+nCj+nDj in the second equation is the expected payoff of a defector who prefers the public resource j, in the case that nCj cooperators and nDj defectors in the group prefer the public resource j. (1-ρCj-ρDj)g-1-nCj-nDjρDjnDjρCjnCj(g-1ncj,nDj,g-1-nCj-nDj) is the probability that this event occurs. (g-1ncj,nDj,g-1-nCj-nDj)=(g-1)!nCj!nDj!(g-1-nCj-nDj)! is the multinomial coefficient and is the number of ways that nCj cooperators and nDj defectors who prefer game j can be chosen among g − 1 group-mates of a focal individual. Summation over all the possible configurations gives the expected payoff of a cooperator (or defector) who prefers resource j. As all the individuals receive a base payoff π0, this is added to all the payoffs.

The simulations and methods

Simulations used in Figs 3, 5, and 6 are run for T = 5000 time steps, and the time averages are taken over the last 4000 time steps. For the solutions of the replicator dynamics presented in Figs 3, 5, and 6, the replicator dynamics is numerically solved for T = 4000 time steps, and the averages are taken in the time interval t = 2000 to t = 4000. To derive the phase diagram presented in Figs 2 and 4, the following procedure is used. To determine the boundaries of the bistable region where both defective fixed point and cyclic behavior are possible, we note that the most favorable initial condition for the evolution of cooperation is the one in which all the individuals prefer the same resource (for example, ρD1=1, ρC1=ρC2=ρD2=0 for n = 2 and ρD1=1, ρC1=ρC2=ρD2=ρC3=ρD3=0 for n = 3 resources). Numerical solutions of the replicator dynamics starting from this initial condition give the lower boundary of the coexistence region (the blue line marked by triangles in the figures). The least favorable initial condition for the evolution of cooperation is the one in which all the individuals are defectors and prefer the two games in equal fractions (ρC1=ρC2=0 and ρD1=ρD2=0.5 for n = 2 and ρC1=ρC2=ρC3=0 and ρD1=ρD2=ρD3=1/3 for n = 3 resources). Numerical solutions of the replicator dynamics starting from this initial condition give the upper boundary of the coexistence region (the red line marked by crosses). Finally, to determine the phase boundary between the defective and cyclic phases (green line marked by circles), the replicator equation with a homogeneous initial condition (ρC1=ρC2=ρD2=ρD1=0.25 for n = 2, and ρC1=ρC2=ρC3=ρD3=ρD2=ρD1=1/6 for n = 3 resources) is solved. All the three sets are solved for T = 4000 time steps, and the values of r1 and r2 where a periodic orbit appears or disappears mark the phase boundaries. As the phase boundary between the cyclic and cooperative phases for large enhancement factors shows no bi-stability, solutions starting from all the initial conditions result in the same line where different types of markers coalesce in the figure.

Acknowledgements

Fatemeh Bibak is acknowledged for reading the manuscript and comments.

References

MMilinski, DSemmann, HJKrambeck. Reputation helps solve the ‘tragedy of the commons’. Nature. 2002 1;415(6870):4246. 10.1038/415424a

KPanchanathan, RBoyd. Indirect reciprocity can stabilize cooperation without the second-order free rider problem. Nature. 2004 11;432(7016):499502. 10.1038/nature02978

SVan Segbroeck, JMPacheco, TLenaerts, FCSantos. Emergence of fairness in repeated group interactions. Physical review letters. 2012 4 10;108(15):158104 10.1103/PhysRevLett.108.158104

FLPinheiro, VVVasconcelos, FCSantos, JMPacheco. Evolution of all-or-none strategies in repeated public goods dilemmas. PLoS Comput Biol. 2014 11 13;10(11):e1003945 10.1371/journal.pcbi.1003945

HOhtsuki, CHauert, ELieberman, MANowak. A simple rule for the evolution of cooperation on graphs and social networks. Nature. 2006 5;441(7092):5025. 10.1038/nature04605

FCSantos, MDSantos, JMPacheco. Social diversity promotes the emergence of cooperation in public goods games. Nature. 2008 7;454(7201):2136. 10.1038/nature06940

G.Szabó and C.Hauert, 2002 Phase transitions and volunteering in spatial public goods games. Physical review letters, 89(11), p.118101 10.1103/PhysRevLett.89.118101

CHauert, SDe Monte, JHofbauer, KSigmund. Volunteering as red queen mechanism for cooperation in public goods games. Science. 2002 5 10;296(5570):112932. 10.1126/science.1070582

CHauert, SDe Monte, JHofbauer, KSigmund. Replicator dynamics for optional public good games. Journal of Theoretical Biology. 2002 9 21;218(2):18794. 10.1006/jtbi.2002.3067

10 

DGRand, ADreber, TEllingsen, DFudenberg, MANowak. Positive interactions promote public cooperation. Science. 2009 9 4;325(5945):12725. 10.1126/science.1177418

11 

ASzolnoki, MPerc. Antisocial pool rewarding does not deter public cooperation. Proceedings of the Royal Society B: Biological Sciences. 2015 10 7;282(1816):20151975 10.1098/rspb.2015.1975

12 

CHilbe, KSigmund. Incentives and opportunism: from the carrot to the stick. Proceedings of the Royal Society B: Biological Sciences. 2010 8 22;277(1693):242733. 10.1098/rspb.2010.0065

13 

LHu, NHe, QWeng, XChen, MPerc. Rewarding endowments lead to a win-win in the evolution of public cooperation and the accumulation of common resources. Chaos, Solitons & Fractals. 2020 5 1;134:109694 10.1016/j.chaos.2020.109694

14 

Salahshour M. Evolution of cooperation and consistent personalities in public goods games. arXiv preprint arXiv:2010.05307. 2020 Oct 11.

15 

EFehr, SGächter. Altruistic punishment in humans. Nature. 2002 1;415(6868):13740. 10.1038/415137a

16 

MPerc, JJJordan, DGRand, ZWang, SBoccaletti, ASzolnoki. Statistical physics of human cooperation. Physics Reports. 2017 5 8;687:151. 10.1016/j.physrep.2017.05.004

17 

RBoyd, HGintis, SBowles. Coordinated punishment of defectors sustains cooperation and can proliferate when rare. Science. 2010 4 30;328(5978):61720. 10.1126/science.1183665

18 

ASzolnoki, MPerc. Second-order free-riding on antisocial punishment restores the effectiveness of prosocial punishment. Physical Review X. 2017 10 30;7(4):041027 10.1103/PhysRevX.7.041027

19 

CHauert, ATraulsen, HBrandt, MANowak, KSigmund. Via freedom to coercion: the emergence of costly punishment. science. 2007 6 29;316(5833):19057. 10.1126/science.1141588

20 

CHilbe, ATraulsen. Emergence of responsible sanctions without second order free riders, antisocial punishment or spite. Scientific reports. 2012 6 13;2(1):14. 10.1038/srep00458

21 

Salahshour M. The evolution of punishing institutions. arXiv preprint arXiv:2011.01786. 2020 Oct 25.

22 

TCzárán, RFHoekstra. Microbial communication, cooperation and cheating: quorum sensing drives the evolution of cooperation in bacteria. PLoS one. 2009 8 17;4(8):e6655 10.1371/journal.pone.0006655

23 

TClutton-Brock. Cooperation between non-kin in animal societies. Nature. 2009 11;462(7269):517. 10.1038/nature08366

24 

DLCheney. Extent and limits of cooperation in animals. Proceedings of the National Academy of Sciences. 2011 6 28;108(Supplement 2):109029. 10.1073/pnas.1100291108

25 

DGRand, MANowak. Human cooperation. Trends in cognitive sciences. 2013 8 1;17(8):41325. 10.1016/j.tics.2013.06.003

26 

EPennisi. On the origin of cooperation. Science. 2009 9 4;325(5945):11961199 10.1126/science.325_1196

27 

MDoebeli, CHauert. Models of cooperation based on the Prisoner’s Dilemma and the Snowdrift game. Ecology letters. 2005 7;8(7):74866. 10.1111/j.1461-0248.2005.00773.x

28 

MANowak. Five rules for the evolution of cooperation. science. 2006 12 8;314(5805):15603. 10.1126/science.1133755

29 

MPerc, JGómez-Gardenes, ASzolnoki, LMFloría, YMoreno. Evolutionary dynamics of group interactions on structured populations: a review. Journal of the royal society interface. 2013 3 6;10(80):20120997 10.1098/rsif.2012.0997

30 

LADugatkin. Cooperation among animals: an evolutionary perspective. Oxford University Press on Demand; 1997.

31 

JWang, SSuri, DJWatts. Cooperation and assortativity with dynamic partner updating. Proceedings of the National Academy of Sciences. 2012 9 4;109(36):143638. 10.1073/pnas.1120867109

32 

MStorper. Why do regions develop and change? The challenge for geography and economics. Journal of economic geography. 2011 3 1;11(2):33346.

33 

JScott. Rational choice theory. Understanding contemporary society: Theories of the present. 2000 1 1;129:67185.

34 

PKPattanaik, YXu. On preference and freedom. Theory and Decision. 1998 4;44(2):17398. 10.1023/A:1004924211553

35 

PJones, RSugden. Evaluating choice. International review of Law and Economics. 1982 6 1;2(1):4765. 10.1016/0144-8188(82)90013-8

36 

SFShen, SLVehrencamp, RAJohnstone, HCChen, SFChan, WYLiao, KYLin, HWYuan. Unfavourable environment limits social conflict in Yuhina brunneiceps. Nature Communications. 2012 6 6;3(1):17. 10.1038/ncomms1894

37 

XChen, MPerc. Excessive abundance of common resources deters social responsibility. Scientific Reports. 2014 2 24;4(1):15. 10.1038/srep04161

38 

RJRequejo, JCamacho. Coexistence of cooperators and defectors in well mixed populations mediated by limiting resources. Physical review letters. 2012 1 19;108(3):038701 10.1103/PhysRevLett.108.038701

39 

KBinder. Theory of first-order phase transitions. Reports on progress in physics. 1987 7 1;50(7):783 10.1088/0034-4885/50/7/001

40 

RBoyd, PJRicherson. The evolution of reciprocity in sizable groups. Journal of theoretical Biology. 1988 6 7;132(3):33756. 10.1016/S0022-5193(88)80219-4

41 

NHanaki, APeterhansl, PSDodds, DJWatts. Cooperation in evolving social networks. Management Science. 2007 7;53(7):103650. 10.1287/mnsc.1060.0625

42 

RCMacLean, IGudelj. Resource competition and social conflict in experimental populations of yeast. Nature. 2006 5;441(7092):498501. 10.1038/nature04624

43 

RMSheremeta. Behavior in group contests: A review of experimental research. Journal of Economic Surveys. 2018 7;32(3):683704. 10.1111/joes.12208

44 

IDCouzin, MELaidre. Fission–fusion populations. Current biology. 2009 8 11;19(15):R6335. 10.1016/j.cub.2009.05.034

45 

FAureli, CMSchaffner, CBoesch, SKBearder, JCall, CAChapman, RConnor, ADFiore, RIDunbar, SPHenzi, KHolekamp. Fission-fusion dynamics: new research frameworks. Current Anthropology. 2008 8;49(4):62754. 10.1086/586708

46 

TNishida. Chimpanzees and bonobos: cooperative relationships among males. Primate societies. 1987.

47 

JWAlfaro. Subgrouping patterns in a group of wild Cebus apella nigritus. International Journal of Primatology. 2007 4 1;28(2):27189. 10.1007/s10764-007-9121-0

48 

SMHolmes, ADGordon, EELouis, SEJohnson. Fission-fusion dynamics in black-and-white ruffed lemurs may facilitate both feeding strategies and communal care of infants in a spatially and temporally variable environment. Behavioral Ecology and Sociobiology. 2016 11;70(11):194960. 10.1007/s00265-016-2201-4

49 

HCPearson. Influences on dusky dolphin (Lagenorhynchus obscurus) fission-fusion dynamics in Admiralty Bay, New Zealand. Behavioral Ecology and Sociobiology. 2009 8;63(10):143746. 10.1007/s00265-009-0821-7

50 

GWittemyer, JBOkello, HBRasmussen, PArctander, SNyakaana, IDouglas-Hamilton, HRSiegismund. Where sociality and relatedness diverge: the genetic basis for hierarchical social organization in African elephants. Proceedings of the Royal Society B: Biological Sciences. 2009 10 7;276(1672):351321. 10.1098/rspb.2009.0941

51 

GKerth, NPerony, FSchweitzer. Bats are able to maintain long-term social relationships despite the high fission–fusion dynamics of their groups. Proceedings of the Royal Society B: Biological Sciences. 2011 9 22;278(1719):27617. 10.1098/rspb.2010.2718

52 

K. E.Holekamp, E. E.Boydston, & L.Smale, 2000 Group travel in social carnivores In BoinskiS. & GarberP. A. (Eds.), On the move: How and why animals travel in groups (p. 587627). University of Chicago Press.

53 

JESmith, KSPowning, SEDawes, JREstrada, ALHopper, SLPiotrowski, KEHolekamp. Greetings promote cooperation and reinforce social bonds among spotted hyaenas. Animal Behaviour. 2011 2 1;81(2):40115.

54 

JESmith, JMKolowski, KEGraham, SEDawes, KEHolekamp. Social and ecological determinants of fission–fusion dynamics in the spotted hyaena. Animal Behaviour. 2008 9 1;76(3):61936. 10.1016/j.anbehav.2008.05.001

55 

FWMarlowe. Hunter-gatherers and human evolution. Evolutionary Anthropology: Issues, News, and Reviews: Issues, News, and Reviews. 2005 3;14(2):5467. 10.1002/evan.20046

56 

AABatabyal, KKourtit, PNijkamp. Using local public goods to attract and retain the creative class: A tale of two cities. Regional Science Policy & Practice. 2019 8;11(3):57181.

57 

DZiblatt. Why some cities provide more public goods than others: A subnational comparison of the provision of public goods in German cities in 1912. Studies in Comparative International Development. 2008 12;43(3):27389. 10.1007/s12116-008-9031-y

58 

DVCampana, PJCrabtree. Communal hunting in the Natufian of the southern Levant: the social and economic implications. Journal of Mediterranean Archaeology. 1990 1 6;3(2):22343. 10.1558/jmea.v3i2.223

59 

MANowak. Evolutionary dynamics: exploring the equations of life. Harvard university press; 2006 9 29.