## Abstract

In recent years, there has been growing interest in the study of coevolutionary games on networks. Despite much progress, little attention has been paid to *spatially* embedded networks, where the underlying geographic distance, rather than the graph distance, is an important and relevant aspect of the partner rewiring process. It thus remains largely unclear how individual partner rewiring range preference, local vs. global, emerges and affects cooperation. Here we explicitly address this issue using a coevolutionary model of cooperation and partner rewiring range preference in spatially embedded social networks. In contrast to local rewiring, global rewiring has no distance restriction but incurs a one-time cost upon establishing any long range link. We find that under a wide range of model parameters, global partner switching preference can coevolve with cooperation. Moreover, the resulting partner network is highly degree-heterogeneous with small average shortest path length while maintaining high clustering, thereby possessing small-world properties. We also discover an optimum availability of reputation information for the emergence of global cooperators, who form distant partnerships at a cost to themselves. From the coevolutionary perspective, our work may help explain the ubiquity of small-world topologies arising alongside cooperation in the real world.

## Introduction

We are surrounded by a remarkable living world which is constantly being shaped by evolutionary dynamics^{1}. Ranging from multicellular organisms^{2}, to animal groups^{3}, to human societies^{4}, cooperation among individuals is indispensable to achieve such high levels of organizational complexity. However, cooperation cannot be taken for granted, since cooperators incur a cost to benefit others, and are thus prone to exploitation by selfish individuals^{5}. Therefore, understanding how cooperation evolves is a topic of interest to researchers from diverse fields^{6,7,8,9,10}.

Over the past decades, evolutionary game theory has been developed^{11} into a powerful approach to study the problem of cooperation in various biological, social and economic settings^{12,13,14,15}. It has shown that cooperation flourishes under a variety of mechanisms, including kin selection^{16}, group selection^{17}, and reciprocity^{18,19,20}, just to name a few (we refer to ref. 21 for a recent review).

Of particular interest is the so-called ‘network reciprocity’ ^{21}, where population structure plays a decisive role in the evolution of cooperation^{22,23,24,25,26,27,28}. Interactions among individuals are not random, but often exquisitely structured, for example, through social networks^{29}. This line of research is stimulated largely by the seminal work on spatial games^{30}, in which individuals are situated on a square lattice and only interact with their immediate neighbours. Ever since the boom of network science^{31,32}, games on networks have been extensively studied (for a comprehensive review we refer to ref. 33).

Moreover, population structure itself can also be the consequence of evolution. This notion led to the study of coevolutionary games on networks (or games on dynamical networks), in which both individuals’ behavioural strategies and their social connections undergo evolutionary changes (see, for example, ref. 34 for a recent review). Both theoretical models^{35,36,37,38,39,40,41,42,43,44,45} and behavioural experiments^{46,47,48,49,50} show that cooperation can prevail when individuals not only adjust their interaction strategies but also are able to switch their social interaction partners. Furthermore, previous studies reveal that network degree heterogeneity, an important topological feature favouring the evolution of cooperation, can result from partner switching processes^{35,37,44}.

When it comes to partner rewiring processes, to the best of our knowledge, little attention has yet been paid to the spatial element of social networks^{51,52}. From this perspective, the underlying geographic distance, rather than the graph distance, has an impact on influencing partner choice. Despite vast geographical distance segregating individuals around the globe, the profound small-world phenomenon or six degrees of separation, is ubiquitously found to be a common feature of real-world social networks^{53,54}. The question then arises: why do some individuals prefer to strike out and form distant partnerships, especially when doing so is potentially costlier than just interacting locally? We will address this question using a coevolutionary model of cooperation and partner rewiring range preference.

Although probed in a different context, prior work has demonstrated the emergence of small world phenomena by randomly rewiring links^{53} or adding long range links^{55}. In contrast, here we do not rewire networks exogenously by a given parameter, but rather let rewiring be endogenously controlled by individual preference.

Let us now turn to our model. As shown in Fig. 1, individuals are situated on a lattice network and engaged in two layers of social interactions that are different in their modifiability. The bottom layer network dictated by lattice distance *l* is viscous and static, whereas the top layer network comprising of individuals’ partners of lattice distance between *l* and *d* is fluid, and can be rewired according to their partner rewiring range preferences.

