Introduction

The evolution of cooperation is no longer mysterious or hard to explain. Although apparently altruistic behavior can seem maladaptive when viewed in isolation1, when placed in the proper context, it can be seen to emerge easily from the process of natural selection2,3. The difficulty we face in trying to understand cooperative behavior is not a lack, but rather an overabundance of possible mechanisms capable of producing it. Cooperation can be generated by reciprocity4,5, by social norms and the need to sustain a good reputation in a community6,7,8,9,10, by structural forces in social networks that promote cooperative clusters11,12,13,14,15, by inter-group competition16, or by kinship17,18. When we observe individuals cooperating in the real world, the question is not whether it is possible to account for it, but which of many possible underlying explanations are leading them to engage in this common behavior.

Understanding the origins of cooperative behavior is important if we wish to enable prosocial environments to flourish. While it can often arise quite easily, cooperation is also lost easily due to invasion by cheaters and free-riders. Reducing the impact of such bad actors on the overall level of cooperation in a population requires us to understand the underlying motivations of those who are willing to cooperate. Furthermore, over long timescales, the motivations for cooperation can themselves shift and evolve depending on the environment and on the level of cognitive complexity of the individual making the decision to cooperate19.

Unlike prior studies that focus on the evolution of behaviors, where the behavior yielding a higher payoff is more likely to be adopted, this paper considers the evolution of behavioral motivations that guide the choices of behaviors. We focus on two types of motivation that can underpin cooperation, depending on whether an individual increases or decreases their willingness to cooperate with their own level of wealth. On the one hand, individuals may view cooperative acts as philanthropic or even altruistic, a cost that they pay to help others when all their needs are met and they have resources to spare. On the other hand, as studies of the evolution of cooperation show, cooperation can also serve as a mechanism for increasing both individual and population fitness, i.e., cooperation can help individuals meet their needs in the first place. We study the evolution of motivations behind cooperative behavior among individuals who can assess needs, anticipate outcomes, and adapt their behavior accordingly. We model motivation as lying on a continuum, with cooperation as an expression of “self-transcendence”, which is more likely to occur after basic needs have been met, at one extreme, and cooperation motivated purely by a desire to meet one’s basic needs at the other.

There is evidence for both “philanthropically motivated” and “aspirationally motivated” cooperation in humans. Philanthropically motivated cooperation is most easily seen in the behavior of wealthy philanthropists who invest in public goods such as public health or education20. In contrast, aspirationally motivated cooperation may be reflected in the tendency for individuals whose incomes are relatively low to behave with greater charity and generosity (as a proportion of their wealth)21,22,23,24,25 and in the “affluenza” phenomenon in which, as people gain more wealth, they also tend to become less empathetic and less likely to help others21,22,23. There has been a long-standing debate about the association between socioeconomic status and prosociality in human society. Some favor a positive association26, while others highlight a negative association25. Given the conflicting evidence and the observed heterogeneity of human behavior25,26,27,28, we have developed a modelling framework that allows for both types of behavioral motivation. Our goal is to elucidate the conditions under which different behavioral motivations emerge, which may then be tested empirically.

We construct a model of cooperative motivations in which we characterize the short-term dynamics of cooperation resulting from individual interactions between neighbors on a social network. We then characterize the long-term co-evolution of cooperative behavior and the motivational strategies that underpin it, for both weak and strong selection. Our results offer key insights into the evolution of behavioral motivations for cooperation. First, we show that when motivations are fixed, cooperative behavior emerges among two diametrically opposed types of motivation: undemanding philanthropists (i.e., individuals who use philanthropic motivations and easily meet thresholds of need) and demanding aspirationalists (i.e., individuals who use aspirational motivations and hardly meet thresholds of need). Second, we show that breaking down one big need into many smaller needs can facilitate greater cooperation. Third, we show that when individuals’ needs and motivations are allowed to co-evolve, there is a critical benefit-to-cost ratio for cooperation, above which behavioral motivations assuredly evolve towards either undemanding philanthropists or demanding aspirationalists and, as a result, stable cooperation. Finally, we provide analytical results for the critical benefit-to-cost ratio and show how it depends on the structure of the social network.

Our results correspond with the co-existence of both philanthropically motivated and aspirationally motivated forms of cooperation observed in society. We show that, remarkably, the conditions for both to evolve are the same, and depend on factors such as the costs and benefits of cooperation and the structure of the underlying social network. However, our results also suggest that when motivations are not fixed, cooperation requires philanthropic motivations among communities of people whose income are relatively high, and aspirational motivations among communities of people whose income are relative low.

Results

Model

We begin by constructing a framework for modeling the evolution of cooperative behavior and motivations in a finite population of individuals interacting via a social network. We consider a structured population consisting of N individuals, denoted by \({{\mathcal{N}}}=\{1,2,\cdots \,,N\}\). The population structure is represented by a network consisting of N nodes, with each individual occupying a node and edge weight denoted by \({\{{w}_{ij}\}}_{i,j\in {{\mathcal{N}}}}\). Here, variations in edge weights account for the fact that some interactions occur more frequently or last longer than others, resulting in different payoffs even when the actions of the participants are fixed, which captures the heterogeneity in interactions beyond just the number of connections. The total degree for node i is \({w}_{i}={\sum }_{j\in {{\mathcal{N}}}}{w}_{ij}\).

Social interactions occur between pairs of individuals and take the form of a donation game (DG), in which each individual in the population decides to either cooperate (C) or defect (D). If an individual chooses to cooperate, they pay a cost c to generate a benefit b to their neighbor. If they choose to defect, they pay no cost and deliver no benefit to their neighbor. A “round” of the game consists of all pairwise interactions between all members of the population. We assume that at the start of the game, every individual cooperates with probability 0.5. Let si denote individual i’s action, where si= 1 represents cooperation and si= 0 defection. The payoff to individual i at round t is then

$${u}_{i}(t)={\sum}_{j\in {{\mathcal{N}}}}\frac{{w}_{ij}}{{w}_{i}}\left(-c{s}_{i}+b{s}_{j}\right),$$
(1)

i.e., the edge-weighted average of all their social interactions with other members of the population.

We initially assume that each individual has their own fixed behavioral motivation, which is used to guide them to update their action (cooperate or defect) after each round. In particular, after each round of play, one individual is selected to update their action according to this behavioral motivation. We later show that our results remain robust if we instead assume that multiple individuals simultaneously update. In qualitative terms, behavioral motivations are assumed to be either aspirational – meaning that the probability of cooperation is greater when an individual’s payoff is lower (i.e., their needs are not met) – or philanthropic – meaning that the probability of cooperation is greater when an individual’s payoff is higher (i.e., their needs are met). In order to capture this we define two variables, the need threshold α and motivation intensity λ (where λ > 0 corresponds to philanthropic motivation while λ < 0 corresponds to aspirational motivation – see Fig. 1). Under this model an individual selected to update their behavior, who obtained payoff u in the last round, chooses to cooperate next round with the probability

