Evolution of Cooperation in Public Goods Games with Stochastic Opting-Out

This paper investigates the evolution of strategic play where players drawn from a finite well-mixed population are offered the opportunity to play in a public goods game. All players accept the offer. However, due to the possibility of unforeseen circumstances, each player has a fixed probability of being unable to participate in the game, unlike similar models which assume voluntary participation. We first study how prescribed stochastic opting-out affects cooperation in finite populations. Moreover, in the model, cooperation is favored by natural selection over both neutral drift and defection if return on investment exceeds a threshold value defined solely by the population size, game size, and a player's probability of opting-out. Ultimately, increasing the probability that each player is unable to fulfill her promise of participating in the public goods game facilitates natural selection of cooperators. We also use adaptive dynamics to study the coevolution of cooperation and opting-out behavior. However, given rare mutations minutely different from the original population, an analysis based on adaptive dynamics suggests that the over time the population will tend towards complete defection and non-participation, and subsequently, from there, participating cooperators will stand a chance to emerge by neutral drift. Nevertheless, increasing the probability of non-participation decreases the rate at which the population tends towards defection when participating. Our work sheds light on understanding how stochastic opting-out emerges in the first place and its role in the evolution of cooperation.


Introduction
Cooperation is everywhere. (See Axelrod (1984), Hölldobler and Wilson (2009), Traulsen and Nowak (2006), and Trivers (1971)). Bacteria cooperate. For example, bacteria cooperate in biofilm production, where bacteria go so far as to use quorum sensing to determine when there are enough cooperators that contributing to the biofilm is worthwhile (Nadell 2008). Ants cooperate, building vast anthills where members of a colony live together. Birds cooperate, sounding an alarm when predators are nearby. Moreover, humans cooperate. Indeed, whenever we contribute to a joint hunting effort, bring food to a potluck, or work together to combat climate change, we are cooperating. Why, though, do we see cooperation in all walks of life? How does cooperation evolve? Researchers have dedicated significant effort in the past twenty years towards studying the evolution of cooperation. (See Antal et al. (2009), Boyd et al. (2010), Hauert et al. (2002a), Hauert et al. (2002b), Nowak (2006b), and Priklopil et al. (2017), as examples).
In particular, one common type of social interaction in which cooperation frequently arises and which has recently attracted attention by researchers is the public goods game (PGG). (See Hauert et al. (2002a), Hauert et al. (2002b), and Pacheco et al. (2015)). In a public goods game, cooperators contribute to a common pool which all participants of the game then share equally. In fact, in all of the instances of cooperation mentioned in the preceding paragraph, organisms contribute to a public good. In the case of bacteria, the public good is biofilm production. For ants, the good is the anthill. For birds, the good is the knowledge that a predator is nearby and hence that they should be careful. Lastly, for the party-goers, the good is the food at the potluck.
However, whenever cooperators contribute to a common pool, there are freeriders, who benefit from the common pool without contributing. Game the-orists frequently refer to such free-riders as defectors. These defectors cause the participants of the game to receive a smaller share of the common pool-a smaller payoff-than the social optimum where every player cooperates. In fact, regardless of what each other player does, a defector always earns a larger payoff because the defector does not have to contribute to the common pool, making defection the dominant strategy. Game theorists refer to a situation in which the dominant strategy is not socially optimal as a social dilemma. Consequentially, if each player were rational but unaware of the strategies of the other players, each player would choose to defect, and each player would receive no payoff.
In reality, even though in any particular PGG defectors will outperform cooperators, averaging over all games, it may be the case that cooperators actually outperform defectors. Such a situation is an example of Simpson's paradox (Hauert et al., 2002a). Additionally, there are many ways in which a tweak to the PGG may promote cooperation (Battiston et al., 2017;Szolnoki & Perc, 2015a,b). For instance, kin selection (Antal et al., 2009) (Nowak, 2006b), punishment of defectors (Boyd et al., 2010), signaling (Pacheco et al. 2015), and optional participation (Hauert et al. (2002a) and Hauert et al. (2002b)), and combinations of the preceding methods (Sigmund et al. 2010) (Hauert et al., 2008) have been used to promote cooperation. However, in the literature, a small but realistic tweak to the public goods game has yet to be addressed. Specifically, even if there is no punishment of defectors or if players cannot opt-out, due to unforeseen circumstances, at times players simply cannot participate in the PGG. For instance, an individual traveling to a hunting party may come across a flooded road and be forced to turn back. Or, an individual going to an international conference on climate change may suddenly become too ill to travel. It is even possible that on a whim, an individual may decide to engage in some activity other than the game. As a result, players participate in the public goods game stochastically, unable to participate independently of whether or not the player plans to cooperate or defect.
We investigate such public goods games with stochastic non-participation. Ultimately, we add a fully analyzed stochastic model to the literature, improving the understanding of the evolution of cooperation. Moreover, our model demonstrates that a tweak even more slight than others in the current literature, can facilitate cooperation. We conclude with an analysis of adap-tive dynamics for simplified 2 person PGGs in finite populations. In such an analysis, we demonstrate that increasing the probability of non-participation temporarily slows the rate at which the population tends to defection when participating given rare mutations only minutely different from the original population.