These layers embody the idea that people form relatively stable strong ties with a core group of close contacts, while having more transient ties with a wider group^{56}. In our model, we distinguish these two groups by spatial distance: local vs. distant. We work with the simplifying assumptions that rewiring range preferences are either global or local, and that these preferences evolve through social learning and cultural evolution^{57,58}. Our model aims to capture reasonable features of a social system, which we will use to find potential explanatory factors for the creation of connections between geographically distant individuals.

We give individuals agency using an existing evolutionary game theoretical framework^{35,36}. Under this framework, individuals play the prisoner’s dilemma^{59} with their partners, choosing to cooperate (C) or defect (D). When two individuals both cooperate, they each receive a payoff of 1. If they both defect, each of them instead receive a payoff of *u*, where 0 < *u* < 1. Finally, if one cooperates and the other defects, the cooperator gets 0 while the defector gets 1 + *u*. The parameter *u* represents the cost-benefit ratio of cooperation, and would generally result in a greater proportion of defectors when increased^{21,35,36,37}.

At each discrete time step, a random individual, with probability *w*, decides to rewire a connection from a low reputation partner to a new partner with potentially higher reputation, found within her rewiring range preference (global or local). Local rewiring incurs no cost, but global rewiring incurs a one-time cost *c*. The parameter *p* ∈ [0, 1] encodes the probability that she is able to find the high reputation individual and create a new link. While with probability 1 − *p*, she is unable to do so and simply creates a new link to a random individual within her rewiring range preference.

Otherwise, with probability 1 − *w*, the individual compares her payoff with that of a neighbour, via the Fermi equation^{60,61,62}, and decides whether to copy both the neighbour’s strategy and rewiring range preference. In general, larger values of *w* allow links to low reputation defectors to be severed rapidly and hence promote cooperation^{35,36,37}.

The model, as well as our simulations, are described in greater details in the methods section.

## Results

First, in Fig. 2, we compare the cases where individuals have Fig. 2a only global rewiring range preference, Fig. 2e only local rewiring range preference, and Fig. 2i when we have coevolution of strategy, C or D, with rewiring range preference, local or global. In Fig. 2i, individuals are initially assigned local or global rewiring range preference with equal probability.

Figure 2a shows that when individuals have only global rewiring range preference, cooperation arises. Snapshots Fig. 2b–d of the log number of partners for each individual taken at different point in time, shows that global rewiring helps cooperators attract partners across the entire population and grow into hubs. This promotes degree heterogeneity (see Supplementary Figure 1), and hence cooperation^{28,63,64}. On the other hand, Fig. 2e shows that cooperation is not favoured when individuals are restricted to only having local rewiring range preferences. As shown in Fig. 2g, the ability to rewire from low reputation partners to ones with potentially higher reputation aids cooperation in the short run. As *d* = 2 and *l* = 1, when node range preferences are local, new partners must be within distance 3. Consequently, the maximum number of partners under these assumptions is 24. This puts a limit on the level of heterogeneity (see Supplementary Figure 1), makes the population more vulnerable to invasion by defectors, and is deleterious to cooperation in the long run^{28,63,64}.

When we have coevolution of strategy with rewiring range preference, Fig. 2i shows that heterogeneity emerges in the short run and continues to develop in the long run, allowing cooperators to attract long range partners, and be dominant at equilibrium. Hence, we see that just having the option of long range partner rewiring favours cooperation in the long run. In Fig. 3, we see similar results for a wide variety of parameters combinations.

Supplementary Figure 2 compares the time evolution of the average path length and the average clustering coefficient^{53} of these three cases with that of an Erdös-Rényi (ER) random graph^{65} ensemble with the same average degree. Supplementary Figure 11 shows how the average path length varies with number of individuals *n*. When rewiring range preference is only global or allowed to coevolve with strategy, the average distance between individuals in the resulting network is close to that of the ER random graph ensemble, while the average clustering coefficient is close to an order of magnitude higher, and the average distance between individuals grows at a rate proportional to log *n*. Consequently, we classify these as small-world networks. On the other hand, with only local rewiring preferences, the average distance between individuals in the resulting network fails to be close to that of the ER random graph ensemble, grows faster than log *n*, and hence does not have the small-world property.