$$g(u)=\frac{1}{1+\exp [-\lambda (u-\alpha )]}$$
(2)

and defect with 1 − g(u). In general, each individual in the population may have a different behavioral motivation, i.e., they may differ in both their value of α and λ.

Fig. 1: Evolutionary dynamics of behavioral motivation.
figure 1

a The population structure is described by a network, and each individual (node) in the population has a behavioral motivation A or B (circle) and adopts action cooperation (C) or defection (D) (square). The figure illustrates two examples of behavioral motivations: one with need αA and motivation intensity λA, and the other with need αB and motivation intensity λB. With the shown behavioral motivation A, the individual is more likely to cooperate when his payoff exceeds the need, i.e., u > αA. Conversely, with the shown behavioral motivation B, the individual tends to defect when he fulfills his needs, i.e., u > αB. b In every round t, every individual adopts cooperation or defection to play games with each neighbor and obtain an edge-weighted average payoff ui(t). Here we consider a network where all edge weights are set to 1. c An individual (marked by “?”) is selected uniformly at random to update his action based on his own behavioral motivation, namely, to cooperate next round with the cooperating probability and to defect otherwise. d Game playing and action updates repeat in the next round, t + 1. e After T rounds of interactions, individuals obtain an average payoff, \({\bar{u}}_{i}={\sum }_{t=1}^{T}{u}_{i}(t)/T\). f An individual (marked by “?”) is selected uniformly at random to update his behavioral motivation, and all neighboring individuals, indicated by black circles, compete to be imitated by the focal individual, with probability proportional to their average payoff. g After the behavioral motivation updating, game playing, and action updates restart from round 1.

Figure 1 illustrates the dynamics of an evolving system with two behavioral motivations, namely motivation A with αA and λA, and motivation B with αB and λB. u − α measures how much the payoff obtained by an individual exceeds their need threshold. When the obtained payoff u equals the need threshold α, the individual chooses to cooperate with probability 1/2.

Figure 2 illustrates the four qualitatively different behavioral motivations under our model, and their relationship to the need threshold α and motivation intensity λ. A large value of the need threshold α indicates a large payoff is required for an individual’s needs to be met. In the donation game, if two individuals randomly choose whether to cooperate or defect, their expected payoff is (b − c)/2. Therefore, we refer to a need greater than (b − c)/2 as ‘demanding’, and a need less than (b − c)/2 as ‘undemanding’. The sign of motivation intensity λ determines whether the individual’s motivation type is aspirational or philanthropic. When λ is positive, g(u) (i.e., the probability of cooperation) monotonically increases with payoff u. When the payoff exceeds the need threshold, i.e., u > α, the individual is more likely to cooperate than defect, i.e., g(u) > 1/2. Such individuals are motivated to help others when their needs are met. An individual is thus an ‘undemanding philanthropist’ if λ > 0 and their need threshold is low, and a ‘demanding philanthropist’ if their need threshold is high. When λ is negative, g(u) monotonically decreases with payoff u. When the payoff exceeds the need threshold, i.e., u > α, the individual is less likely to cooperate than defect, i.e., g(u) < 1/2. Such individuals are motivated to help others when their needs are not met. An individual is thus an ‘undemanding aspirationalist’ if λ < 0 and their need threshold is low, and a ‘demanding aspirationalist’ if their need threshold is high. The absolute value of motivation intensity, i.e., λ, measures how strictly the individual follows their behavioral motivation. For example, for a philanthropist, a large value of λ indicates that the individual will immediately choose to cooperate once their need is met, but will never cooperate before that.

Fig. 2: Four representative behavioral motivations.
figure 2

A behavioral motivation is described by a pair of variables, namely need threshold (α) and motivation intensity (λ), corresponding to a point in the (αλ) plane. In a donation game, if both participants choose cooperation (or defection) with probability 0.5, each player’s expected payoff is (b − c)/2. If a player’s need threshold is greater than (b − c)/2, they are referred to as ‘demanding’, whereas they are referred to as ‘undemanding’ if their need threshold is less than (b − c)/2. If a player’s motivation intensity λ has a positive value, this indicates that they are more likely to cooperate if their need is met, which we call ‘philanthropic’ behavioral motivation. If λ is negative, they are more likely to cooperate if their need is not met, which we refer to as ‘aspirational’ behavioral motivation. As such, there are four qualitatively different types of players: undemanding philanthropist, demanding philanthropist, undemanding aspirationalist, and demanding aspirationalist.

In order to model the evolution of behavioral motivations, we allow the process of action updating to repeat for T rounds, so that each individual i obtains an average payoff given by \({\bar{u}}_{i}=(1/T)\mathop{\sum }_{t=1}^{T}{u}_{i}(t).\) We then choose a random individual i to update their behavioral motivation based on a death-birth updating rule in which i replaces their current behavioral motivation with the motivation used by their neighbor j’s with probability eij where

$${e}_{ij}=\frac{{w}_{ij}{\bar{u}}_{j}}{{\sum }_{\ell \in {{\mathcal{N}}}}{w}_{i\ell }{\bar{u}}_{\ell }}.$$
(3)

After each behavioral motivation update, the process of action updating proceeds for another T rounds, and the process repeats.

In the main body of the text, we focus on the parameter region of weak motivational intensity, specifically when λ 1, and later we demonstrate the qualitative consistency of results for strong motivational intensity. Firstly, we examine fixed behavioral motivations and analyze the cooperation abundance under the condition that each individual’s behavioral motivation remains constant throughout the evolutionary process. Next, we move on to the scenario where individuals’ behavioral motivations evolve and investigate the survival of behavioral motivations. Lastly, we explore several extensions and generalizations of behavioral motivations.

Evolutionary dynamics of cooperation with fixed behavioral motivation

Let αi and λi denote individual i’s need threshold and motivation intensity. When individuals’ behavioral motivations remain unchanged throughout the evolutionary process, after a sufficiently large number of interactions and action updating, the abundance of cooperative behaviors in the population, i.e., \({x}_{C}=(1/N){\sum }_{i\in {{\mathcal{N}}}}{s}_{i}\), tends to be stationary, given by (see Methods and Supplementary Note 3)

$${x}_{C}=\frac{1}{2}+\frac{1}{8N}\left[\left(b-c\right)\mathop{\sum}_{i\in {{\mathcal{N}}}}{\lambda }_{i}-2{\sum}_{i\in {{\mathcal{N}}}}{\lambda }_{i}{\alpha }_{i}\right].$$
(4)