The Model
We consider a well-mixed finite population of n individuals, and suppose that frequently N ≤ n randomly selected individuals receive the opportunity to participate in a public goods game (PGG). In the PGG, individuals can choose to cooperate, investing 1 unit into a common pool, as in Hauert et al.(2002a) and Hauert et al. (2002b). Some force then multiplies the 1 unit each cooperator invests by some factor N > r > 1 and thus for each unit invested by a cooperator, the common pool increases by r units. At the end of the game, each PGG participant obtains an equal share of the common pool. However, the individuals who do not choose to cooperate choose to defect, receiving a share from the common pool without contributing. To simplify the model, we assume that individuals determine their strategies before the PGG has begun, ignoring group composition, as in Hauert et al. (2002a) and Hauert et al. (2002b).
As stated, the preceding model leads to domination by defectors for all games where the multiplier r is smaller than the game size N and the game is thus a social dilemma. To promote cooperation, we assume that due to unforeseen circumstances each player has a fixed probability α of being unable to participate in the PGG, instead obtaining a fixed benefit or loss σ. Furthermore, our model needs a method by which the population may change its composition of players cooperating or defecting. We take pairwise comparison as such a method, where occasionally two individuals are randomly selected. One individual will update his or her strategy by comparing his or her success to the other individual. We let the probability p that the updating individual adopts the strategy of the other individual be proportional to the expected payoff difference between individuals of the two strategies. Specifically, we let the probability of changing strategies be given by the Fermi function, as in Traulsen (2007) and Pacheco (2015): where π com represents the expected payoff of individuals playing the strategy of the individual selected for comparison, π up represents the expected payoff of individuals playing the strategy of the individual selected for updating, and γ ≥ 0 represents a selection pressure, and corresponds to an inverse temperature (Traulsen et al., 2007). When it comes to Adaptive Dynamics in finite populations, for simplicity, we assume game size is 2. Furthermore, applying adaptive dynamics to the problem as done in Imhof and Nowak (2010), we assume that a single mutant who plays a strategy similar to that to the original population invades the original population. Specifically, we suppose that every player plays a strategy in the strategy space (β, α), where β is the probability that the player cooperates if he or she plays, and α is the probability that due to unforeseen circumstances the player cannot play. We let the original population be composed solely of players with strategy (β, α), and we suppose that the population is invaded by a single player with strategy (β 1 , α 1 ). Then, we let β 1 → β and α 1 → α. As in Imhof and Nowak (2010), we also assume rare mutation. That is, we assume sufficient time passes between mutations that either fixation, or extinction, of the mutant type occurs.