Figure 3a provide examples of combinations of *u* and *w* which favour cooperators with global range preferences. When this happens, we have an abundance of long range links, which is often sufficient for the small-world phenomenon to emerge^{53}. In particular, these global cooperators thrive under fast partner switching *w* and small cost-benefit ratio *u*, as shown by the lighter blue patches in the top left corner of Fig. 3a. When the probability of switching, *w*, is high, global cooperators rapidly delete links to defectors, and reliably find or attract other cooperators across great distances. A small cost-benefit ratio, *u*, makes it less likely for cooperators to become defectors, giving an opportunity for global cooperators’ advantage over local cooperators to take effect.

On the other hand, the orange patches in the bottom right corner shows that global defectors are dominant in the case of slow partner switching *w* and high cost-benefit ratio *u*. When *w* is low, cooperators cannot rapidly delete links to defectors. Furthermore, a high *u* influences the partners of defectors to turn into defectors. This saturates their local neighbourhoods with defectors, which is advantageous to global defectors who are able to seek out cooperators across the entire network. In these cases, even though long range links are plentiful, the inability to sustain cooperation make these scenarios undesirable as models of real world social systems.

In the parameter space where our evolutionary dynamics transits from most favouring global cooperators to global defectors, local cooperators can be most favoured. Although cooperation evolves under these conditions, the higher cost-benefit ratio *u* combined with the existence of a global rewiring cost *c* penalizes global cooperators in favour of local cooperators. From Figs 3b and 4b, we can see that even though global cooperators are necessary for the evolution of cooperation, they eventually switched to having a local rewiring range preference, because global cooperators could not form enough cooperative partnerships to offset the accumulated cost of global rewiring *C*, especially when the higher *u* encourages the population to have a larger proportion of defectors.

We also observe that even when defection is suppressed, global defectors are often more abundant than local defectors, due to their ability to find high reputation cooperators across the entire network. Examples of this are seen in Fig. 3b,c, which illustrates how the proportion of the four types of individual, global vs. local and cooperator vs. defector, evolves over time.

In Fig. 4a, we extend our analysis of favourable conditions for global cooperators by varying parameter *p*, while parameters *u* = 0.2 and *w* = 0.2 are fixed. In general, we see cooperation rises with *p*, as cooperators can more reliably find other cooperators after deleting a low reputation link. In particular, this increased availability of reputation information helps global cooperators form clusters of cooperators (see Supplementary Figure 3) through reputation based rewiring^{66}. Despite that, the equilibrium frequency of global cooperators are maximized at an intermediate availability of reputation information, *p* = 0.15, illustrated in Fig. 4b.

As availability of reputation information increases beyond *p* = 0.15, we see a lower proportion of defectors in the population in general, as cooperators are reliably able to sever low reputation links and connect to higher reputation individuals. This, together with the abundance of reputation information, allows local cooperators to more reliably rewire to cooperators despite not having the ability to find partners globally. The combination of these factors and the cost of global rewiring contribute to the decline of global cooperators in favour of local cooperators. This narrative is seen most clearly for large values of *p*, for example in Fig. 4c *p* = 0.5, in which global cooperators dominate the population initially, driving defectors to extinction, but is soon overtaken by local cooperators due to the cost of global rewiring.

Hence, the goal of maximizing the proportion of global cooperation and long range links can be accomplished only when there is intermediate availability of reputation information, and not when such information is lacking or in abundance.

## Discussion

In this paper, we proposed a mechanism for the emergence of the small world property, based on evolutionary dynamics, with assumptions that are plausible in real world networks. We do so by first placing individuals on a spatial lattice. We then use the lattice distance to define rewiring range preferences for each individual. In this setting, we studied the coevolution of strategy and rewiring range preference, in the presence of long range rewiring costs.

We find that despite the presence of costs, global cooperators can be favoured for some parameter combinations. For other parameter combinations, local cooperators can be favoured. In particular, for the parameters in Fig. 3a, given any cost-benefit ratio *u*, as the rewiring probability *w* is increased, there is a point where local cooperators first become dominant followed by global cooperators.

We focused on the more realistic scenarios in which cooperation is favoured at equilibrium, and observed that these cooperators with global rewiring preferences cause degree heterogeneity to emerge in the resulting networks. Some of these individuals become hubs, with many long distance links, contributing to the small world property. We also found that cooperators with global rewiring preference are maximized at intermediate availability of reputation information, and are discouraged at low or high levels of *p*.

