Significance
Cooperators in biological systems often need some advantage to persist in the presence of selfish defectors, but knowing which strategies or behaviors will impact the outcomes of cooperation games remains a challenge. We demonstrate that modeling games as networks of spatially arranged ecological communities allows one to know whether any strategy will or will not impact the outcomes of any game played on all spatial configurations, without relying on a limited set of examples. By applying the general theory to the so-called snowdrift game, with cooperators who avoid defectors, we show exactly when a defector avoidance strategy can be beneficial and how the long-term outcomes of cooperative behaviors depend on the spatial arrangement of locations where games are played.
Keywords: cooperation, metacommunity, network, game, dispersal
Abstract
Consider a cooperation game on a spatial network of habitat patches, where players can relocate between patches if they judge the local conditions to be unfavorable. In time, the relocation events may lead to a homogeneous state where all patches harbor the same relative densities of cooperators and defectors, or they may lead to self-organized patterns, where some patches become safe havens that maintain an elevated cooperator density. Here we analyze the transition between these states mathematically. We show that safe havens form once a certain threshold in connectivity is crossed. This threshold can be analytically linked to the structure of the patch network and specifically to certain network motifs. Surprisingly, a forgiving defector avoidance strategy may be most favorable for cooperators. Our results demonstrate that the analysis of cooperation games in ecological metacommunity models is mathematically tractable and has the potential to link topics such as macroecological patterns, behavioral evolution, and network topology.
Cooperation, behavior that leads to benefits for others at a cost to oneself, is widespread across biological systems, ranging from cells cooperating to form organisms, to cooperation among individuals in populations and among microbiotic and macrobiotic taxa in ecosystems. In many cases the costs of cooperation are high. Hence, how cooperative behavior persists in a population represents a fundamental question in biology (1–8). In general, cooperation is most likely to evolve and persist if there are mechanisms that directly or indirectly benefit cooperators’ reproductive success. Examples include kin selection, punishment of defectors who forgo the cooperative investment, or a direct self-benefit such as in cases of investment into a common good (4).
Among the most general mechanisms that can favor cooperation is the notion of network or spatial reciprocity (1, 9–11). In classical examples of reciprocity, cooperation creates favorable conditions for other proximal cooperators (4). A result is the emergence of cooperative havens, where the rewards generated by mutual cooperation have enriched some physical or topological neighborhoods. The formation of cooperative neighborhoods in structured populations, where individuals interact with only a limited subset of the population, has traditionally been studied on networks, where each node represents an individual agent and an edge means that the two connected individuals play against each other (1, 10, 12–19). By assuming weak selection and treating space implicitly, the resulting systems can often be analyzed mathematically. Although this framework has become a powerful tool for conceptual understanding, it represents a strong abstraction from real-world ecology where interactions, and hence cooperative behaviors, occur often randomly within a location that is itself embedded in a larger spatial context (20–23). By focusing on spatially explicit models of cooperation, we gain the opportunity to understand feedbacks between the rules of the game, movement strategies, and long-term persistence of cooperation at larger scales (10, 20, 23–27).
Here we study a model of cooperation in spatially structured populations inspired by ecological metacommunities (21–23, 28), where network nodes—instead of individuals—represent habitat patches containing many interacting individuals, and edges mean that two patches are connected by dispersal of those individuals (Fig. 1A). Each patch is a location where games are played, harboring cooperator and defector subpopulations which grow and shrink in time due to internal interactions and movement among locations. Metacommunity models allow one to represent the effects of physical spatial structure directly and explicitly. Moreover, they can be analyzed using master stability functions, which can be used to untangle the impacts of local dynamics and network structure (28–30). We use this ability to explore how different movement strategies impact the outcomes of a cooperation game as a function of network structure.
Fig. 1.
Emergence of a heterogeneous stationary state on a two-patch network. (A) Schematic of the spatial game, showing local payoff (Π) relationships among cooperators and defectors occupying the same patch (gray circles) and the dispersal route between them. (B) Difference in equilibrium densities of both types in patches 1 and 2 as link strength is varied. Arrows refer to the example time series shown in C and D. Initial conditions were uniformly drawn from , and the patch with the largest initial cooperator density is patch 1. (C) The homogeneous steady state, with the same equilibrium densities of C and D across locations. (Inset) Network showing the proportions of each type in each patch. (D) The same game but with faster diffusion (larger δ), showing emergence of a heterogeneous steady state with higher cooperator densities in patch 1. Parameters are R = 3, , T = 5, , μ = 1, and .
Results
We start by illustrating the existence of sharp thresholds in the onset of spatial reciprocity by considering the well-studied snowdrift game (3, 31) on a spatial network of two patches (Fig. 1A) and showing when a specific dispersal strategy for relocating between patches can lead to the formation of cooperative safe havens for this game. Most of the assumptions made here will be relaxed in the next section where we present the general theory, which can be extended to any scenario with minor modifications (28), including to n-strategy games (27), higher-order interactions (32), and explicit resource- or object-mediated cooperation (7, 33).
Introductory Example.
Consider a spatial network of two linked nodes, where each node is a habitat patch in which organisms live, interact, and reproduce. The link between them represents an avenue of dispersal that individuals occasionally use to disperse to the other patch (Fig. 1A). Some of the individuals within each patch i are cooperators (Ci) who make an investment that creates a shared benefit, whereas other individuals are defectors (Di) who forego this investment. Within patches, individuals undergo random pairwise encounters defined by a payoff matrix
| [1] | 
which specifies rewards for mutual cooperation R (C encounters another C), the sucker’s payoff S (C encounters D), the temptation to defect T (D encounters C), and the punishment for mutual defection P (D encounters another D); the payoffs satisfy to define a snowdrift game (31, 34).
We focus first on a straightforward dispersal strategy for cooperators in a spatial setting: attempting to avoid defectors. Suppose that the defector avoidance strategy is such that cooperators leave a patch if they have been cheated in multiple consecutive interactions. Although easy to motivate psychologically, the choice to allow the cooperators to selectively “walk away” from a patch remains less explored as authors are generally hesitant to give cooperators such an ability that confers a direct advantage (35, 36). As we show below, defector avoidance is not always beneficial for cooperators, often leaving outcomes unchanged. However, when a threshold in network connectivity is crossed, self-organized patterns form where some patches maintain significantly higher or lower cooperator densities indefinitely.
In the model, individuals in both patches are subject to population dynamics of the form
| [2a] | 
| [2b] | 
where G, M, and E are functions of cooperator and defector densities that are described below and represent the effects of reproduction, mortality, and dispersal, and δ is the link strength of the spatial network.
We assume that the reproduction of individuals is directly proportional to the payoff that they achieve in the game. Using mass-action laws for the encounters, this yields the reproduction rates
| [3a] | 
| [3b] | 
where, following ref. 20, intrinsic growth and encounter rates are accommodated as part of R, S, T, and P. We assume density-dependent mortality, resulting in
| [4a] | 
| [4b] | 
where μ is a rate constant. Finally, the effects of dispersal are
| [5a] | 
| [5b] | 
where Z is the per capita rate at which individuals leave a habitat.
Here we consider a situation where defectors disperse at a constant rate , whereas cooperators leave if they have been cheated α times in a row (Materials and Methods),
| [6] | 
Exploring the model numerically for α = 3 (Fig. 1), we find that at low link strengths δ (i.e., low diffusion rates) the system approaches a homogeneous stable state, where each patch harbors the same relative densities of cooperators and defectors (Fig. 1 B and C; equilibrium densities are denoted by ). In this example, defectors are the most abundant type in all habitat patches, for all i (Fig. 1B). When the link strength is increased beyond a critical point, then the homogeneous state becomes unstable to perturbations, and the system undergoes a bifurcation and instead approaches a heterogeneous state (Fig. 1 B and D), where the cooperators constitute a majority in one patch while they largely abandon the other.
General Theory.
We now describe a general theory for the stability of homogeneous states in a broad class of games on arbitrary patch networks, using a master stability function approach (28, 29). Consider a game with the following properties: 1) the interaction dynamics within a patch can be faithfully modeled by a system of differential equations and 2) if played on a single patch the system will approach a stationary state. Now consider this game on a network of patches, where 3) patches are of identical quality, 4) links are bidirectional and lossless, and 5) the emigration rate from a patch is proportional to the number of links. These conditions do not exclude very high-dimensional systems, strong nonlinearities, strong selection in the evolutionary dynamics, or complex decision rules [e.g., cross-diffusion, adaptive dispersal (23)].
Under the conditions above, at least one steady state exists where the communities in each patch are identical (e.g., Fig. 1C); we call these states homogeneous. In homogeneous states, community compositions are independent of spatial network topology and can be found, even for very large networks, by analyzing a patch in isolation (Materials and Methods). However, the stability of homogeneous states is sensitive to network topologies, and thus, stable homogeneous behavior may be possible on some patch networks, while instability may lead to heterogeneous behaviors emerging in others (28, 37–39).
The stability of homogeneous states can be computed from local linearizations of the dynamics, captured by the Jacobian matrix J. For a model with N heritable types or player strategies per patch and M patches, J has the dimension . However, the Jacobian is not an unstructured matrix but instead intricately reflects the structure of the system, which we can make explicit by writing
| [7] | 
where I is an N × N identity matrix, P is the Jacobian matrix for the game played on an isolated patch, the coupling matrix C is a Jacobian-like matrix that consists of partial derivatives of the emigration rates from one patch with respect to population sizes in that patch, L is the weighted Laplacian matrix of the patch network, and ⊗ is a Kronecker product (28, 37, 40) (see Materials and Methods for details on these matrices).
A stationary state is stable if all eigenvalues of the Jacobian matrix, , have negative real parts. Using Eq. 7 these eigenvalues can be computed as
| [8] | 
where Ev returns the set of eigenvalues of a matrix and κm is the mth eigenvalue of L (28) (Materials and Methods). An attractive feature of this approach is that it separates the impact of spatial network structure encoded in L from the effect of local dynamics. Specifically, it shows that the spatial network structure can affect the stability of the system only via the Laplacian eigenvalues, κ.
An alternative interpretation of Eq. 8 is to view κ as an unknown, real-valued parameter and define a master stability function that captures the general relationship between the structure of all patch networks and pattern-forming instabilities. The master stability function can be defined as
| [9] | 
where denotes the eigenvalue with the largest real part. If a particular value of κ leads to a positive S, , then we can say that any network with that Laplacian eigenvalue κ will be susceptible to pattern-forming instabilities for a particular game (P) and movement strategy (C). Because the effect of space is thus encapsulated in the Laplacian eigenvalues, the remaining eigenvalue problem in Eq. 9 is easier since the relevant matrix has the size , even for very large spatial networks.
To illustrate the master stability function let us return to the game from the introductory example, which we now consider on arbitrary networks described by a weighted adjacency matrix A, such that link weight between node i and j is Aij. In this more general case the game is described by the following equations:
| [10] | 
| [11] | 
where is the weighted degree of i.
Using the same parameters as before (Fig. 1), the nonspatial Jacobian P and the coupling matrix C calculated at equilibrium (Materials and Methods) are
| [12] | 
This leads to the master stability function (Fig. 2)
| [13] | 
Fig. 2.
The appearance of heterogeneous stationary states on arbitrary networks. Master stability function (Eq. 9) of the example snowdrift game. A vertical gray line marks for this game, above which spatial patterns emerge.
We can see that S > 0 on any network that has a Laplacian eigenvalue ; we refer to this as the critical κ, or , which is specific to the game but independent of the network structure on which the game is played.
For example, a pair of nodes connected by a single link of weight δ has a leading eigenvalue of . This shows that the homogeneous state in our example game must become unstable on such an isolated link if , which explains our previous observations (Fig. 1B). Together, the results from this section illustrate that the master stability function approach can be used to disentangle the impacts of game parameters from the impact of the topological structure of the underlying network.
Impact of Network Motifs.
There is a wealth of mathematical knowledge that links Laplacian eigenvalues to specific network properties. Because the Laplacian is symmetric, it must have an eigenvalue κ that is greater or equal to the largest eigenvalue in any subgraph of the network (41). Hence, if any motif in the network has an eigenvalue , the whole network must also have such an eigenvalue, and the homogeneous state must be unstable.
The subgraph rule allows us to extend our results on isolated links in the network to any link in the network. We can for instance say that the homogeneous state is unstable if there is any link of strength . Similar criteria can be constructed for any conceivable motif. For example, a node that is connected to n other nodes via links with a strength of least δ has an eigenvalue . This shows that the homogeneous state in our example game is definitely unstable if there is a node that has at least 15 links of strength 1 or more. It is also possible to derive sufficient criteria for stability of the homogeneous state. For example, Gershgorin’s theorem implies that any Laplacian eigenvalue obeys , where is the maximum weighted node degree in the network (41). Thus, in the example game the homogeneous state is guaranteed to be stable if (e.g., Fig. 1B).
The examples in the present section illustrate that one can derive topological stability criteria that link dynamical transitions to features of the network, such as the presence or absence of certain network motifs. Additional rules for specific kinds of networks (e.g., regular graphs and lattices) can also be derived (19, 42). Such criteria are particularly easy to formulate for games that are characterized by rising master stability functions, including our example system. As a next step we explore the conditions under which a game has this property.
The Value of Forgiving Dispersal Strategies.
Diffusion generally has an equalizing effect that favors homogeneous outcomes (23, 28, 43). Nonlinear mortality, which is needed in the model to avoid boundless growth, constitutes a further dampening force that drives the system to homogeneity. It can be shown that strong nonlinearities in the movement behavior are necessary to overcome this dampening and allow pattern formation. In our example game, the rule that a cooperator leaves, on average, when cheated α times in a row leads to factors (Materials and Methods). One can quickly verify that an overzealous dispersal strategy, where one leaves after being cheated for the first time, is not nonlinear enough to destabilize the homogeneous state. Thus, in a world where everybody is eager to emigrate to avoid defectors, emigration is useless as the conditions would become identical in all nodes. By contrast, a more forgiving strategy where agents only disperse after having been cheated 10 times in a row leads to very nonlinear dispersal functions that are likely to destabilize the homogeneous state. Thus, a forgiving dispersal strategy may be rewarded indirectly by the formation of safe havens for cooperation.
We tested the counterintuitive benefit of forgiving dispersal strategies in numerical experiments, where we considered a large number () of feasible steady states in systems with different parameter values (Table 1 and Materials and Methods). We focus only on systems where the homogeneous state is stable at sufficiently low values of coupling and then ask how much the coupling strength has to be increased to trigger instability. The results show that more forgiving strategies, where cooperators endure more contiguous interactions with defectors before emigrating on average, consistently lead to instability at lower coupling strength, even as the benefits to defection increase (Fig. 3). This provides further evidence that forgiving dispersal strategies favor the formation of spatially heterogeneous states.
Table 1.
Comparison of the fitted potential energy surfaces and ab initio benchmark electronic energy calculations
| Parameter | Interpretation | Value | 
|---|---|---|
| R | Reward from mutual cooperation | |
| S | C reward when encountering D | |
| T | D award when encountering C | |
| P | Punishment from mutual defection | |
| μ | Per capita mortality rate | U(0, 1) | 
Nomenclature for the TSs refers to the numbered species in the table.
Fig. 3.
Correlation between and key parameters: normalized temptation, T – R, and the tolerance for consecutive defector encounters, α. Points and error bars show mean ± SEM, which are too small to see for most values. Parameter ranges are given in Table 1.
Locations of Safe Havens for Cooperation.
So far we have shown that defector avoidance has no impact on the outcomes of the game unless certain thresholds are crossed, which in turn can be linked to topological features of the underlying network. We now use simulations to explore the behavior beyond this threshold. For illustration we consider 100-node random geometric graphs, which provide a reasonable approximation for real networks of habitats and the dispersal connections between them (23). The coupling strength κ is chosen for each simulation such that it exceeds the threshold value (Eq. 9) at which the homogeneous state becomes unstable.
Visual inspection of simulated metacommunities quickly reveals that some of the nodes become cooperator dominated. Moreover, these safe havens of cooperation seem to occupy locally well-connected nodes but not the most highly connected nodes in the whole network (Fig. 4A).
Fig. 4.
(A) Snapshots of dynamics on an example network with (gray line in Fig. 2). Nodes show the proportion of cooperators (blue) and defectors (red); node radius is proportional to . Parameters are the same as in Fig. 1. (B) Simulations on 1,000 random geometric graphs, showing the association between relative cooperator densities at equilibrium () and patch eigenvector centrality (bin means ± SEM).
In network science the number of connections (degree centrality) is a relatively crude notion of the topological importance of a node in the network. A more sophisticated metric is provided by adjacency-based eigenvector centrality (44), which is loosely related to Google’s PageRank (45) algorithm. Analyzing an ensemble of 1,000 network simulations (parameters as in Fig. 1) reveals that the nodes of lowest eigenvector centrality become defector dominated, whereas better connected nodes with a higher centrality can sustain a majority of cooperators. However, the most-central nodes in each network are a toss-up, containing almost equal populations of defectors and cooperators (Fig. 4B). Hence, at least in our example game, the locations where cooperative safe havens form are highly connected nodes, but not the most-highly connected nodes, and this pattern is seen consistently across distinct spatial networks.
Shortwave Instabilities and Other Dispersal Strategies.
A distinctive feature of the example game is that it is unstable for sufficiently high values of κ. Drawing on an analogy with pattern formation in continuous space, we call this behavior shortwave instability.
As pointed out in refs. 28, 30, 37, there is a deep analogy between the master stability function on networks and the Turing instability in partial differential equations (PDEs). The master stability function equation becomes identical to Turing’s seminal approach if we replace the negative network Laplacian with the Laplace operator in continuous space. The eigenvalue κ can then be interpreted as a wave number. A rising master stability function shows that the instability is most pronounced at arbitrarily high wave numbers, i.e., arbitrarily short waves, which would be unphysical in PDE systems, but is meaningful in a network.
To explore when shortwave instabilities occur, consider that except for some pathological cases, we can assume that as the weighted degree of at least one node in the network approaches infinity,
| [14] | 
as P becomes negligible in comparison to . This shows that the shortwave instability occurs when the dispersal strategy is such that C has a negative eigenvalue. For games with two types (C and D) the coupling matrix has the form.
| [15] | 
At least one eigenvalue with negative real part exists if either
| [16] | 
or
| [17] | 
One can think of the two terms in the first condition as the degree to which cooperators promote the emigration of cooperators () and vice versa for defectors. Hence, the first condition is met if cooperators suppress the emigration of cooperators strongly enough to overcome the effect of defectors promoting their own emigration. Assuming that presence of defectors promotes the emigration of both cooperators and defectors we can write the second condition as . The fraction on the right-hand side can be assumed to be negative or zero because the presence of cooperators should reduce defector emigration or leave it unchanged in reasonable models. By contrast the left-hand side can be positive as can either be negative, due to retention of cooperators in a cooperative environment, or positive due to the mass-action effect leading to a positive scaling of cooperator emigration with cooperator numbers. However, the condition can again be satisfied if cooperators suppress their own emigration strongly enough.
Summarizing these results, we can say that shortwave instabilities are primarily expected in those systems where cooperators strongly (nonlinearly) increase the retention of other cooperators in their patch. The defector avoidance rule analyzed in this paper is a special case of this general condition.
Discussion
We showed that ecologically motivated models of cooperation games on networks can be studied mathematically. In particular, the master-stability function approach from synchronization provides a powerful tool to explore when a particular game will lead to heterogeneous states where spatial reciprocity becomes possible and safe havens for cooperation can be formed.
A focus of prior work has been on understanding the evolution and persistence of cooperation in structured populations, where individuals interact through pairwise encounters that constitute a network (1, 9, 13–15, 46), or via diffusive public goods (7, 8, 47), sometimes on a featureless, continuous spatial plane (25, 26). In this study, we build on this work by studying populations that are structured in a different way, namely, as patchy communities where interactions occur randomly within patches and movement among patches in a spatial landscape define the network links (Fig. 1A). We find that cooperation can thrive in metacommunities but that it is mediated by the ability of cooperators and defectors to move between patches. Our findings indicate that the specific movement strategies deployed by both cooperators and defectors are an important factor in the maintenance of cooperation in spatially structured populations (e.g., Eq. 17). Future work could explore this result in metacommunities of heterogeneous habitat patches (48, 49) or with lossy links, with individuals who follow adaptive dispersal strategies (50), or in systems with multiple interaction types (33, 51–53). Extending our results to nonstationary dynamics will also be useful for understanding more complicated games that show different types of pattern-forming instabilities (Materials and Methods).
The work presented here revealed two main findings which some readers may find counterintuitive: First, allowing cooperators to emigrate selectively (23, 35, 36), in response to defector density, does not always confer a direct benefit to the cooperators. Defector avoidance can only result in an increased payoff for cooperators if it is sufficiently strong to overcome a sharply defined threshold, where the system leaves the homogeneous state. The master stability function approach allows us not only to compute this threshold precisely but to disentangle the effects of the game and the underlying network topology. This opens up a promising angle for future investigations on the impact of specific scenarios and specific network motifs.
Our second major finding concerns the role of forgiving dispersal strategies in triggering shortwave instabilities. The shortwave instability is a genuine network effect that would not be observed in continuous geometries. Based on our findings we expect this instability to occur particularly if the cooperators respond strongly nonlinearly to cooperation levels. Namely, the instability may be triggered by forgiving dispersal strategies where the cooperator only leaves a patch after being cheated several times in consecutive games. Therefore, forgiving dispersal strategies may be far more beneficial than stricter responses. In many scenarios only the forgiving strategy will induce the heterogeneity in the system that ultimately creates safe havens for cooperation, whereas a stricter more immediate response to defection will result in maladaptive dispersal in a system of identical patches.
One possible criticism may be that even in the heterogeneous state, cooperation does not become widespread but mostly remains confined to some nodes which typically occupy central (but not most-central) positions in the network. We nevertheless believe that the formation of such hubs for cooperation can be an important stepping stone in the evolution of higher forms of cooperation and social complexity. Beyond the scope of the class of models explored here, the formation of local cooperation hubs may enable secondary processes, such as the formation of social norms and governance structures, which once established can help promote cooperative behavior in the rest of the network.
Materials and Methods
Patch Steady States and Stability.
The class of systems considered here have homogeneous stationary states where all nodes approach the same state regardless of the topology of the underlying spatial network (Fig. 1 B and C). In these states the net biomass flows in and out of each patch must be equal, such that neither dispersal (selective or otherwise) nor network topology can affect population densities. In any homogeneous state, the densities of cooperators and defectors in any patch are therefore identical to densities in the nonspatial case (28) described by
| [18] | 
| [19] | 
Setting time derivatives to 0 in Eqs. 18 and 19, we find that the system has the three following homogeneous steady states that describe biomass densities across i identical patches: 1) only cooperators persist, with and ; 2) only defectors persist, with and ; and 3) cooperators and defectors coexist, with
| [20] | 
| [21] | 
The coexistence state is only biologically feasible if and , which places conditions on the relative payoffs each type of player can receive from interactions. This holds under two sets of conditions. The first occurs when and . In these cases, the payoff from an interaction with a defector is larger for defectors, while the payoff from an interaction with a cooperator is larger for cooperators. Alternatively, positivity occurs when P < S and R < T. This case includes the classical “snowdrift” game (34): a cooperator meeting a defector pays the entire cost but still experiences the benefits, while a defector encountering another defector results in no benefit to either (P < S). Meanwhile, a cooperator meeting another cooperator invests a fraction of the cost, while a defector meeting a cooperator gets the benefit for free (R < T).
The within-patch Jacobian matrix P in the coexistence steady state is
| [22] | 
which has eigenvalues
| [23] | 
Thus, when P > S and R > T, , and the system is always unstable. By contrast, if and , and so the state is stable as long as , such that . A stable homogeneous steady state, with coexistence of both types within each patch, exists if and only if and , proving that shortwave instability (e.g., Fig. 3) cannot occur in the prisoner’s dilemma since it violates these conditions by definition (3).
Spatial Networks and Dispersal.
To generate larger networks for simulations (Fig. 4), we randomly assign coordinates drawn from a uniform distribution to patches in a two-dimensional space. Patches are connected if the Euclidean distance between their coordinates falls below a threshold value . Simulations were conducted with the Mathematica 12.3.1.0 software.
To define the defector avoidance rule for emigrating from patches, first suppose that from the perspective of a cooperator, interactions occur at random time points, amounting to some effective rate r (i.e., a Poisson process). Assume further that in each interaction, the player is cheated with some probability p. In a sequence of n interactions, we find subsequences of α consecutive events, which can be treated as independent trials to very good accuracy. Each of the subsequences will consist of α cheating events with probability , and so the rate at which the player experiences α consecutive cheating events and then leaves is , explaining the form of Eq. 6.
A Master Stability Function Approach.
If we start in a homogeneous state, we cannot observe a beneficial effect of any dispersal strategy (e.g., defector avoidance) unless the homogeneous state loses stability, the system departs from the homogeneous state, and spatial patterns begin to form. Such patterns are characterized by an unequal distribution of cooperators and defectors, which can benefit cooperators.
To explore the stability of the homogeneous state we compute the Jacobian matrix J, with a dimension, where N is the number of player types and M is the number of patches in the spatial network. The Jacobian of the spatial system in the compact form can then be expressed as
| [24] | 
where I is the identity matrix, L is the Laplacian matrix of the spatial network (), and C is the coupling matrix (). The Laplacian matrix is constructed by setting and subtracting A, where A is the weighted adjacency matrix. For the case of defector avoidance, the coupling matrix is
| [25] | 
where
| [26] | 
As the matrix J has a block structure, its eigenvectors also have a similar structure (28), , where is an N-dimensional vector and is an M-dimensional vector. Let be an eigenvector of L with eigenvalue κ, such that . Also, let be an eigenvector of with eigenvalue λ. Then, is an eigenvector of J with eigenvalue λ as the following calculation shows:
| [27] | 
| [28] | 
| [29] | 
| [30] | 
| [31] | 
Since all eigenvectors of J can be constructed in this way, the complete spectrum of J is then
| [32] | 
where κm is the mth eigenvalue of L (28). Since every Laplacian eigenvalue κi generates a set of Jacobian eigenvalues which is independent of the other Laplacian eigenvalues, Eq. 32 defines a master stability function using only knowledge about the local system (P) with some minor modifications to account for spatial processes (C). This method therefore permits the fast computation of the leading Jacobian eigenvalue for a given Laplacian eigenvalue.
The resulting function is then a master stability function for the metacommunity. To achieve stability, all eigenvalues of the Jacobian need to have negative real parts, which means only when Tr and Det if any Laplacian eigenvalue falls into a range where the master stability function is positive. This enables us to analyze the stability of the spatial reaction–diffusion system by first computing the spectrum of the Laplacian matrix.
Acknowledgments
We thank U. Bhatt, A. M. Hein, B. T. Martin, and S. Munch for helpful discussions. A.K.F. was supported by the Research Associateship Program from the National Research Council of the National Academies of Sciences, Engineering, and Mathematics. F.Z. was supported by the China Scholarship Council–University of Bristol Joint Scholarships Programme. S.A.L. was supported by the Army Research Office Grant W911NF-18-1-0325. T.G. was supported by the Ministry for Science and Culture of Lower Saxony (Helmholtz Institute for Functional Marine Biodiversity project) and the Volkswagen Foundation (Grant ZN3285).
Footnotes
The authors declare no competing interest.
This article is a PNAS Direct Submission.
Data, Materials, and Software Availability
There are no data underlying this work.
References
- 1.Nowak M. A., May R. M., Evolutionary games and spatial chaos. Nature 359, 826 (1992). [Google Scholar]
- 2.Smith J. M., Szathmáry E., The Major Transitions in Evolution (WH Freeman Spektrum, Oxford, United Kingdom, 1995). [Google Scholar]
- 3.Doebeli M., Hauert C., Models of cooperation based on the prisoner’s dilemma and the snowdrift game. Ecol. Lett. 8, 748–766 (2005). [Google Scholar]
- 4.Nowak M. A., Five rules for the evolution of cooperation. Science 314, 1560–1563 (2006). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.Von Neumann J., Morgenstern O., Kuhn H. W., Theory of Games and Economic Behavior (Princeton University Press, 1944). [Google Scholar]
- 6.Pennisi E., On the origin of cooperation. Science 325, 1196–1199 (2009). [DOI] [PubMed] [Google Scholar]
- 7.Butler S., O’Dwyer J. P., Cooperation and stability for complex systems in resource-limited environments. Theor. Ecol. 13, 239–250 (2020). [Google Scholar]
- 8.Muscarella M. E., O’Dwyer J. P., Species dynamics and interactions via metabolically informed consumer-resource models. Theor. Ecol. 13, 503–518 (2020). [Google Scholar]
- 9.Hauert C., Doebeli M., Spatial structure often inhibits the evolution of cooperation in the snowdrift game. Nature 428, 643–646 (2004). [DOI] [PubMed] [Google Scholar]
- 10.Ohtsuki H., Hauert C., Lieberman E., Nowak M. A., A simple rule for the evolution of cooperation on graphs and social networks. Nature 441, 502–505 (2006). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.Li X., et al., Punishment diminishes the benefits of network reciprocity in social dilemma experiments. Proc. Natl. Acad. Sci. U.S.A. 115, 30–35 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Ifti M., Killingback T., Doebeli M., Effects of neighbourhood size and connectivity on the spatial continuous prisoner’s dilemma. J. Theor. Biol. 231, 97–106 (2004). [DOI] [PubMed] [Google Scholar]
- 13.Lieberman E., Hauert C., Nowak M. A., Evolutionary dynamics on graphs. Nature 433, 312–316 (2005). [DOI] [PubMed] [Google Scholar]
- 14.Hauert C., Spatial effects in social dilemmas. J. Theor. Biol. 240, 627–636 (2006). [DOI] [PubMed] [Google Scholar]
- 15.Langer P., Nowak M. A., Hauert C., Spatial invasion of cooperation. J. Theor. Biol. 250, 634–641 (2008). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Floría L. M., Gracia-Lázaro C., Gómez-Gardeñes J., Moreno Y., Social network reciprocity as a phase transition in evolutionary cooperation. Phys. Rev. E Stat. Nonlin. Soft Matter Phys. 79, 026106 (2009). [DOI] [PubMed] [Google Scholar]
- 17.Traulsen A., Semmann D., Sommerfeld R. D., Krambeck H. J., Milinski M., Human strategy updating in evolutionary games. Proc. Natl. Acad. Sci. U.S.A. 107, 2962–2966 (2010). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Santos M. D., Pinheiro F. L., Santos F. C., Pacheco J. M., Dynamics of N-person snowdrift games in structured populations. J. Theor. Biol. 315, 81–86 (2012). [DOI] [PubMed] [Google Scholar]
- 19.Allen B., Lippner G., Nowak M. A., Evolutionary games on isothermal graphs. Nat. Commun. 10, 5107 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Durrett R., Levin S., The importance of being discrete (and spatial). Theor. Popul. Biol. 46, 363–394 (1994). [Google Scholar]
- 21.Holyoak M., Leibold M. A., Holt R. D., Metacommunities: Spatial Dynamics and Ecological Communities (University of Chicago Press, 2005). [Google Scholar]
- 22.Leibold M. A., Chase J. M., Metacommunity Ecology (Princeton University Press, 2017). [Google Scholar]
- 23.Gross T., et al., Modern models of trophic meta-communities. Philos. Trans. R. Soc. Lond. B Biol. Sci. 375, 20190455 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Levin S. A., The problem of pattern and scale in ecology. Ecology 73, 1943–1967 (1992). [Google Scholar]
- 25.Wakano J. Y., Nowak M. A., Hauert C., Spatial dynamics of ecological public goods. Proc. Natl. Acad. Sci. U.S.A. 106, 7910–7914 (2009). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Wakano J. Y., Hauert C., Pattern formation and chaos in spatial ecological public goodsgames. J. Theor. Biol. 268, 30–38 (2011). [DOI] [PubMed] [Google Scholar]
- 27.Hauert C., Doebeli M., Spatial social dilemmas promote diversity. Proc. Natl. Acad. Sci. U.S.A. 118, e2105252118 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 28.Brechtel A., Gramlich P., Ritterskamp D., Drossel B., Gross T., Master stability functions reveal diffusion-driven pattern formation in networks. Phys. Rev. E 97, 032307 (2018). [DOI] [PubMed] [Google Scholar]
- 29.Pecora L. M., Carroll T. L., Master stability functions for synchronized coupled systems. Phys. Rev. Lett. 80, 2109 (1998). [Google Scholar]
- 30.Nakao H., Mikhailov A. S., Turing patterns in network-organized activator–inhibitor systems. Nat. Phys. 6, 544–550 (2010). [Google Scholar]
- 31.Smith J. M., Price G. R., The logic of animal conflict. Nature 246, 15–18 (1973). [Google Scholar]
- 32.Grilli J., Barabás G., Michalska-Smith M. J., Allesina S., Higher-order interactions stabilize dynamics in competitive network models. Nature 548, 210–213 (2017). [DOI] [PubMed] [Google Scholar]
- 33.Yeakel J. D., et al., Diverse interactions and ecosystem engineering can stabilize community assembly. Nat. Commun. 11, 3307 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Sugden R., et al., The Economics of Rights, Co-operation and Welfare (Springer, 2004). [Google Scholar]
- 35.Aktipis C. A., Know when to walk away: Contingent movement and the evolution of cooperation. J. Theor. Biol. 231, 249–260 (2004). [DOI] [PubMed] [Google Scholar]
- 36.Santos F. C., Pacheco J. M., Lenaerts T., Cooperation prevails when individuals adjust their social ties. PLOS Comput. Biol. 2, e140 (2006). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Segel L. A., Levin S. A., “Application of nonlinear stability theory to the study of the effects of diffusion on predator-prey interactions” in AIP Conference Proceedings (American Institute of Physics, 1976), vol. 27, pp. 123–152.
- 38.Levin S. A., Dispersion and population interactions. Am. Nat. 108, 207–228 (1974). [Google Scholar]
- 39.Levin S. A., Segel L. A., Pattern generation in space and aspect. SIAM Rev. 27, 45–67 (1985). [Google Scholar]
- 40.Othmer H. G., Scriven L. E., Instability and dynamic pattern in cellular networks. J. Theor. Biol. 32, 507–537 (1971). [DOI] [PubMed] [Google Scholar]
- 41.Anderson W. N. Jr., Morley T. D., Eigenvalues of the Laplacian of a graph. Linear Multilinear Algebra 18, 141–145 (1985). [Google Scholar]
- 42.Nakamaru M., Matsuda H., Iwasa Y., The evolution of cooperation in a lattice-structured population. J. Theor. Biol. 184, 65–81 (1997). [DOI] [PubMed] [Google Scholar]
- 43.Holt R. D., Food webs in space: On the interplay of dynamic instability and spatial processes. Ecol. Res. 17, 261–273 (2002). [Google Scholar]
- 44.Bonacich P., Factoring and weighting approaches to status scores and clique identification. J. Math. Sociol. 2, 113–120 (1972). [Google Scholar]
- 45.Page L., Brin S., Motwani R., Winograd T., “The pagerank citation ranking: Bringing order to the web” (Tech. Rep. 1999-66, Stanford InfoLab, 1999).
- 46.Roca C. P., Cuesta J. A., Sánchez A., Evolutionary game theory: Temporal and spatial effects beyond replicator dynamics. Phys. Life Rev. 6, 208–249 (2009). [DOI] [PubMed] [Google Scholar]
- 47.Butler S., O’Dwyer J. P., Stability criteria for complex microbial communities. Nat. Commun. 9, 2970 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 48.Brechtel A., Gross T., Drossel B., Far-ranging generalist top predators enhance the stability of meta-foodwebs. Sci. Rep. 9, 12268 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 49.Anderson K. E., Fahimipour A. K., Body size dependent dispersal influences stability in heterogeneous metacommunities. Sci. Rep. 11, 17410 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 50.Abrams P. A., Habitat choice in predator-prey systems: Spatial instability due to interacting adaptive movements. Am. Nat. 169, 581–594 (2007). [DOI] [PubMed] [Google Scholar]
- 51.Wilson W. G., Nisbet R. M., Cooperation and competition along smooth environmental gradients. Ecology 78, 2004–2017 (1997). [Google Scholar]
- 52.Pilosof S., Porter M. A., Pascual M., Kéfi S., The multilayer nature of ecological networks. Nat. Ecol. Evol. 1, 101 (2017). [DOI] [PubMed] [Google Scholar]
- 53.Yamauchi A., van Baalen M., Sabelis M. W., Spatial patterns generated by simultaneous cooperation and exploitation favour the evolution of altruism. J. Theor. Biol. 441, 58–67 (2018). [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
There are no data underlying this work.