Pairwise Invasion Based on Fixation Probability
To proceed with the analysis of the stochastic model, we must calculate the expected payoffs for cooperators and defectors, π c and π d , respectively. To calculate π d , we use the method presented by Hauert et al. (2002b). First, we observe that in a game with S players, defectors receive a benefit rn c /S, where n c is the number of cooperators in the game, if S > 1. However, if S = 1, that player must be a loner, and will receive payoff σ. Then, noting that any player does not play with probability α and plays with probability 1 − α, and letting x c be the proportion of cooperators in the population, (2) We defer the details to Appendix A. Employing a similar method, (3) We defer the details to Appendix B. Hence, a constant. Then, inputting π c −π d into (1), the probability that a cooperator becomes a defector given that a cooperator is selected for updating and a defector is selected for comparison is which is constant regardless of the number of cooperators. Thus the probability that the number of cooperators decreases by one in one iteration of the pairwise comparison model is Likewise, the probability that a defector becomes a cooperator given that the defector is selected for updating and the cooperator is selected for comparison is also a constant. Hence, the probability that the number of cooperators increases by one in one iteration of the pairwise comparison model is Of course, though, if the number of cooperators, i, is 0 or n, the probabilities that a cooperator will change to a defector and that a defector will change to a cooperator are both zero, and the number of cooperators remains at 0 or n. That is, i = 0 and i = n are absorption states in the model.
Moreover, now knowing p cd and p dc , and noting that p cd + p dc = 1, we can calculate the transition matrix P for the Markov chain in which pairwise selection is iterated repeatedly. However, as the transition matrix itself is not vital for our analysis, we defer discussion of the transition matrix to Appendix C. On the other hand, the fixation probability of cooperation, that is, the probability that given i cooperators in a population of defectors that every individual will become a cooperator, is vital. Following the procedure outlined by Nowak (2006a), we demonstrate that the fixation probability of cooperation given i ≥ 1 cooperators, x i , is where i = 1 implies the numerator is 1, where we denote p cd /p dc by G(α, γ, N, n, r), and G(α, γ, N, n, r) = (1 + exp(−γ(π c − π d )))/(1 + exp(γ(π c − π d ))).
Notably, G is constant over i. Hence, we may expand the numerator and denominator of x i as geometric series. So, if G = 1, However, G = 1 implies that p cd = p dc = 1/2, which implies neutral drift. We assume for now that G = 1. Then, observing that p dc /p cd = G −1 , the fixation probability of defection given i defectors is simply x i with G replaced by G −1 : Hence, the fixation probability given i cooperators is Thus, the probability of fixation of cooperators or defectors given i defectors is Consequentially, the system always reaches an absorption state.
Furthermore, now knowing the probabilities of fixation of cooperation given i cooperators, x i , and of defection given i defectors, y i , we can calculate the strategy favored by natural selection. Moreover, as in Nowak (2006a), natural selection favors cooperation over defection if and only if x 1 > y 1 . Likewise, natural selection favors defection over cooperation if and only if y 1 > x 1 (Nowak, 2006a). Additionally, natural selection favors cooperation over neutral drift if and only if x 1 > 1/n = the probability of fixation given natural drift (Nowak, 2006a). Likewise, natural selection favors defection over neutral drift if and only if y 1 > 1/n (Nowak, 2006a). In fact, We defer the proof to appendix D. Also, G = 1, implies neutral drift, since and We defer proofs of the two preceding assertions to Appendix D. Additionally if G = 1, then there is neutral drift, as we demonstrated above, so y 1 = 1/n. Thus, if G > 1, y 1 > 1/n > x 1 ; if G = 1, then y 1 = 1/n = x 1 ; and otherwise, i.e 0 < G < 1, y 1 < 1/n < x 1 . Additionally, noting that if the model is not experiencing neutral drift, then recalling that (1 + exp(−γ(π c − π d )))/(1 + exp(γ(π c − π d ))), clearly Likewise, Also, G = 1 if and only if π c − π d = 0. Thus, there are three possibilities: 1) Natural selection favors cooperation over neutral drift, and neutral drift over defection (π c − π d > 0), or 2) Natural selection favors neither cooperation nor neutral nor defection one over the other, (π c − π d = 0), or 3) Natural selection favors defection over neutral drift, and neutral drift over cooperation (π c − π d < 0).
Thus, the sign of π c −π d , a function of the probability that a given player opts out α, the game size N , the population size n, and the return on investments by cooperators, r, exclusively determines which strategies, cooperation or defection, natural selection favors one over the another and whether or not natural selection favors each strategy over neutral drift.
This has profound implications. Primarily, there exists a minimum value of r, R, for given N and α such that r > R implies that π c − π d > 0, r < R implies that π c − π d < 0, and r = R implies that π c − π d = 0. Indeed, recalling that , and noting that by the lemma in Appendix where R(α) is defined for [0,1). Simplifying, demonstrating that on [0,1), R is also the quotient of two polynomials of degree N , and hence is continuous. By analogous proofs, π c − π d = 0 if and  (a) and (b), and for π c − π d , as in (c) and (d). If π c − π d > 0, the fixation probability starting with one cooperator is always larger than the same given neutral drift which is in turn always larger than that of one defector. On the other hand, if π c − π d < 0, then the situation is reversed. That is, the fixation probability starting with one defector is always larger than the same given neutral drift which is in turn always larger than that of one cooperator. Notably, the graphs for π c − π d < 0, may be obtained from the graphs for π c − π d > 0 simply by relabeling cooperators as defectors and vice-versa. This is because reversing the sign of π c − π d is equivalent to inverting p cd /p dc . Also, the values chosen for π c − π d are possible for the given values of n.
only if r = R(α) and π c − π d < 0 if and only if r < R(α). Additionally, on [0,1), (we defer the proof to Appendix D), so it is always possible to choose r such that natural selection favors cooperation. Moreover, as proven in Appendix E, R(α) is strictly decreasing on [0,1). Thus, given investment r = R, there is a threshold α 0 such that α > α 0 implies natural selection favors cooperation. This threshold is analogous to the threshold on the proportion of individuals who choose to opt-opt suggested by Hauert et al. (2002b), which deals with an infinite rather than finite population and with planned rather than unplanned non-participation. Moreover, this threshold is the value of α satisfying r = R(α). Thus, as α increases, the requirements on r such that natural selection favors cooperation become less and less stringent. In other words, increasing the probability for players to be unable to participate facilitates cooperation.