In our model, the cost of rewiring can be interpreted as the cost of searching globally for a new partner, paid for by only the proposer. The recipient always accepts new partners because there are no costs, and new links are always potentially beneficial under our parameterisation of the prisoner’s dilemma. In the supplementary, we also looked at results from one possible way to model bilateral link creation, even though the convention is for link creation to be unilateral^{33,34,35}. In the bilateral link creation version of our model, the recipient only accepts a link if the proposer is within her rewiring range preference, and both parties pay a link creation cost *c* if the distance between them is greater than local rewiring, *d* + 1.

We obtain the same results seen in Fig. 2 (see Supplementary Figure 12). For bilateral link creation, there is also a region in the (*u*, *w*) parameter space where coevolutionary dynamics transits from most favouring global cooperators to global defectors. However, local range preferences are never favoured, and global range preference dominates for all parameter combinations (see Supplementary Figure 13). Proportion of global cooperators increases with *p*, and local cooperators are suppressed (see Supplementary Figure 14). When link creation is bilateral, those with local rewiring range preferences are unable to compete because they lose the ability to receive long range links, while those with global preferences gain the ability to rewire locally without cost.

A natural next step for future investigation is to consider more realistic coevolutionary models that assign initial rewiring range preferences uniformly at random from a range of discrete values, and rewiring costs to be a possibly non-linear function of range preferences. Preliminary simulations point to conditions that encourages cooperators with rewiring range preferences greater than the average of the initial assignment (see Supplementary Figure 7). We hope that further study of this more general model would not only lead to more comprehensive results on the coevolution of small world and cooperation phenomena, but the spatial setting could potentially allow us to study the emergence of community structures that are observed in real world networks^{67,68}.

## Methods

### Model

The *n* = *m*^{2} individuals in our model are situated on a two dimensional *m* × *m* square lattice with periodic boundaries. The lattice distance between two nodes *x* and *y*, with coordinates (*a*, *b*) and (*c*, *d*) respectively, is the length of the shortest path between them, *d(x*, *y*) = |*a* − *c*| + |*b* − *d*|.

We derive a network from this setup by connecting individuals within lattice distance *d*. Links to individuals within distance *l* are local static links, which cannot be changed or rewired. Global links, which are not static and can change via the evolutionary dynamics, join individuals with distances between *l* and *d*.

Individuals interact by playing the Prisoner’s Dilemma^{59} with their partners. They are initially assigned to be a cooperator *C* = [1, 0]^{T} or a defector *D* = [0, 1]^{T} with equal probability. The payoff matrix for our version of prisoner’s dilemma is,

where *b*, *c* are parameters representing the respective benefit and cost of cooperation. We can re-write the matrix with a single parameter^{69,70} as,

where *u* ∈ [0, 1] is the cost-benefit ratio of cooperation. Let be the neighbourhood of individual *i* on the graph, then the total payoff of individual *i* is,

where *s*_{i} is the strategy, *C* or *D*, of individual *i*.

The reputation *R*_{i}(*t*) of an individual *i* at a discrete time step *t* is the number of times she has cooperated prior to *t*. This is defined as,

where *δ*_{i}(*t*) = 1 if the individual *i* cooperates at the end of the *t*-th time step, and zero otherwise. At each time step, we pick an individual uniformly at random. With probability *w*, she chooses to switch one of her partners, otherwise with probability 1 − *w*, she updates her strategy.

#### Partner switching

When individual *i* chooses to switch partners, she attempts to maximize the gain from the switch by removing a partner with low reputation, and adding one with higher reputation.

Individuals are initially assigned to have local or global rewiring range preference with equal probability. While local rewiring incurs no cost, global rewiring incurs a one-time cost *c* to model the cost of collecting reputation information. Every time an individual *i* with global rewiring preference switches partner, this cost is incurred and a variable *C*_{i}(*t*) is incremented by *c* until the next time she takes part in a strategy update comparison.

As the individual is forbidden from severing links with partners within distance *l*, she first isolates an existing partner more than distance *l* away who has the least reputation. She then severs that connection, or in the case of a tie, severs a connection at random from among the tied individuals.