Intuitively, from an individual perspective, an undemanding philanthropic behavioral motivation is more conducive to cooperation, while a demanding philanthropic motivation can lead to the breakdown of cooperation. This is because individuals with lower needs tend to cooperate more frequently. In other words, it is easy to see that increasing the need threshold inhibits cooperation. However, from a global perspective, particularly in structured populations, an individual’s actions depend on the comparison between their need threshold and the payoff obtained from all interactions with neighbors. The population structure often leads to a complex coupling of individuals’ behavioral motivations and cooperative actions, making the prediction of the global cooperation level more challenging than at the individual level.

This effect can be even more unpredictable when individuals have different need thresholds. For example, consider two cases within the same heterogeneous structured population. In the first case, individuals occupying the largest 50% of highly connected nodes have a higher threshold, α + ϵ, while those in the least 50% have a lower threshold, α − ϵ. In the second case, the thresholds are reversed: individuals in the largest 50% of highly connected nodes have a lower threshold, α − ϵ, and those in the least 50% have a higher threshold, α + ϵ. Although the average threshold is identical in both cases, it is not intuitive which case will lead to higher cooperation levels. The variation in individuals’ motivation intensity further complicates the outcome.

In Fig. 3e, we depict the cooperation abundances in a population of philanthropists and aspirationalists, where individuals are distributed in a structured population and differ in their need thresholds. We find that for the homogeneous setup of motivation intensity, the average need threshold of the whole population, i.e., \(\alpha=(1/N){\sum }_{i\in {{\mathcal{N}}}}{\alpha }_{i}\), determines the cooperation abundance. Therefore, in a population of philanthropists, an increase in the average need threshold leads to a decrease in cooperation abundance. Conversely, in a population of aspirationalists, an increase in the average need threshold leads to an increase in cooperation abundance. It’s noteworthy that philanthropists are not inherently more prosocial than aspirationalists when it comes to helping others. Generally, a population of demanding aspirationalists sustains a higher cooperation abundance than a population of demanding philanthropists. This is because demanding philanthropists tend to defect more often due to their high need to be satisfied, while demanding aspirationalists tend to cooperate more frequently. These results are consistent across all six types of networks analyzed. Put simply, altering the average need threshold (α) produces an overall outcome that aligns with the expected results based on the model’s definition.

Fig. 3: Undemanding philanthropic and demanding aspirational behavioral motivations promote cooperation.
figure 3

We consider four types of games, namely two-action donation games (a, e), three-action linear donation games (b, f), three-action nonlinear donation games with benefit factor ω = 1.5 (c, g), and with benefit factor ω = 0.5 (d, h). Dots in (ad) illustrate the optional actions in the game, with the action cost shown in the x-axis and the generated benefit in the y-axis. eh presents the abundance of cooperation as the average need threshold \(\bar{\alpha }\) varies from undemanding to demanding levels. In each game, we investigate both philanthropic (blue, λ = 0.01) and aspirational (red, λ = −0.01) behavioral motivations on six classes of networks (random regular networks (RR), Erdös-Rényi networks (ER)57, Watts-Strogatz small-world networks (SW)58 with rewiring probability 0.1, Barabási-Albert scale-free networks (BA-SF)59, Goh-Kahng-Kim scale-free networks (GKK-SF)60 with exponent 2.5, and Holme-Kim scale-free networks (HK-SF)61 with triad formation probability 0.1). Dots in (eh) indicate the results of Monte Carlo simulations, and lines are analytical results. The results show that in a population of undemanding philanthropic and demanding aspirational behavioral motivations, cooperation is favored, consistent in all population structures. Each dot in (eh) is the result averaged over 5000 simulations, and each simulation lasts for 105 rounds. We consider two initial configurations: individuals occupying the largest 50% of highly connected nodes have a higher threshold, α + ϵ, while those in the least 50% have a lower threshold, α − ϵ (positive correlation, solid dots); individuals in the largest 50% of highly connected nodes have a lower threshold, α − ϵ, and those in the least 50% have a higher threshold, α + ϵ (negative correlation, open dots). Parameter values: network size N = 100, average degree d = 6, benefit b = 6, cost c = 1, and ϵ = 0.5.

We also investigate multi-action donation games that account for situations where an individual can break down their willingness to cooperate into multiple steps or “levels” such that they only cooperate at higher levels if they have already successfully cooperated with others at lower levels. One way of understanding this type of multi-level cooperation is to think about each level as a “need”. An individual may choose to help others only if they have both food and shelter, corresponding to the two-action donation game discussed above. With multiple levels of needs, the individual may choose to provide some help if their food need is satisfied, and give more help if both food and shelter needs are met, resulting in a three-action game with two thresholds between them. We formalize multi-action linear donation games as follows: Let L denote the number of actions, and each action {1, 2, …, L} involves paying a cost of c( − 1)/(L − 1) to generate a benefit of b( − 1)/(L − 1) (see Fig. 3b for an example of the three-action linear donation game). Action 1 corresponds to defection, and action L corresponds to cooperation in the classic donation game. The threshold between actions and  + 1 is set to be α/(L − 1), and the threshold to action L is α. We also select the switching function appropriately to obtain the classic two-action donation game as a specific case (see details in Methods). Let si {1, 2,  , L} denote individual i’s action. The cooperation abundance for such multi-action donation games is \({x}_{C}=(1/N){\sum }_{i\in {{\mathcal{N}}}}({s}_{i}-1)/(L-1)\).

Once again, we find that undemanding philanthropic and demanding aspirational behavioral motivations promote cooperation (see Eq. (16) in Methods for the analytical cooperation abundance and Fig.3f for simulation results). In addition to the multi-action linear donation games, we also study multi-action nonlinear donation games, where donating a cost of c( − 1)/(L − 1) yields a benefit of b(1 − ω−1)/(1 − ωL−1), nonlinearly related to the cost. Above ω is the benefit factor, where ω > 1 corresponds to synergistic donation games and ω < 1 corresponds to discounting donation games (see Eq. (18) and Fig. 3cd, respectively). The results remain robust.