Adaptive Dynamics in Finite Populations
Considering that increasing the probability of non-participation facilitates cooperation, it may be surprising that the adaptive dynamics for the two player game discussed in The Model indicates that natural selection will push individuals to always defect when participating or to never participate. To see why, we consider a population consisting of two types of players, type one and type two, defined by their strategies (β 1 , α 1 ) and (β 2 , α 2 ), respectively. Otherwise maintaining the notation used in section 3.1, the expected payoff for players of type 1 is We defer the derivation of the expected payoff for players of type 1 to Appendix F. Moreover, since the game is symmetric, the expected payoff for players of type 2 may be determined simply by replacing the number of players of type 1, i, with the number of players of type 2, n-i, and by switching subscripts. Specifically, the expected payoff for players of type 2 is Continuing to use the pairwise comparison model, the probability that a player of type 1 will adopt the strategy of a player of type 2 given that the player of type 1 updates and the player of type 2 compares is where γ is a selection pressure, just as in section 3.1. Similarly, the analogous probability for players of type 2 is Then, again following the method proposed by Nowak (2006a), the fixation probability of a player of type 1 given i players of type 1 in a population of players of type 2 is For the remainder of this section, we will assume players of type 2 compose the invaded population, and hence we will drop the subscripts on α 2 and β 2 .
To investigate the adaptive dynamics, consider The direction given by f for (α, β), plotting f as a vector field, is the direction in the strategy space which maximizes the fixation probability of the invading mutant population given one invading mutant, x 1 . Following the directions which maximize x 1 in the strategy space starting at an initial (α, β), that is, following the streamlines of f , indicates the most likely path in the strategy space that a population will take as mutants with similar strategies eventually fixate in the population, as suggested by Imhof and Nowak (2010). Moreover, applying the StreamPlot function of Mathematica to the model for various combinations of r and σ in a population of size n indicates that the probability an individual cooperates will decrease and that increasing r or decreasing σ will facilitate participation. Notably, Mathematica demonstrates that for γ = 1 and lim Unfortunately, the problem proves too complicated to calculate a closed-form solution of f for every γ. Nevertheless, we conjecture that for any γ, and lim (30) and (31) imply (28) and (29), respectively, and hold for a variety of other test values of n, r, σ, and γ. In particular, (30) and (31) both hold if β = 0.
Moreover, if (31) holds, then cooperation is never stable if initially α 1, and each individual in the population tends towards always defecting, i.e, Figure 3: Coevolution of Cooperation and Stochastic Opting-out. Shown are the adaptive dynamics using the stream plot function of Mathematica in a finite population of size n = 5 for selection strength γ = 1 and various values of return on investment, r, and payoff for non-participants σ. Following the arrows leads to the most likely path the population will take in the strategy space. Observe that as r increases or σ decreases the population tends to participation at a faster rate or the population tends to non-participation at a slower rate, where the rate is indicated by the slope of the arrows. Also, the population always tends to defection when participating, and otherwise the population appears to tend to non-participation. However, increasing α decreases the rate at which individuals in the population tend to complete defection. β → 0. Thus, the sign of the right-hand-side of (30) becomes the sign of σ when n > 2 and 0 otherwise, (although if n = 2 the right-hand side of (30) is always 0). Hence, if σ < 0, each individual in the population tends towards always defecting and always participating if (30) is valid. If σ = 0 or n = 0, (30) and (31) demonstrate that defection with some degree of participation is stable, but cooperation is not. Instead, if σ > 0, (30) and (31) show that α → 1 anyways. On the other hand, if initially α → 1, α remains near 1 by (30) and (31). However, if α → 1, nobody participates (everyone gets the same payoff σ) and thus neutral drift allows the establishment of cooperation along the edge α = 1. Also, if (31) is valid, increasing α increases lim (α 1 ,β 1 )→(α,β) (∂x 1 /∂β 1 ), i.e increasing α decreases the rate at which individuals in the population tend towards complete defection. Moreover, from Eq. (31), we can obtain a possible rest point β * = σ/(r − 1) on the edge of α = 1, as long as the value of β * ∈ (0, 1). This can be confirmed in Fig. 3(b2) and Fig. 3(c2).