Next, she searches for an individual that she is not connected with, within her rewiring range preference, who has the largest reputation. A parameter *p* ∈ [0, 1] encodes how easily the individual can access and search reputation information. With probability *p*, she is able to find the high reputation individual and create a new link. While with probability 1 − *p*, she is unable to do so and simply creates a new link to a random individual within her rewiring range preference.

#### Strategy updating

When individual *i* chooses to update her strategy, she chooses a partner *j* uniformly at random and decides whether to emulate the partner’s strategy by comparing their total payoffs, after both party have subtracted the one-time costs *c* they have accumulated up to this point. Both of *j*’s strategy and rewiring range preference replaces those of individual *i* with probability given by the Fermi function^{60,61,62},

where *β* is a parameter such that 0 ≤ *β*, and *r*_{i} is the rewiring range preference, local or global, of individual *i*. Regardless of whether individual *i* emulates her partner’s strategy and rewiring range preference, both *C*_{i} and *C*_{j} are set to zero because they represent temporary search and link creation costs.

### Simulation

Each row in Fig. 2 is taken from a single run. In Fig. 2a–d, we modify our model to allow individuals to only have global rewiring range preference. For Fig. 2e–h, we do the same and allow individuals to only have local rewiring range preference. In Fig. 2i–l, individuals have initial rewiring range preference local or global with equal probability. Parameters for Fig. 2 are *n* = 400, *t* = 1.2 × 10^{5}, *β* = 0.1, *u* = 0.1, *w* = 0.5, *p* = 0.1, *c* = 0.2, *d* = 2 and *l* = 1.

In Figure 3a, each combination (*u*, *w*) in the parameter space is run for 2 × 10^{6} time steps, and the results are averaged over an additional 3 × 10^{4} time steps. This process is then repeated for a total of 100 runs, and the results are averaged again over these 100 runs. The colours for each point in Fig. 3a are determined by first determining if cooperation or defection is in the majority (≥50%). Then, we calculate the fraction of individuals in this majority that have global rewiring range preference, and assign the colours based on the scale in Fig. 3a. For instance, dark blue illustrates the dominance of local cooperators in the majority, while light orange illustrates the dominance of global defectors in the majority. Figure 3b,c are taken from the simulations in Fig. 3a. Other parameters for Fig. 3 are *n* = 3600, *β* = 0.1, *p* = 0.1, *c* = 0.2, *d* = 2 and *l* = 1.

In Fig. 4a, each value of *p* is run for 2 × 10^{6} time steps, and the results are averaged over an additional 3 × 10^{4} time steps. This process is then repeated for a total of 100 runs, and the results are averaged again over these 100 runs. Figure 4b,c are taken from the simulations in Fig. 4a. Other parameters for Fig. 4 are *n* = 3600, *u* = 0.2, *w* = 0.2, *β* = 0.1, *c* = 0.2, *d* = 2 and *l* = 1.

Various values for *c*, the cost of long range rewiring, have been considered (see Supplementary Figures 8, 9 and 10), and *c* = 0.2 was chosen as representative of the general trends.

## Additional Information

**How to cite this article**: Khoo, T. *et al.* Coevolution of Cooperation and Partner Rewiring Range in Spatial Social Networks. *Sci. Rep.* **6**, 36293; doi: 10.1038/srep36293 (2016).

**Publisher’s note:** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

- 1.
Nowak, M. A.

*Evolutionary dynamics*. Harvard University Press (2006). - 2.
Michod, R. E. & Roze, D. Cooperation and conflict in the evolution of multicellularity.

*Heredity***86****(1)**, 1–7 (2001). - 3.
Clutton-Brock, T. H.

*et al.*Cooperation, control, and concession in meerkat groups.*Science***291****(5503)**, 478–481 (2001). - 4.
Apicella, C. L., Marlowe, F. W., Fowler, J. H. & Christakis, N. A. Social networks and cooperation in hunter-gatherers.

*Nature***481****(7382)**, 497–501 (2012). - 5.
Hardin, G. The Tragedy of the Commons.

*Journal of Natural Resources Policy Research***1****(3)**, 243–253 (2009). - 6.
Levin, S. A. Learning to live in a global commons: socioeconomic challenges for a sustainable environment.

*Ecol. Res*.**21****(3)**, 328–333 (2006). - 7.
Ostrom, E., Burger, J., Field, C. B., Norgaard, R. B. & Policansky, D. Revisiting the commons: local lessons, global challenges.