Multi-action donation games provide a better model than two-action games to describe complex needs. However, a natural question arises regarding how increasing the number of action options affects the global cooperation abundance. Our analysis of Eq. (16) demonstrates that for philanthropists with low needs, i.e., α < (b − c)/8, an increase in the number of actions L results in a decrease in the cooperation abundance xC (see Fig. 4a). Conversely, for philanthropists with high needs, i.e., α > (b − c)/2, xC monotonically increases with increasing L. An intermediate need level yields maximal cooperation abundance at \({L}^{*}=1/(1-\sqrt{2\alpha /(b-c)})\). Intuitively, an increase in the number of actions provides individuals with more donation options, such as partially cooperative behavior in addition to the options of fully cooperative and defective behavior in a two-action donation game. For high need thresholds, individuals have the option to engage in partially cooperative behavior, which avoids the high cost of full cooperation and maintains cooperation at a certain level. In particular, Fig. 4a shows that in a population of demanding philanthropists, i.e., α > (b − c)/2, even when cooperation is disfavored for two-action donation games, i.e., xC < 1/2, an increase in the number of actions can make cooperation more favorable, i.e., xC > 1/2. Conversely, when the need threshold is low, individuals can easily fulfill their needs and opt for cooperation in two-action games. Introducing more actions, such as partially cooperative behavior, encourages a substantial fraction of individuals to engage in partially cooperative behavior instead of full cooperation, thereby reducing the overall cooperation abundance. For intermediate need thresholds, an intermediate number of actions ensures the possibility of partially cooperative behavior while avoiding individuals getting trapped in the low cooperative level.

Fig. 4: Breaking down a high level of need into small pieces can make cooperation favorable.
figure 4

a Abundance of cooperation xC as a function of the need threshold α and the number of available actions L in the multi-action linear donation game. In the red zone, the cooperation abundance xC decreases monotonously with L, and a large L can make cooperation less favorable. In the blue zone, the increasing L monotonously increases the cooperation abundance xC. The solid dashed line marks the level of xC = 1/2. Thus, for behavioral motivations with a high need threshold α > 1/2, increasing the number of available actions can make cooperation favorable, i.e., xC > 1/2. b Abundance of cooperation xC as a function of the benefit factor ω and the number of available actions L in the multi-action nonlinear donation game. Generally, the cooperation abundance increases with L for ω < 1 and decreases with L for ω > 1. Similarly, for ω < 1, increasing the number of available actions can make cooperation favorable, i.e., xC > 1/2. Parameter values: b = 6, c = 1, λ = 0.01, and α = 3 (b).

Figure 4b displays the global cooperation abundance xC as a function of the benefit factor ω and the number of actions L. Generally, for ω < 1, an increase in the number of actions is beneficial to cooperation, leading to a cooperation abundance above 1/2. One possible explanation for the cooperation-promoting effect is that for ω < 1, both the cost and the need threshold increase linearly with the number of actions, while the benefit generated by an action is concave. As a result, a small additional cost yields a disproportionately large benefit, which exceeds the increase in the need threshold. Therefore, the ratio of benefit to need threshold is greatly higher for actions with low cost. The gradual increase in the number of actions encourages players to become more cooperative. Conversely, for ω > 1 (a convex curve), the opposite outcome occurs. Increasing the number of actions leads to a decrease in the cooperation abundance xC. This is because the benefit generated by actions with low cost is insufficient to offset the cost of cooperative actions and the need threshold. As the number of actions increases, the ratio of benefit to need threshold for actions with low cost decreases, making it harder to adopt cooperative behavior. These intuitions also support the observation that the global cooperation abundance decreases as the benefit factor ω increases. Besides, we observe similar non-monotonicity in a population of aspirationalists (see Supplementary Fig. 1).

Evolutionary dynamics of behavioral motivation

In this section, we investigate the evolution of behavioral motivations. Suppose a population consisting of a single individual using behavioral motivation A and N − 1 individuals using B. When there is no exploration of new motivations in the motivation updating stage, the population is expected to eventually reach an absorbing state where either all individuals use behavioral motivation A or use B. Let ρA denote the fixation probability that an individual using behavioral motivation A, when initially placed in a random node, eventually causes a population of individuals using behavioral motivation B to switch to using A. For motivation intensity λ = 0, every individual chooses cooperation and defection equitably (see Eq. (2)), resulting in fixation probability 1/N. Selection favors the evolution of behavioral motivation A if it is more likely to fix than a neutral mutant, i.e., ρA > 1/N. Under weak motivation intensity, i.e., λA 1 and λB 1, we have the condition for behavioral motivation A to be favored over B, given by (see Methods and Supplementary Note 3)

$$\left[{\lambda }_{A}\left(b-c-2{\alpha }_{A}\right)-{\lambda }_{B}\left(b-c-2{\alpha }_{B}\right)\right]\left[-c{\eta }_{2}+b({\eta }_{3}-{\eta }_{1})\right]\, > \, 0.$$
(5)

Above, ηn is a quantity depending on the population structure13,15,29 (see “Methods”).

We consider two philanthropic behavioral motivations with the same intensity λA = λB > 0 but different need thresholds αA > αB. Rewriting Eq. (5) yields \(\left({\alpha }_{B}-{\alpha }_{A}\right)\left[-c{\eta }_{2}+b({\eta }_{3}-{\eta }_{1})\right]\, > \, 0\), indicating that selection favors philanthropists with high needs when the benefit-to-cost ratio is small. However, when the benefit-to-cost ratio b/c exceeds a critical value η2/(η3 − η1), denoted as (b/c)*, philanthropists with low needs are favored. This finding suggests that in a population full of demanding philanthropists, where individuals’ needs are hard to meet and the global cooperation abundance is low initially, an undemanding philanthropist can promote the transition to a cooperative population as long as the cooperative act is sufficiently profitable per unit of cost. We confirm the theoretical predictions in both homogeneous and heterogeneous networks in Fig. 5. In particular, the critical benefit-to-cost ratio (b/c)* is determined by the population structure, which has two important implications. Firstly, in the well-mixed setting, (b/c)* = −(N − 1), indicating that undemanding philanthropists are disfavored for any large benefit-to-cost ratio. However, placing individuals in the proper spatial structure, such as the lattice, yields (b/c)* = 4(N − 2)/(N − 8), enabling the evolution of undemanding philanthropists. Secondly, in structured populations, modifying the population structure could be a potential solution to alter the evolutionary outcome of behavioral motivations, such as transitioning from heterogeneous networks (Fig. 5b) to homogeneous networks (Fig. 5a).

Fig. 5: Selection favors undemanding philanthropists over demanding philanthropists when the benefit-to-cost ratio exceeds a critical value.
figure 5

Presented is the fixation probability of an individual using behavioral motivation A, i.e., (αAλA), in the population of individuals using behavioral motivation B, i.e., (αBλB), as a function of benefit b in the two-action donation game, with cost c = 1. We consider random regular networks (a) and BA scale-free networks (b). Selection favors behavioral motivation A over B if fixation probability ρA exceeds the horizontal line, i.e., ρA > 1/N. Squares indicate fixation probabilities by Monte Carlo simulations, and solid lines are analytical results. Red lines and squares represent the fixation probability of philanthropic motivation A, i.e., (1,0.01), in a population of B, i.e., (3,0.01), which shows that selection favors undemanding over demanding individuals as long as the benefit-to-cost ratio exceeds the critical ratio, i.e., b/c > (b/c)*. Nonetheless, for motivations with αA = αB, the evolution of the motivation intensity is non-monotonous with benefit b --- both the small and large b/c favor a strong motivation, while the intermediate b/c favors weak motivation, as blue lines and dots show (the evolution of (2,0.03) in a population of (2,0.01)). The fixation probability of beneficial motivation A, ρA, is determined by the fractions of simulations where the beneficial motivation A reached fixation out of 2 × 107 generations. Parameter values: population size N = 100 and average degree d = 6.

