Reciprocity is a simple principle for cooperation that explains many of the patterns of how humans seek and receive help from each other. To capture reciprocity, traditional models often assume that individuals use simple strategies with restricted memory. These memory-1 strategies are mathematically convenient, but they miss important aspects of human reciprocity, where defections can have lasting effects. Here we instead propose a strategy of cumulative reciprocity. Cumulative reciprocators count the imbalance of cooperation across their previous interactions with their opponent. They cooperate as long as this imbalance is sufficiently small. Using analytical and computational methods, we show that this strategy can sustain cooperation in the presence of errors, that it enforces fair outcomes and that it evolves in hostile environments. Using an economic experiment, we confirm that cumulative reciprocity is more predictive of human behaviour than several classical strategies. The basic principle of cumulative reciprocity is versatile and can be extended to a range of social dilemmas.
This is a preview of subscription content, access via your institution
Access Nature and 54 other Nature Portfolio journals
Get Nature+, our best-value online-access subscription
$29.99 per month
cancel any time
Subscribe to this journal
Receive 12 digital issues and online access to articles
$99.00 per year
only $8.25 per issue
Rent or buy this article
Get just this article for as long as you need it
Prices may be subject to local taxes which are calculated during checkout
All Java codes based on Eclipse (version Oxygen.3a release 4.7.3a), MATLAB codes (MATLAB 2020b) and oTree software (version 5.8.0b5, based on Python 3.8.10) can be obtained from Code Ocean57.
Trivers, R. L. The evolution of reciprocal altruism. Q. Rev. Biol. 46, 35–57 (1971).
Axelrod, R. & Hamilton, W. D. The evolution of cooperation. Science 211, 1390–1396 (1981).
Nowak, M. A. Five rules for the evolution of cooperation. Science 314, 1560–1563 (2006).
Rapoport, A., Chammah, A. M. & Orwant, C. J. Prisoner’s Dilemma: a Study in Conflict and Cooperation (Univ. of Michigan Press, 1965).
Neilson, W. S. The economics of favors. J. Econ. Behav. Organ. 39, 387–397 (1999).
Schweinfurth, M. K. & Call, J. Reciprocity: different behavioural strategies, cognitive mechanisms and psychological processes. Learn. Behav. 47, 284–301 (2019).
Keohane, R. O. Reciprocity in international relations. Int. Organ. 40, 1–27 (1986).
Friedman, J. W. A non-cooperative equilibrium for supergames. Rev. Econ. Stud. 38, 1–12 (1971).
Hilbe, C., Chatterjee, K. & Nowak, M. A. Partners and rivals in direct reciprocity. Nat. Hum. Behav. 2, 469–477 (2018).
Nowak, M. A. & Sigmund, K. Tit for tat in heterogeneous populations. Nature 355, 250–253 (1992).
Molander, P. The optimal level of generosity in a selfish, uncertain environment. J. Confl. Resolut. 29, 611–618 (1985).
Kraines, D. & Kraines, V. Pavlov and the prisoner’s dilemma. Theory Decis. 26, 47–79 (1989).
Nowak, M. & Sigmund, K. A strategy of win-stay, lose-shift that outperforms tit-for-tat in the prisoner’s dilemma game. Nature 364, 56–58 (1993).
Hauert, C. & Schuster, H. G. Effects of increasing the number of players and memory size in the iterated prisoner’s dilemma: a numerical approach. Proc. R. Soc. Lond. Ser. B 264, 513–519 (1997).
Grujić, J., Cuesta, J. A. & Sanchez, A. On the coexistence of cooperators, defectors and conditional cooperators in the multiplayer iterated prisoner’s dilemma. J. Theor. Biol. 300, 299–308 (2012).
Stewart, A. J. & Plotkin, J. B. From extortion to generosity, evolution in the iterated prisoner’s dilemma. Proc. Natl Acad. Sci. U. S. A. 110, 15348–15353 (2013).
Stewart, A. J. & Plotkin, J. B. Collapse of cooperation in evolving games. Proc. Natl Acad. Sci. U. S. A. 111, 17558–17563 (2014).
Akin, E. What you gotta know to play good in the iterated prisoner’s dilemma. Games 6, 175–190 (2015).
Akin, E. in Ergodic Theory: Advances in Dynamical Systems (ed. Idris Assani) 77–107 (De Gruyter, 2016).
Hilbe, C., Martinez-Vaquero, L. A., Chatterjee, K. & Nowak, M. A. Memory-n strategies of direct reciprocity. Proc. Natl Acad. Sci. U. S. A. 114, 4715–4720 (2017).
Murase, Y. & Baek, S. K. Five rules for friendly rivalry in direct reciprocity. Sci. Rep. 10, 1–9 (2020).
Brandt, H. & Sigmund, K. The good, the bad and the discriminator—errors in direct and indirect reciprocity. J. Theor. Biol. 239, 183–194 (2006).
Baek, S. K., Jeong, H.-C., Hilbe, C. & Nowak, M. A. Comparing reactive and memory-one strategies of direct reciprocity. Sci. Rep. 6, 1–13 (2016).
Hilbe, C., Wu, B., Traulsen, A. & Nowak, M. A. Cooperation and control in multiplayer social dilemmas. Proc. Natl Acad. Sci. U. S. A. 111, 16425–16430 (2014).
Hilbe, C., Šimsa, Š., Chatterjee, K. & Nowak, M. A. Evolution of cooperation in stochastic games. Nature 559, 246–249 (2018).
Su, Q., McAvoy, A., Wang, L. & Nowak, M. A. Evolutionary dynamics with game transitions. Proc. Natl Acad. Sci. U. S. A. 116, 25398–25404 (2019).
Sigmund, K. The Calculus of Selfishness (Princeton Univ. Press, 2010).
Do, Yi,S., Baek, S. K. & Choi, J.-K. Combination with anti-tit-for-tat remedies problems of tit-for-tat. J. Theor. Biol. 412, 1–7 (2017).
Press, W. H. & Dyson, F. J. Iterated prisoner’s dilemma contains strategies that dominate any evolutionary opponent. Proc. Natl Acad. Sci. U .S. A. 109, 10409–10413 (2012).
Hao, D., Rong, Z. & Zhou, T. Extortion under uncertainty: zero-determinant strategies in noisy games. Phys. Rev. E 91, 052803 (2015).
McAvoy, A. & Hauert, C. Autocratic strategies for iterated games with arbitrary action spaces. Proc. Natl Acad. Sci. U. S. A. 113, 3573–3578 (2016).
Ichinose, G. & Masuda, N. Zero-determinant strategies in finitely repeated games. J. Theor. Biol. 438, 61–77 (2018).
Reiter, J. G., Hilbe, C., Rand, D. G., Chatterjee, K. & Nowak, M. A. Crosstalk in concurrent repeated games impedes direct reciprocity and requires stronger levels of forgiveness. Nat. Commun. 9, 1–8 (2018).
Schmid, L., Chatterjee, K., Hilbe, C. & Nowak, M. A. A unified framework of direct and indirect reciprocity. Nat. Hum. Behav. 5, 1292–1302 (2021).
Boyd, R. Mistakes allow evolutionary stability in the repeated prisoner’s dilemma game. J. Theor. Biol. 136, 47–56 (1989).
Stewart, A. J. & Plotkin, J. B. Small groups and long memories promote cooperation. Sci. Rep. 6, 1–11 (2016).
Xia, C., Gracia-Lázaro, C. & Moreno, Y. Effect of memory, intolerance, and second-order reputation on cooperation. Chaos 30, 063122 (2020).
Van Segbroeck, S., Pacheco, J. M., Lenaerts, T. & Santos, F. C. Emergence of fairness in repeated group interactions. Phys. Rev. Lett. 108, 158104 (2012).
Pinheiro, F. L., Vasconcelos, V. V., Santos, F. C., Pacheco, J. M. & Daunizeau, J. Evolution of all-or-none strategies in repeated public goods dilemmas. PLoS Comput. Biol. 10, e1003945 (2014).
Van Veelen, M., García, J., Rand, D. G. & Nowak, M. A. Direct reciprocity in structured populations. Proc. Natl Acad. Sci. U. S. A. 109, 9929–9934 (2012).
García, J. & van Veelen, M. In and out of equilibrium I: evolution of strategies in repeated games with discounting. J. Econ. Theory 161, 161–189 (2016).
Duersch, P., Oechssler, J. & Schipper, B. C. Unbeatable imitation. Games Econ. Behav. 76, 88–96 (2012).
Duersch, P., Oechssler, J. & Schipper, B. C. When is tit-for-tat unbeatable? Int. J. Game Theory 43, 25–36 (2014).
Fudenberg, D. & Tirole, J. Game Theory (MIT Press, 1991).
Nowak, M. A., Sasaki, A., Taylor, C. & Fudenberg, D. Emergence of cooperation and evolutionary stability in finite populations. Nature 428, 646–650 (2004).
Fudenberg, D., Rand, D. G. & Dreber, A. Slow to anger and fast to forgive: cooperation in an uncertain world. Am. Econ. Rev. 102, 720–749 (2012).
Dal Bó, P. & Fréchette, G. R. Strategy choice in the infinitely repeated prisoner’s dilemma. Am. Econ. Rev. 109, 3929–3952 (2019).
Shackelford, T. K. & Buss, D. M. Betrayal in mateships, friendships, and coalitions. Personal. Soc. Psychol. Bull. 22, 1151–1164 (1996).
Smith, J. M. & Price, G. R. The logic of animal conflict. Nature 246, 15–18 (1973).
Boyd, R. & Lorberbaum, J. P. No pure strategy is evolutionarily stable in the repeated prisoner’s dilemma game. Nature 327, 58–59 (1987).
Bendor, J. & Swistak, P. Types of evolutionary stability and the problem of cooperation. Proc. Natl Acad. Sci. U. S. A. 92, 3596–3600 (1995).
García, J. & van Veelen, M. No strategy can win in the repeated prisoner’s dilemma: linking game theory and computer simulations. Front. Robot. AI 5, 102 (2018).
Glynatsi, N. E. & Knight, V. A. Using a theory of mind to find best responses to memory-one strategies. Sci. Rep. 10, 1–9 (2020).
Hauert, C. & Stenull, O. Simple adaptive strategy wins the prisoner’s dilemma. J. Theor. Biol. 218, 261–272 (2002).
Akin, E. Good strategies for the iterated prisoner’s dilemma: Smale vs. Markov. J. Dyn. Games 4, 217–253 (2017).
Silk, J. B. in Genetic and Cultural Evolution of Cooperation (ed. Hammerstein, P.) pp 37–54 (MIT Press, 2003).
Li, J. et al. Evolution of cooperation through cumulative reciprocity. Code Ocean https://doi.org/10.24433/CO.6894248.v1 (2022).
Li, J., et al. Evolution of cooperation through cumulative reciprocity. Zenodo https://doi.org/10.5281/zenodo.7074407 (2022).
This work was supported by the National Natural Science Foundation of China under grant 71871042 (to H.X.) and the Humanities and Social Science Project of the Ministry of Education of China grant 18YJA630118 (to H.X.). Part of this work was conducted during H.X.’s visit at Sloan School of Management, Massachusetts Institute of Technology, supported by the Fulbright Visiting Scholar Program, jointly with the Chinese Scholarship Council. H.X. thanks P. Gloor for hosting the visit and D. Rand for discussion on an early draft of this work. H.X. and J.L. thank Y. Qian for technical assistance in preparing the simulation platform. C.H. acknowledges generous support by the European Research Council starting grant 850529: E-DIRECT.
The authors declare no competing interests.
Peer review information
Nature Computational Science thanks Ethan Akin, Isamu Okada and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Handling editor: Kaitlin McCardle, in collaboration with the Nature Computational Science team. Peer reviewer reports are available.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Figs. 1–19, Tables 1–10 and Sections 1–11.
Source Data Fig. 2.
Statistical source data.
Source Data Fig. 3.
Statistical source data.
Source Data Fig. 4.
Statistical source data.
Source Data Fig. 6.
Statistical source data.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Li, J., Zhao, X., Li, B. et al. Evolution of cooperation through cumulative reciprocity. Nat Comput Sci 2, 677–686 (2022). https://doi.org/10.1038/s43588-022-00334-w