*Science***284**(5412), 278–282 (1999). - 8.
Rand, D. G. & Nowak, M. A. Human cooperation.

*Trends Cogn. Sci.***17****(8)**, 413–425 (2013). - 9.
Perc, M. Phase transitions in models of human cooperation.

*Phys. Lett. A*(2016). - 10.
Axelrod, R. & Hamilton, W. D. The evolution of cooperation.

*Basic books*(2006). - 11.
Smith, J. M.

*Evolution and the Theory of Games*. Cambridge University Press (1982). - 12.
Turner, P. E. & Chao, L. Prisoner’s dilemma in an RNA virus.

*Nature***398****(6726)**, 441–443 (1999). - 13.
Gintis, H., Bowles, S., Boyd, R. & Fehr, E.

*Evol. Hum. Behav.***24****(3)**, 153–172 (2003). - 14.
Doebeli, M. & Hauert, C. Models of cooperation based on the Prisoner’s Dilemma and the Snowdrift game.

*Ecol. Lett*.**8****(7)**, 748–766 (2005). - 15.
Nowak, M. A. & Sigmund, K. Evolutionary dynamics of biological games.

*Science***303****(5659)**, 793–799 (2004). - 16.
Hamilton, W. D. The genetical evolution of social behaviour. II.

*J. Theor. Biol.***7****(1)**, 17–52 (1964). - 17.
Traulsen, A. & Nowak, M. A. Evolution of cooperation by multilevel selection.

*Proc. Natl. Acad. Sci. USA***103****(29)**, 10952–10955 (2006). - 18.
Trivers, R. L. The evolution of reciprocal altruism.

*Q. Rev. Biol.*35–57 (1971). - 19.
Nowak, M. A. & Sigmund, K. Evolution of indirect reciprocity.

*Nature***437****(7063)**, 1291–1298 (2005). - 20.
Nakamura, M. & Masuda, N. Indirect reciprocity under incomplete observation.

*PLoS Comput. Biol.***7****(7)**, e1002113 (2011). - 21.
Nowak, M. A. Five rules for the evolution of cooperation.

*Science***314****(5805)**, 1560–1563 (2006). - 22.
Szabó, G. & Töke, C. Evolutionary prisoner’s dilemma game on a square lattice.

*Phys. Rev. E Stat. Nonlin. Soft Matter Phys*.**58****(1)**, 69 (1998). - 23.
Lieberman, E., Hauert, C. & Nowak, M. A. Evolutionary dynamics on graphs.

*Nature***433****(7023)**, 312–316 (2005). - 24.
Ohtsuki, H., Hauert, C., Lieberman, E. & Nowak, M. A. A simple rule for the evolution of cooperation on graphs and social networks.

*Nature***441****(7092)**, 502–505 (2006). - 25.
Floría, L. M., Gracia-Lázaro, C., Gómez-Gardenes, J. & Moreno, Y. Social network reciprocity as a phase transition in evolutionary cooperation.

*Phys. Rev. E Stat. Nonlin. Soft Matter Phys*.**79****(2)**, 026106 (2009). - 26.
Roca, C. P., Cuesta, J. A. & Sánchez, A. Effect of spatial structure on the evolution of cooperation.

*Phys. Rev. E Stat. Nonlin. Soft Matter Phys*.**80****(4)**, 046106 (2009). - 27.
Helbing, D. & Yu, W. The outbreak of cooperation among success-driven individuals under noisy conditions.

*Proc. Natl. Acad. Sci. USA***106****(10)**, 3680–3685 (2009). - 28.
Santos, F. C. & Pacheco, J. M. Scale-free networks provide a unifying framework for the emergence of cooperation.

*Phys. Rev. Lett.***95****(9)**, 098104 (2005). - 29.
Jackson, M. O.

*Social and economic networks*Princeton University Press,**3**(2008). - 30.
Nowak, M. A. & May, R. M. Evolutionary games and spatial chaos.

*Nature***359****(6398)**, 826–829 (1992). - 31.
Boccaletti, S., Latora, V., Moreno, Y., Chavez, M. & Hwang, D. U. Complex networks: Structure and dynamics.

*Phys. Rep*.**424**(4), 175–308 (2006). - 32.
Newman, M. E. The structure and function of complex networks.