We now consider two behavioral motivations with the same need threshold αA = αB = α, but different motivation intensities λA > λB. Rewriting Eq. (5) gives the condition for the evolution of behavioral motivation A, i.e., \(\left({\lambda }_{A}-{\lambda }_{B}\right)\left(b-c-2\alpha \right)\left[-c{\eta }_{2}+b({\eta }_{3}-{\eta }_{1})\right]\, > \, 0\). Figure 5 shows that the evolutionary fate of behavioral motivation A is non-monotonous with the benefit-to-cost ratio b/c: both a small and large b/c support motivation A, but an intermediate b/c makes motivation A disfavored. To gain insight into this, we consider the example of λA > 0 > λB. The evolution of behavioral motivation A depends on two aspects: (i) whether or not behavioral motivation A is cooperation-promoting (i.e., whether the cooperation abundance in a population of individuals using A is higher than the defection abundance), which is captured by xC > 1/2 in Eq. (4), as determined by λA(b − c − 2α); and (ii) whether or not the population structure supports cooperation and accordingly cooperation-promoting motivations, as captured by  − cη2 + b(η3 − η1). If the benefit-to-cost ratio is small enough such that b − c − 2αA < 0, motivation A leads to xC < 1/2 and is thus defection-promoting. Furthermore, if the small benefit-to-cost ratio also satisfies  − cη2 + b(η3 − η1) < 0, the population structure favors defection-promoting motivation, resulting in the evolution of motivation A. On the other hand, if the benefit-to-cost ratio is large enough such that λA(b − c − 2α) > 0 and  − cη2 + b(η3 − η1) > 0, motivation A is cooperation-promoting (i.e., xC > 1/2), and the population structure favors cooperation-promoting motivation, resulting in the evolution of motivation A. However, if the population structure and the motivation intensity are not aligned, motivation A can either promote cooperation while the population structure favors defection-promoting motivation or promote defection while the population structure favors cooperation-promoting motivation. In both cases, motivation A will shrink.

Furthermore, we consider the exploration of new motivation in the motivation updating stage and investigate the evolution of behavioral motivations in the entire (αλ) space, ensuring that the system never becomes trapped in an absorbing state. Let xC(A) (respectively xC(B)) denote the global cooperation abundance when all individuals use behavioral motivation A (respectively, motivation B). By applying Eq. (4) to Eq. (5), we obtain the condition favoring behavioral motivation A over B,

$$\left({x}_{C}({{\bf{A}}})-{x}_{C}({{\bf{B}}})\right)\left[-c{\eta }_{2}+b({\eta }_{3}-{\eta }_{1})\right]\, > \, 0.$$
(6)

Thus, when the benefit-to-cost ratio falls below a critical value, i.e., b/c < (b/c)*, the evolution leads to the adoption of cooperation-inhibiting behavioral motivations, resulting in a continuously decreasing cooperation abundance. As shown in Fig. 6a, even if initially all individuals are undemanding philanthropists (region II) or demanding aspirationalists (region IV), and the population exhibits a high abundance of cooperation, i.e., xC > 1/2, as long as the benefit-to-cost ratio is below the critical value, all individuals gradually transition to being either demanding philanthropists (region I) or undemanding aspirationalists (region III). Our analytical predictions are supported by extensive Monte Carlo simulations, which include the evolutionary direction of behavioral motivations (see Fig. 6b) and the collapsing cooperation (see Fig. 6c). It is important to note that we investigated the largest possible motivation range by considering an adequate number of motivation updating steps and by not imposing any limit on the need threshold or motivation intensity. As a result, the need threshold exceeds the feasible range, namely [− cb], and the evolutionary trajectories subsequently oscillate within the domain of demanding philanthropists and undemanding aspirationalists (as shown in Fig. 6b).

Fig. 6: Evolution of behavioral motivation.
figure 6

a The theoretical prediction of the evolutionary direction of behavioral motivations for (b/c) < (b/c)*. The evolution results in individuals transitioning away from undemanding philanthropists (region II) and demanding aspirationalists (region IV), and towards demanding philanthropists (region I) and undemanding aspirationalists (region III), as indicated by the arrows. This transition leads to a decrease in the abundance of cooperation xC. The blue (respectively red) regions represent the behavioral motivation that contributes to a larger abundance of cooperation than defection (respectively defection than cooperation). b The Monte Carlo simulations show the evolutionary trajectories of behavioral motivations for (b/c) < (b/c)* using 300 simulations in random regular networks. Each simulation starts from a monomorphic population with behavioral motivations (αλ) in one of (0.75,0.05), (0.25,0.05), (0.25,− 0.05), and (0.75,− 0.05), represented by open black dots, and undergoes 5 × 107 motivation updating steps, where interactions and action updates repeat for T = 100 rounds before each motivation updating. During each behavioral motivation update, with a probability of 0.01, the imitated behavioral motivation is subject to a random fluctuation in need α (randomly sampled from the range [− 0.1,0.1]) and motivation intensity λ (randomly sampled from the range [− 0.01,0.01]). Each thin red line represents a resulting trajectory (i.e., the average behavioral motivation of the population), and each open red dot represents an ending behavioral motivation. The thick red line represents the linear regression of all final behavioral motivations, which is highly consistent with the evolutionary direction predicted analytically in (a). c The cooperation abundance throughout the evolutionary process (b/c) < (b/c)* by simulations. The highlighted line represents the average cooperation abundance over the 300 simulations. d The theoretical prediction of the evolutionary direction of behavioral motivations for (b/c) > (b/c)* shows that individuals evolve towards undemanding philanthropists (region II) and demanding aspirationalists (region IV). e The evolutionary trajectories of behavioral motivations for (b/c) > (b/c)* by simulations. f The cooperation abundance throughout the evolutionary process for (b/c) > (b/c)* by simulations. Parameter values: N = 100, d = 6, which gives (b/c)* ≈ 6.7, b = 2, c = 1 (bc) and c = 0.2 (ef).