Conclusion
Notably, for games where every player participates, i.e α = 0, the threshold return on investment, R(0), above which natural selection favors cooperation is the game size, N . Hence, if the game size is reduced by a factor (1 − α), where 0 < α < 1, the threshold value on investment is N (1 − α). Moreover, if instead α is the probability that any given player does not participate, the law of large numbers suggests that for very large game sizes, the number of people participating in the game will be N (1 − α). If the game size is very large but is small with respect to the population size, this is exactly the threshold value R(α) for return on investment above which natural selection favors cooperation. Hence, for very large games which are small with respect to the population size, reducing α appears to be the sole factor which facilitates cooperation.  However, if population size and game size are both very large but population size is no longer arbitrarily large with respect to game size, there is a second factor at work. In the equation for the threshold, R(α), this second factor arises from the term ((n − 1)/N )α(1 − α N −1 )/[1 − α]. This factor, always positive, reduces the threshold R at every positive value of α, thereby facilitating cooperation. Furthermore, if the game size is small but population size is still very large population, R → 2 as α → 1. Also considering that R is strictly decreasing implies that the threshold curve R(α) also satisfies R(α) > N (1 − α) for large α, so there appears to be some other factor which resists cooperation in small groups. Specifically, this factor occurs at least in part because for 0 << α < 1, games become rare and the vast majority of games become two player games, where natural selection favors cooperation if and only if the return on investment by cooperators is larger than 2.
Despite increasing α always reducing the threshold value for cooperation, the adaptive dynamics suggest that in the presence of minute and rare mutations individuals in the population always tend towards always defecting or never participating. Nevertheless, the adaptive dynamics also indicate that the rate at which the population tends to defection is slower for larger values of α. So, while assuming that players have a fixed probability of nonparticipation in the adaptive dynamics does not make cooperation stable in the presence of rare and minute mutations, by decreasing the rate at which the population tends to defection, it essentially increases the time which the population spends at higher levels of cooperation. Also, cooperation emerges on the edge α = 1. Ultimately, either in the presence of rare and minute mutations or not, assuming players are unable to participate with a fixed probability facilitates cooperation.

Appendix A. Derivation of π d
We define the probability that an event E occurs be denoted by P(E), and let the probability that E occurs given a second event F occurs be denoted by P (E|F ). Then, We have verified via Mathematica and via Hauert et al. (2002b) that Noting that where x c is replaced by x c − 1/(n − 1), it follows that Again, we have verified via Mathematica and via Hauert et al. (2002b) that

Appendix C. Transition Matrix
We define P be the transition matrix for the Markov chain formed by repeatedly iterating pairwise comparison. Then, P i,i−1 = p cd i(n − i)/[n(n − 1)], and P i,i+1 = p dc i(n − i)/[n(n − 1)], for i=2, 3, ..., n-1. Since the only other transition from i cooperators per iteration is the absence of transition, P i,i = 1 − P i,i−1 − P i,i+1 , and the remaining entries in the i th row are 0. Also considering that i = 0 cooperators and i = n cooperators are absorbing states, it follows that P is the tridiagonal (n+1)x(n+1) matrix Fortunately, the calculation P k as k → ∞ is relatively straightforward. Indeed, the calculated the fixation probabilities x i in (11), and y n−i in (13), represent, respectively, the last and first entries in the i th row of lim n→∞ P n .
Also considering that the entries in any given row of P n must sum to 1 as P n is a stochastic matrix, and that x i + y n−i = 1, it follows that Thus, lim n→∞ XP n converges to a vector of the form (a, 0, ..., 0, b). Namely, the set of vectors of the form (a, 0, ..., 0, b) is the set of eigenvectors of lim n→∞ P n , which in turn is the set of eigenvectors of P with eigenvalue 1. Moreover, if X = (P rob(i = 0), P rob(i = 1), ..., P rob(i = n)), then lim n→∞ XP n converges to a vector of the form (α, 0, ..., 0, β), where α+β = 1.
Since the set of vectors of the form (α, 0, ..., 0, β) with α + β = 1 is the set of stochastic eigenvectors of P with eigenvalue 1, it follows that depending on the initial probability vector for the system, X = (P rob(i = 0), P rob(i = 1), ..., P rob(i = n)), the system can potentially converge to any stochastic eigenvector.
Appendix D.6. Proof that as n/N → 0, R(α) > N (1 − α) . Hence, which is true for α ∈ (0, 1). D.43 holds if and only if the denominator of the right-hand-side of D.42 is positive. This is true by the lemma.