*SIAM Rev*.**45****(2)**, 167–256 (2003). - 33.
Szabó, G. & Fath, G. Evolutionary games on graphs.

*Phys. Rep*.**446****(4)**, 97–216 (2007). - 34.
Perc, M. & Szolnoki, A. Coevolutionary games – a mini review.

*BioSystems***99****(2)**, 109–125 (2010). - 35.
Fu, F., Hauert, C., Nowak, M. A. & Wang, L. Reputation-based partner choice promotes cooperation in social networks.

*Phys. Rev. E Stat. Nonlin. Soft Matter Phys*.**78****(2)**, 026117 (2008). - 36.
Fu, F., Wu, T. & Wang, L. Partner switching stabilizes cooperation in coevolutionary prisoner’s dilemma.

*Phys. Rev. E Stat. Nonlin. Soft Matter Phys*.**79****(3)**, 036101 (2009). - 37.
Santos, F. C., Pacheco, J. M. & Lenaerts, T. Cooperation prevails when individuals adjust their social ties.

*PLoS Comput. Biol.***2****(10)**, e140 (2006). - 38.
Zimmermann, M. G., Eguluz, V. M. & San Miguel, M. Coevolution of dynamical states and interactions in dynamic networks.

*Phys. Rev. E Stat. Nonlin. Soft Matter Phys*.**69****(6)**, 065102 (2004). - 39.
Pacheco, J. M., Traulsen, A. & Nowak, M. A. Coevolution of strategy and structure in complex networks with dynamical linking.

*Phys. Rev. Lett.***97****(25)**, 258103 (2006). - 40.
Hanaki, N., Peterhansl, A., Dodds, P. S. & Watts, D. J. Cooperation in evolving social networks.

*Manag. Sci*.**53****(7)**, 1036–1050 (2007). - 41.
Szolnoki, A. & Perc, M. Resolving social dilemmas on evolving random networks.

*EPL***86****(3)**, 30007 (2009). - 42.
Skyrms, B. & Pemantle, R. A dynamic model of social network formation.

*Adaptive Networks*231–251 (2009). - 43.
Wu, B., Zhou, D., Fu, F., Luo, Q., Wang, L. & Traulsen, A. Evolution of cooperation on stochastic dynamical networks.

*PLOS ONE***5****(6)**, e11187 (2010). - 44.
Du, F. & Fu, F. Partner selection shapes the strategic and topological evolution of cooperation.

*DYN GAMES APPL***1****(3)**, 354–369 (2011). - 45.
Wardil, L. & Hauert, C. Origin and structure of dynamic cooperative networks.

*Sci. Rep*.**4**(2014). - 46.
Bshary, R. & Grutter, A. S. Punishment and partner switching cause cooperative behaviour in a cleaning mutualism.

*Biol. Lett*.**1****(4)**, 396–399 (2005). - 47.
Fehl, K., van der Post, D. J. & Semmann, D. Co-evolution of behaviour and social network structure promotes human cooperation.

*Ecol. Lett*.**14****(6)**, 546–551 (2011). - 48.
Rand, D. G., Arbesman, S. & Christakis, N. A. Dynamic social networks promote cooperation in experiments with humans.

*Proc. Natl. Acad. Sci. USA***108****(48)**, 19193–19198 (2011). - 49.
Wang, J., Suri, S. & Watts, D. J. Cooperation and assortativity with dynamic partner updating.

*Proc. Natl. Acad. Sci. USA***109****(3)**, 14363–14368 (2012). - 50.
Shirado, H., Fu, F., Fowler, J. H. & Christakis, N. A. Quality versus quantity of social ties in experimental cooperative networks.

*Nat. Commun.***4**(2013). - 51.
Barnett, L., Di Paolo, E. & Bullock, S. Spatially embedded random networks.

*Phys. Rev. E Stat. Nonlin. Soft Matter Phys.***76****(5)**, 056115 (2007). - 52.
Barthélemy, M. Spatial networks.

*Phys. Rep.***499****(1)**, 1–101 (2011). - 53.
Watts, D. J. & Strogatz, S. H. Collective dynamics of small-world networks.

*Nature***393****(6684)**, 440–442 (1998). - 54.
Albert, R. & Barabási, A. L. Statistical mechanics of complex networks.