On the contrary, when the benefit-to-cost ratio exceeds the critical value, i.e., b/c > (b/c)*, even if initially all individuals are demanding philanthropists or undemanding aspirationalists, and the population presents more defection than cooperation, i.e., xC < 1/2, the evolution of behavioral motivations gradually leads all individuals to become undemanding philanthropists or demanding aspirationalists (see Fig. 6d). Extensive simulations confirm the analytical prediction of motivation evolution (see Fig. 6e) and the continuous increase in the abundance of cooperation (see Fig. 6f).

Extensions

Finally, we consider various model extensions and generalize our conclusions to different scenarios, including (i) any game with an arbitrary number of actions and general payoff structures, which includes two- or three-action donation games as a specific case (see Supplementary Note 2); (ii) any need threshold setting between multiple actions and general action switching functions, beyond the linear threshold setting and sigmoid functions as in Eq. (2) (see Supplementary Note 2); (iii) state-dependent action updating, where the probability of cooperating next round depends not only on the obtained payoff but also on the current action, as in the case of ‘hysteresis’ (see Supplementary Note 3); (iv) individualized need thresholds and action updating functions for each individual (see Supplementary Note 3). In all these extensions, we demonstrate that the population structure has no impact on the cooperation abundance for a fixed behavioral motivation, but plays a critical role in influencing the evolutionary direction when behavioral motivation evolves. So far, our analysis has relied on the assumption of weak motivational intensity, i.e., λ 1. We also demonstrate that all our findings are qualitatively consistent when the motivational intensity increases up to 1 (see Supplementary Fig. 2 for the robustness of the cooperation abundance against the population structure, Supplementary Figs. 3 and 4 for the evolutionary trajectories of behavioral motivations, and Supplementary Fig. 5 and Supplementary Note 4 for theoretical results based on adaptive dynamics analysis30,31,32) and results remain robust when multiple individuals simultaneously update their actions (see Supplementary Fig. 6).

Discussion

Most studies of cooperation focus on the idea that the strategies individuals use in deciding whether to cooperate are the product of a process of natural selection or learning that seeks to maximize the payoff they (or their lineage) receive from cooperative acts. In reality, human beings face many opportunities to engage in minor acts of cooperation every day, and the decision whether to help another person is typically guided by a few simple heuristics, rather than a carefully optimized behavioral strategy. And so we have asked the natural question: what happens if natural selection acts at the level of the heuristics people use when deciding to cooperate? To answer this, we characterize individual decisions to cooperate in terms of an internal behavioral motivation.

Our results show that the underlying behavioral motivations for cooperation have a large impact on how much cooperation occurs. We show that undemanding philanthropists and demanding aspirationalists are more likely to sustain a high level of cooperation, whereas demanding philanthropists and undemanding aspirationalists are more likely to defect, regardless of population structure. Interestingly, we also discover that when choices are not limited to binary options — fully cooperative when the entire need is met, and fully defective when it is not — and needs are divided into several smaller parts, a group of demanding philanthropists tends to use cooperation rather than defection. For instance, if an individual has a single demanding need for food and shelter, this tends to lead to a low cooperation rate. However, if the need is divided into food and shelter, the individual can choose to be partly cooperative once the food need is met and then fully cooperative after both food and shelter needs are met. This results in more cooperation within the population. On the other hand, if the need is already undemanding and easy to meet, breaking it down into multiple smaller needs may decrease cooperation. This is because some individuals may remain partly cooperative, even though it is easy to be fully cooperative in a two-action game.

A key finding of our analysis is that need intensity tends to evolve to either be large and positive or large and negative (Fig. 6), corresponding to a motivation that comprises a sharp, switch-like behavior in which cooperation shifts from occurring at low rates to occurring at high rates once a need threshold is reached. From an empirical viewpoint, this kind of behavior corresponds to individuals using an internal reference point to decide whether to cooperate. This kind of sharp response to an internal reference point has frequently been used to model motivations in both human and animal behavioral ecology. Indeed, this pattern serves as the foundation for numerous theoretical studies on aspiration-based action updating and cooperation33,34,35,36,37,38,39. Our work shows how such reference points can arise via evolution.

We also note a number of other key differences between our study and previous work. Prior studies assume that all individuals are self-interest motivated and only have two actions to choose from — one keeps using the current action if the aspiration is met, and otherwise switches to the other action. This limits the interactions between individuals. Secondly, these studies still follow the idea of comparing actions, without mentioning behavioral motivations on action updating at all. Lastly, these studies do not consider the evolution of individuals’ behavioral motivations or action updating rules. As a result, they fail to reveal the important effects of population structure. In contrast, our model endows each individual with an individualized behavioral motivation, which guides their decision-making among an arbitrary number of actions. Our model can recover the prior studies as a specific case (see Supplementary Note 3), but also goes beyond by considering the evolution of individuals’ behavioral motivations and the effects of population structure on their decision-making. Particularly, we study the evolution of aspiration-based action updating in a population of philanthropists and aspirationalists. We find that in the interacting environment with b/c > (b/c)*, both undemanding philanthropists and demanding aspirationalists, by fostering a high level of cooperation, can resist the invasion of mutants using aspiration-based action updating (see Supplementary Fig. 7).

Our study also offers a few insights into how population structure impacts cooperation. Theoretical studies which focus on the evolution of cooperation in one-shot games have demonstrated that population structure, including the density and distribution of connections, has a profound impact on evolutionary outcomes11,13,14,15,40,41,42. However, several experimental studies have shown that a heterogeneous population structure does not provide additional advantages for the evolution of cooperation43. While there may be many reasons for this, we note that these findings are consistent with our study, in which heuristics in the form of behavioral motivations drive the decision to cooperate. In our study, when individuals’ behavioral motivations remain fixed, the global cooperation abundance remains robust against population structure, regardless of the density and distribution of connections. Several prior studies focusing on aspiration-based action updating have found that the abundance of cooperation on random regular networks is identical to that in a well-mixed setup34,35. Analyzing the σ rule for strategy evolution reveals a structural coefficient σ = 1, indicating the absence of cooperation clusters under aspiration-based action updating, similar to the well-mixed scenario34,35. We offer an alternative intuition applicable to any threshold-based action updating: the frequency of an individual taking any action is fully determined by the payoff structure, their motivation intensity, and their need threshold, but is independent of their connections with other individuals (see Eq. (7) in the Supplementary Information). However, we also note that once individuals’ behavioral motivations begin to evolve, population structure again plays a critical role in determining the evolutionary direction of these motivations. This is because undemanding philanthropists and demanding aspirationalists can lead to a higher level of cooperation, and particularly, the death-birth updating process favors cooperation for certain b/c ratios, which in turn supports the evolution of undemanding philanthropists within a population of demanding philanthropists.

