Data availabilityData for the empirical social networks used in this study were obtained from the Index of Complex Networks database, which is publicly available from the University of Colorado (ref. 31).Code availabilityThe code for generating random graphs and for computing critical benefit-to-cost ratios (according to equation (1) for the baseline model, Supplementary Information equations (50) and (58) for alternative updating rules, Supplementary Information equation (66) for iterated games, Supplementary Information equation (81) for dynamic networks, Supplementary Information equation (90) for mutation and Supplementary Information equation (123) for multiplayer games) is freely available at Zenodo45 (https://doi.org/10.5281/zenodo.19166894).ReferencesHamilton, W. D. The genetical evolution of social behaviour. I. J. Theor. Biol. 7, 1–16 (1964).Article

PubMed

Google Scholar

Michod, R. E. The theory of kin selection. Ann. Rev. Ecol. Syst. 13, 23–55 (1982).Article

Google Scholar