*Rev. Mod. Phys.***74****(1)**, 47 (2002). - 55.
Newman, M. E. & Watts, D. J. Renormalization group analysis of the small-world network model.

*Phys. Lett.***263****(4)**, 341–346 (1999). - 56.
Granovetter, M. S. The strength of weak ties.

*Am. J. Sociol.*1360–1380 (1973). - 57.
Mesoudi, A., Whiten, A. & Laland, K. N. Towards a unified science of cultural evolution.

*Behav. Brain. Sci.***29****(04)**, 329–347 (2006). - 58.
Henrich, J. & McElreath, R. The evolution of cultural evolution.

*Evol. Anthr.***12****(3)**, 123–135 (2003). - 59.
Rapoport, A. & Chammah, A. M.

*Prisoner’s dilemma: A study in conflict and cooperation*University of Michigan Press,**165**(1965). - 60.
Traulsen, A., Semmann, D., Sommerfeld, R. D., Krambeck, H. J. & Milinski, M. Human strategy updating in evolutionary games.

*Proc. Natl. Acad. Sci. USA***107****(7)**, 2962–2966 (2010). - 61.
Szabó, G. & Töke, C. Evolutionary prisoner’s dilemma game on a square lattice.

*Phys. Rev. E Stat Nonlin. Soft Matter Phys*.**58****(1)**, 69 (1998). - 62.
Traulsen, A., Pacheco, J. M. & Nowak, M. A. Pairwise comparison and selection temperature in evolutionary game dynamics.

*J. Theor. Biol.***246****(3)**, 522–529 (2007). - 63.
Santos, F. C., Pinheiro, F. L., Lenaerts, T. & Pacheco, J. M. The role of diversity in the evolution of cooperation.

*J. Theor. Biol.***299**, 88–96 (2012). - 64.
Santos, F. C., Pacheco, J. M. & Lenaerts, T. Evolutionary dynamics of social dilemmas in structured heterogeneous populations.

*Proc. Natl. Acad. Sci. USA***103****(9)**, 3490–3494 (2006). - 65.
Erdös, P. & Rényi, A. On the strength of connectedness of a random graph.

*Acta Math. Hungar*.**12****(1–2)**, 261–267 (1961). - 66.
Santos, F. C. & Pacheco, J. M. A new route to the evolution of cooperation.

*J. Evol. Biol*.**19****(3)**, 726–733 (2006). - 67.
Newman, M. E. & Girvan, M. Finding and evaluating community structure in networks.

*Phys. Rev. E Stat. Nonlin. Soft Matter Phys*.**69****(2)**, 026113 (2004). - 68.
Watts, D. J., Dodds, P. S. & Newman, M. E. Identity and search in social networks.

*Science***296****(5571)**, 1302–1305 (2002). - 69.
Langer, P., Nowak, M. A. & Hauert, C. Spatial invasion of cooperation.

*J. Theor. Biol.***250****(4)**, 634–641 (2008). - 70.
Fu, F., Nowak, M. A. & Hauert, C. Invasion and expansion of cooperators in lattice populations: Prisoner’s dilemma vs. snowdrift games.

*J. Theor. Biol.***266****(3)**, 358–366 (2010).

## Acknowledgements

This work was supported by Dartmouth Faculty Start-up Fund to F.F. We thank the reviewers for their comments an earlier version of the manuscript, which helped us improve our work.

## Author information

## Affiliations

### Department of Mathematics, Dartmouth College, Hanover, NH 03755, USA

- Tommy Khoo
- , Feng Fu
- & Scott Pauls

### Department of Biomedical Data Science, Geisel School of Medicine, Dartmouth College, Hanover, NH 03755, USA

- Feng Fu

## Authors

### Search for Tommy Khoo in:

### Search for Feng Fu in:

### Search for Scott Pauls in:

### Contributions

T.K. and F.F. conceived the model, T.K. wrote the code, conducted the experiments, and analysed the results. All authors reviewed the manuscript.

### Competing interests

The authors declare no competing financial interests.

## Corresponding authors

Correspondence to Feng Fu or Scott Pauls.

## Supplementary information

## PDF files

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

This work is licensed under a Creative Commons Attribution 4.0 International License. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in the credit line; if the material is not included under the Creative Commons license, users will need to obtain permission from the license holder to reproduce the material. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/