In studying the evolution of behavioral motivations, we find that the trajectory of individuals’ heuristics is influenced by a critical benefit-to-cost ratio (b/c)*, which determines the evolutionary trajectories and outcomes. Specifically, if the benefit-to-cost ratio is low, i.e., b/c < (b/c)*, even if the population is initially composed of undemanding philanthropists or demanding aspirationalists, and cooperation is more prevalent than defection, over time all individuals gradually abandon their prosocial preferences and switch to demanding philanthropists or undemanding aspirationalists, resulting in a sharp decline in the cooperation abundance. Conversely, if the benefit-to-cost ratio is just above the critical ratio, i.e., b/c > (b/c)*, in a population consisting of demanding philanthropists or undemanding aspirationalists, where defection is more prevalent than cooperation, we observe the emergence and expansion of undemanding philanthropists and demanding aspirationalists, creating a conducive environment for cooperation. Notably, the critical benefit-to-cost ratio is greatly influenced by the population structure. These findings have two important implications. Firstly, for the classic well-mixed population, where any two individuals are equally likely to interact, the critical ratio is  − (N − 1), implying that undemanding philanthropists and demanding aspirationalists are unable to evolve for any benefit-to-cost ratio. By considering population structures, particularly those with sparse connections, we can achieve a positive (b/c)* that facilitates the evolution of prosocial behavioral motivation. Real-world networks are often much sparser than well-mixed setups, which may explain the prevalence of cooperation. Secondly, if the (b/c)* value is too large to attain, a potential solution is to modify a few connections, which can reduce the (b/c)* value to below the actual benefit-to-cost ratio.

There is a natural connection between our work and the study of cooperation in iterated games4,44,45,46,47,48,49,50, in which players update their behavior based on the outcome of previous interactions. Indeed, strategies such as tit-for-tat4 can be thought of as heuristics for determining when to engage in cooperation. However, iterated game strategies describe decision-making as conditional on the history of play with a specific interaction partner, whereas the behavioral motivations we study operate at the level of the cumulative payoff received by an individual over many interactions. Which kind of heuristics people use in reality may depend on the relationship between the individuals interacting and the cognitive demands on decision-making19.

In this work, we focus on the two-action donation game and its multi-action variations as they capture the cooperation dilemmas where pursuing a short-term larger payoff leads to cooperation collapse and collective tragedy. However, our treatment can be applied to other interaction scenarios, such as snowdrift games and stag-hunt games (see Supplementary Note 3 and Supplementary Fig. 8). Although a few recent studies incorporate the idea of indirect evolution - where individuals update their actions according to an objective function different from the actual payoffs51,52,53 - theoretical exploration in this area is relatively underdeveloped compared to the direct evolution of actions. Therefore, we suggest that the application of evolutionary game theory to the study of human behavior should focus more strongly on the evolution of decision heuristics and the underlying motivations for cooperation.

Our work does not attempt to describe a new mechanism for the evolution of cooperation, but rather assumes that all individuals are willing to cooperate under some circumstances, and then explores how those circumstances evolve in terms of behavioral motivations. And so our model does not attempt to capture the emergence of baseline social norms of cooperation, but variation in an individual’s behavior against that baseline. However, it is clear that social norms may influence the evolution of behavioral motivations for cooperation in ways not explored here. For example, a transition from philanthropic to aspirationally motivated cooperation may be constrained if aspirational cooperators are perceived as norm violators. We propose that integrating our modelling framework with models of reputation management via social norms6,7,8,9,10 will be a productive avenue for exploring this type of interaction in future work.

An overarching goal of this work is to develop a modelling framework that address questions relating to the evolution of cooperation in humans in ways that better connect to the empirical literature. In particular, our model addresses the relationship between individual wealth and willingness to cooperate, and reveals an intriguing symmetry, in which similar levels of cooperation can emerge along with opposite motivations for engaging in that cooperation. This finding helps makes sense of some of the apparently conflicting evidence in the literature25,26,27,28, which sees some support for both aspirationally and philanthropically motivated cooperation. Our key results (Fig. 6) suggest that the key factor distinguishing populations may not be whether they are aspirationally or philanthropically motivated, but the direction of the correlation between motivation intensity and need threshold, i.e., whether people are demanding or undemanding philanthropists or aspirationalists. Furthermore, as our framework focuses on the evolution of behavioral motivations, it naturally extends to other domains beyond cooperation. For example, in the evolution of risk preferences, individuals may shift toward riskier, higher-reward behaviors once their payoffs exceed a critical threshold. This broader applicability highlights the potential of our approach in studying the evolution of diverse decision-making strategies across social and economic contexts.

While our theoretical approach provides insights into the evolution of motivations for cooperation, it has certain limitations. First, human motivational heuristics are far more complex and diverse than the two factors — need threshold and motivation intensity — considered in our model. Second, although our findings build on classical evolutionary dynamics and offer a few theoretical perspectives, empirical validation remains essential. Future experimental studies could examine how environmental fluctuations shape cooperative behavior and how cooperation adapts to periods of scarcity and abundance19,28,54. Incorporating additional factors could further enhance our understanding of human behavior and the motivations that drive it. From a theoretical standpoint, our study assumes a fixed functional form for decision-making (Eq. (2)) while allowing the evolution of two free parameters: need threshold and motivation intensity. A promising direction for future research is to explore the evolution of the entire decision-making function itself55.

Methods

In this section, we outline a derivation of the global cooperation abundance and the critical condition for a behavioral motivation being favored (i) for general two-action games and (ii) for multi-action donation games. Complete mathematical details and the results for general multi-action games, action-dependent need threshold, and action updating function, are provided in Supplementary Notes 1 and 2.

Two-action game

We consider the classic two-player two-action game with payoff structure

$$\overset {\begin{array}{ll}\,\,\,\,\,\,\,\,C&D\end{array}}{\begin{array}{l}C\\ D\end{array}\left(\begin{array}{ll}R&S\\ T&P\end{array}\right)}$$
(7)

We use the population structure and notation described in the Model section. We define \({\pi }_{i}={w}_{i}/{\sum }_{j\in {{\mathcal{N}}}}{w}_{j}\), pij = wij/wi, and \({p}_{ij}^{(n)}\) to be the probability that an individual starting from node i terminates in node j after an n-step random walk. Let αi denote individual i’s need threshold and λi individual i’s motivation intensity. For fixed behavioral motivations, we obtain the global abundance of cooperation

$${x}_{C}=\frac{1}{2}+\frac{1}{16N}{\sum}_{i\in {{\mathcal{N}}}}{\lambda }_{i}\left(R+S+T+P-4{\alpha }_{i}\right)$$
(8)

and the condition for cooperation being more abundant than defection, i.e., xC > 1/2, given by

$${\sum}_{i\in {{\mathcal{N}}}}{\lambda }_{i}\left(R+S+T+P-4{\alpha }_{i}\right)\, > \, 0.$$
(9)

When it comes to the evolution of behavioral motivations, we can obtain ρA, the fixation probability of an individual who uses motivation A (with need threshold αA and motivation intensity λA) in a population of individuals that use motivation B (with need threshold αB and motivation intensity λB). First, we obtain the correlation of behavioral motivation in two nodes i and j, by solving the following O(N2) equations

$${\eta }_{ij}=\frac{1-{\delta }_{ij}}{2}+\frac{1}{2}{\sum}_{k\in {{\mathcal{N}}}}\left({p}_{ik}^{(1)}{\eta }_{kj}+{p}_{jk}^{(1)}{\eta }_{ik}\right),$$
(10)

where δij = 1 for i = j and 0 otherwise. Let \({\eta }_{n}={\sum }_{i,j\in {{\mathcal{N}}}}{\pi }_{i}{p}_{ij}^{(n)}{\eta }_{ij}\), we can express the fixation probability ρA as

$${\rho }_{A}= \frac{1}{N}+\frac{{\beta }_{A}-{\beta }_{B}}{8N(R+S+T+P)}\left[(R+S-T-P){\eta }_{2}\right. \\ \left.+(R-S+T-P)({\eta }_{3}-{\eta }_{1})\right],$$
(11)

where \({\beta }_{X}={\lambda }_{X}\left(R+S+T+P-4{\alpha }_{X}\right)\) and X {AB}. The condition for selection favoring motivation A over B, i.e., ρA > 1/N, is

$$\left({\beta }_{A}-{\beta }_{B}\right)\left[\frac{R+S-T-P}{R+S+T+P}{\eta }_{2}+\frac{R-S+T-P}{R+S+T+P}({\eta }_{3}-{\eta }_{1})\right]\, > \, 0.$$
(12)

Let xC(A) and xC(B) respectively denote the global cooperation abundance when all individuals use behavioral motivation A and B, comparing βX and xC in Eq. (8), we can rewrite Eq. (12) to be

$$\left({x}_{C}({{\bf{A}}})-{x}_{C}({{\bf{B}}})\right)\left[\frac{R+S-T-P}{R+S+T+P}{\eta }_{2}+\frac{R-S+T-P}{R+S+T+P}({\eta }_{3}-{\eta }_{1})\right]\, > \, 0.$$
(13)

Multi-action game

We consider the linear donation game with L levels of donation (or say L actions), labeled by {1, 2,  , L}, where level means paying a cost c = c( − 1)/(L − 1) to bring the opponent a benefit b = b( − 1)/(L − 1). As such, level 1 corresponds to defection, and level L means paying a cost c to yield a benefit b to the opponent, referred to be “fully cooperative”. The other actions are referred to be “partly cooperative”, i.e., paying a fraction of costs to generate a fraction of benefits. For a L-level donation game, there are L − 1 need thresholds, denoted by {α/(L − 1), 2α/(L − 1), , α}, where the need threshold to the -level donation is α( − 1)/(L − 1). By taking into account the fact that the satisfaction of a need is not an “all-or-none” phenomenon, even if the individual uses k-level donation in the current round and his payoff u does not meet the need threshold to -level donation, he is still likely to choose the -level donation. In other words, regardless of the current action, an individual is likely to choose any action next round but with a different probability. Let α denote the total need and λ the motivation intensity. We introduce αk to mark the need threshold when an individual transits the current k-level donation to the -level donation next round, given by

$${\alpha }^{k\ell }=\left\{\begin{array}{ll}\frac{\ell \alpha }{L-1}&\ell \, < \, k,\\ \frac{(\ell -1)\alpha }{L-1}&\ell \, > \, k.\end{array}\right.$$
(14)

For given payoff u, the probability of updating action k to (k ≠ ) is given by

$${g}^{k\ell }\left(u\right)=\left\{\begin{array}{ll}\frac{2}{L\left(1+\exp \left[\lambda \left(u-{\alpha }^{k\ell }\right)\right]\right)}&\ell \, < \, k,\\ \frac{2}{L\left(1+\exp \left[-\lambda \left(u-{\alpha }^{k\ell }\right)\right]\right)}&\ell \, > \, k.\end{array}\right.$$
(15)

And the probability of remaining to take a k-level donation is gkk(u) = 1 − ∑kgk(u). Action updating function Eq. (15) achieves (i) for philanthropic behavioral motivation, i.e., λ > 0, the increasing payoff u makes individuals more likely to choose highly cooperative actions, i.e.,  > k, rather than the lowly cooperative actions, i.e.,  < k; (ii) when an individual uses action k to obtain a sufficiently high payoff u, even if the payoff u greatly exceeds the threshold for a much higher level of donation, the individual is more likely to transit to an adjacent higher level of donation, such as the k  + 1 level, rather than jumping too far ahead.

We have the global cooperation abundance of L-action linear donation games, given by

$${x}_{C}=\frac{1}{2}+\frac{L+1}{12NL}\left[(b-c){\sum}_{i\in {{\mathcal{N}}}}{\lambda }_{i}-\frac{L}{L-1}{\sum}_{i\in {{\mathcal{N}}}}{\lambda }_{i}{\alpha }_{i}\right]$$
(16)

and the condition for selection favoring behavioral motivation A over B, given by

$$\left({\beta }_{A}-{\beta }_{B}\right)\left(-c{\eta }_{2}+b({\eta }_{3}-{\eta }_{1})\right)\, > \, 0,$$
(17)

where \({\beta }_{X}={\lambda }_{X}\left[b-c-{\alpha }_{X}L/(L-1)\right]\) and βX {AB}. The condition can also be expressed as Eq. (6). For the multi-action nonlinear donation game, depending on the interaction scenario modeled, there are many formalizations of the relevant payoff structure. Here, we set the benefit generated by -level donation to be b(1 − ω−1)/(1 − ωL−1) and provide details in Supplementary Note 3. Benefit factor ω = 1 corresponds to the former linear donation game, and 0 < ω < 1 (respectively ω > 1) describes the discounting effect, see Fig. 2c (respectively, synergistic effect, see Fig. 2d). We have the global cooperation abundance given by

$${x}_{C}=\frac{1}{2}+\frac{L+1}{12NL}\left[\left(\frac{2\sigma }{L}b-c\right){\sum}_{i\in {{\mathcal{N}}}}{\lambda }_{i}-\frac{L}{L-1}{\sum}_{i\in {{\mathcal{N}}}}{\lambda }_{i}{\alpha }_{i}\right],$$
(18)

where \(\sigma=\left[L(1-\omega )-(1-{\omega }^{L})\right]/\left[(1-\omega )(1-{\omega }^{L-1})\right]\).

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.