Skip to main content
Journal of the Royal Society Interface logoLink to Journal of the Royal Society Interface
. 2024 Sep 25;21(218):20240212. doi: 10.1098/rsif.2024.0212

Emergence of cooperation in the one-shot Prisoner’s dilemma through Discriminatory and Samaritan AIs

Filippo Zimmaro 1,2, Manuel Miranda 3, José María Ramos Fernández 4, Jesús A Moreno López 3, Max Reddel 5, Valeria Widler 6, Alberto Antonioni 7, The Anh Han 8,
PMCID: PMC11639149  PMID: 39317332

Abstract

As artificial intelligence (AI) systems are increasingly embedded in our lives, their presence leads to interactions that shape our behaviour, decision-making and social interactions. Existing theoretical research on the emergence and stability of cooperation, particularly in the context of social dilemmas, has primarily focused on human-to-human interactions, overlooking the unique dynamics triggered by the presence of AI. Resorting to methods from evolutionary game theory, we study how different forms of AI can influence cooperation in a population of human-like agents playing the one-shot Prisoner’s dilemma game. We found that Samaritan AI agents who help everyone unconditionally, including defectors, can promote higher levels of cooperation in humans than Discriminatory AI that only helps those considered worthy/cooperative, especially in slow-moving societies where change based on payoff difference is moderate (small intensities of selection). Only in fast-moving societies (high intensities of selection), Discriminatory AIs promote higher levels of cooperation than Samaritan AIs. Furthermore, when it is possible to identify whether a co-player is a human or an AI, we found that cooperation is enhanced when human-like agents disregard AI performance. Our findings provide novel insights into the design and implementation of context-dependent AI systems for addressing social dilemmas.

Keywords: evolutionary game theory, cooperation, human–AI interaction, Prisoner’s dilemma, donation game

1. Introduction

Societies are dynamic networks of interconnected individuals, who consistently engage in a multitude of interactions [14]. These individuals, or agents, often aspire to enhance their personal well-being. However, this aspiration may be in conflict with the need for collective welfare, creating a classic social dilemma.

This dilemma features a conundrum between personal self-interests and the shared good of society. Addressing such cooperative problems represents a recurring, intricate challenge at every level of human society [1,57]. These challenges span a wide array of issues, from negotiating the national budgets to managing communal spaces in shared residences, dealing with homelessness and confronting global predicaments such as climate change and financial crises. In the age of advanced artificial intelligence (AI), human agents are increasingly accompanied by autonomous entities with various intelligence levels, thus increasing the complexity of our social systems [815]. These intelligent agents have unique capabilities, such as disseminating information and recommending content, which can potentiate both cooperative and selfish behaviours in human agents [14,16,17]. The remarkable conversational, reasoning and informational capacities of contemporary AIs hold immense transformative potential across various domains of human endeavour [18].

On the other hand, intelligent agents pose the unique potential to promote social intelligence, i.e. the capacity of collectives to effectively cooperate in solving shared problems [5,19,20]. As the share of human–AI interactions grows, and the capabilities of intelligent agents evolve, the presence of AI in human decision-making is increasingly impactful in shaping the trade-offs of social dilemmas and, therefore, our capacity to achieve common goals. The emergent consequences of these hybrid human–AI interaction dynamics remain largely obscure and under-researched [9,10,2126]. Existing theoretical models that consider hybrid dynamics (e.g. [23,26,27]) only consider simple bot agents that are not capable of complex decision-making capabilities (that are possessed by advanced AI systems). Consequently, it is pivotal to further deepen our understanding of the impact of human–AI dynamics on strategic decision-making and collective action problems.

Research into the emergence and maintenance of cooperative behaviour has been a key concern for disciplines as varied as game theory, sociology, complex systems, multi-agent systems, physics and psychology for decades [1,7,24,2834]. Illustrating the conflict between individual and collective welfare decision-making, the Prisoner’s dilemma is widely adopted as a suitable framework for the study of the evolution and emergence of cooperation among large populations [7,3537].

Herein, we build an evolutionary game theory (EGT) [7,38,39] model to study the impact of different forms of AI agents on a population of human-like agents, characterized by social learning and reward maximization, playing the one-shot Prisoner’s dilemma game, allowing us to study how AI systems might impact the balance between cooperation and selfish behaviour and how the presence of AI could facilitate pro-social behaviour among humans. To this end, we examine the impact of two typical behaviours used by AI systems: Samaritan AI, which consistently exhibits positive behaviour by choosing to cooperate at each interaction, and Discriminatory AI, which rewards cooperation and penalizes defection. For the latter, AI agents are equipped with an advanced decision-making capability, namely, of inferring behaviour or intention of the human-like agents they interact with, e.g. by learning from past behaviours [40,41], through emotion recognition [42], or reputation score techniques [43]. Such capabilities have been studied and achieved with high accuracy using advanced AI techniques such as deep learning [44]. Recent advances in large language models, such as ChatGPT, also show AI systems are increasingly capable of the theory of mind and of inferring others’ behaviours and mental states [45,46]. This potential intention and behaviour recognition can be idealized in our model by making them knowledgeable of what the human-like agents will play in advance, eliminating the uncertainty of erroneous AI responses from our model and simplifying the model in a meaningful way.

Our primary research question revolves around determining which of either Samaritan or Discriminatory strategies is more effective at promoting cooperation among the human population. We are interested in whether the simple design of Samaritan AIs, requiring no complex decision-making, can outperform Discriminatory AIs, requiring highly advanced AI capabilities such as intention, activity or emotion recognition. To this end, we investigate, both analytically and using numerical simulations, how their performance is influenced by the key factors involved, namely, the game parameters and the governing dynamic rule, and whether an AI can be identified by human-like agents.

For a comprehensive understanding, we adopt complementary approaches in our analysis, including replicator dynamics for infinite populations [7] and stochastic dynamics for finite populations [6], both in well-mixed population settings.

2. Model and methods

2.1. Model

We consider a well-mixed population where all players interact with each other through the one-shot Prisoner’s dilemma (PD) game, choosing whether to cooperate ( C ) or to defect ( D ), with rewards given by the payoff matrix

.CD(R,RS,TT,SP,P)CD

If both interacting players follow the same strategy, they receive the same payoff: R for mutual cooperation and P for mutual defection. If the agents play different strategies, the cooperator gets the sucker’s payoff S , and the defector gets the temptation to defect T . The payoff matrix corresponds to the preferences associated with the PD when the parameters satisfy the ordering T>R>P>S . The PD can be reduced to a special case, the donation game, by establishing T=b , R=bc , P=0 and S=c , where b and c represent the benefit and cost of cooperation, respectively. Some analytical results will include PD parameters for generalization whilst numerical results will use the donation game parameters for simplicity.

In this work, we study the influence of AI agents’ behaviours on a population of human-like agents who play the one-shot PD. To do so, we examine two typical behaviours of real-world AI systems (see figure 1a ): Samaritan and Discriminatory AI agents. The Samaritan ones are fully altruistic, always cooperating with their co-players in an interaction. On the other hand, the Discriminatory AI agents selectively help only good co-players, i.e. cooperators.

Figure 1.

Modelling human–AI hybrid populations.

Modelling human–AI hybrid populations. (a) AI agents display two strategies: Samaritan or Discriminatory. Samaritan AI agents always cooperate in an interaction, while Discriminatory AI agents selectively help only cooperators. (b) AI agents have a fixed strategy (Samaritan or Discriminatory), which does not change over time. Human-like agents might change their strategy through observing and imitating the behaviour of another randomly selected player in the population, which can be either a human-like or an AI agent.

2.2. Evolutionary dynamics in well-mixed populations

The agents’ payoffs represent their social success or fitness, while the evolutionary dynamics are shaped by social learning [7,38], where the agents in the population tend to imitate the most successful ones. Here, social learning is modelled using the pairwise comparison, by which an agent with fitness fA adopts a strategy of an agent B with fitness fB with a probability pA,B given by the Fermi rule [47]

pA,B=(1+eβ(fBfA))1,

where β represents the ‘imitation strength’ or ‘intensity of selection’ that accounts for how much the agents base their choice to imitate on the difference in the fitness between the opponents and themselves. Thus, imitation happens with a 50% probability if β=0 , and it becomes increasingly deterministic for large values of β . We consider that if a human-like agent is aware that the role model is an AI agent, it might have a different probability of imitating the strategy of AI. We model that by distinguishing between human’s and AI’s intensities of selection. They would be denoted as βH and βAI , respectively, where appropriate (see details in the electronic supplementary material).

Let us consider a well-mixed hybrid population of N human-like agents and M AI agents (figure 1b ). We assume that AI agents have a fixed behaviour (Samaritan or Discriminatory), while human-like agents might adapt their strategy over time through social learning. Consider that at a given moment, there are k human-like agents adopting C (thus, Nk human-like agents adopting D ). Denoting by πX,Y the payoff that a strategist playing X obtains in an interaction with strategist playing Y , we can define the payoff of both C and D human players as follows:

ΠC(k)=(k1)πC,C+(Nk)πC,D+MπC,AIN+M1,ΠD(k)=kπD,C+(Nk1)πD,D+MπD,AIN+M1, (2.1)

where the payoffs for interactions between a human-like agent ( H ) and AI agent ( AI ) are given as

πH,AI={πH,Cfor Samaritan AI,πH,Hfor Discriminatory AI. (2.2)

Let δSAM=1 if AI is Samaritan, and 0 if AI is Discriminatory. Using the PD payoff matrix, we obtain

ΠC(k)=(k1)R+(Nk)S+MRN+M1,ΠD(k)=kT+(Nk1)P+M(δSAMT+(1δSAM)P)N+M1. (2.3)

On the other hand, the probability of increasing or decreasing by one the number k of human-like agents in the population that adopt C in each time step is

T+(k)=NkN k+δ SAMMN+MpD,C,T(k)=kN NkN+MpC,D, (2.4)

where the first term in both expressions gives the probability of choosing a human defector or cooperator, respectively; the second term gives the probability of selecting an agent, either human or AI, that cooperates or defects, respectively.

The fixation probability of a single mutant with a strategy A in a population of (N1) agents using B is given by [47,48]

ρB,A=(1+i=1N1j=1iT(j)T+(j))1. (2.5)

Considering a set {1,...,q} of different strategies, these fixation probabilities determine a transition matrix M={Tij}i,j=1q , with Tij,ji=ρji/(q1) and Tii=1j=1,jiqTij , of a Markov chain. The normalized eigenvector associated with the eigenvalue 1 of the transposed of M provides the stationary distribution described above [49], describing the relative time the population spends adopting each of the strategies.

2.3. Replicator dynamics

The previous approach is useful when the number of agents in the population is finite. Difficulties may arise as the size of the system grows due to the increasing range of values of k . For that purpose, we will consider a system with infinite number of agents. Thus, instead of using N and M as the number of human-like agents and AI agents, we denote by x the fraction of cooperators among human-like agents and by α=M/(N+M) the proportion of AI agents among the total number of agents, which would remain fixed as the size of the population tends to infinity. This approach allows us to analyse the behaviour of the system in the context of a continuous population and explore the effects of AI agents on strategy dynamics. With these considerations, we can benefit from the fact that there exist only two strategies to write the evolution of the fraction of human cooperators

x˙=(1x)[x(1α)pD,C(βH)+αpD,C(βAI)]x(1x)(1α)pC,D(βH), (2.6)

where pC,D(βH) and pD,C(βH) are the probabilities of a human imitating the strategy of another human with an opposite strategy, following the Fermi rule described above with parameter βH . In addition, pD,C(βAI) is the probability of a human defector to imitate the behaviour of an AI. Notice that human-like agents might be able to differentiate human-like agents from AI, thus it is possible that βAIβH .

3. Results

3.1. Finite population analysis

In a finite-sized and well-mixed system, stochastic fluctuations will inevitably lead the population to a homogeneous fixed point. Although a coexistence steady state cannot be possible, we can calculate the frequency of cooperation ΦC [6,50], which highlights the attraction towards cooperation in each scenario

ΦC=ρD,CρC,D+ρD,C=r1+r,

where r=ρD,CρC,D=k=1N1T+(k)T(k) . In the following, we determine r for the two different behaviours of the AI agents.

3.1.1. Unidentifiable AI

First, we consider the case where human-like agents are not aware of whether the co-player is human or AI, i.e. βAI=βH:=β . We obtain

pD,C(β)pC,D(β)=eβΔf(k),

where k refers to the number of human cooperators and Δf(k)=ΠC(k)ΠD(k) depends on the AI behaviour. We rewrite the fraction

ρD,CρC,D=GAI(N,M)eβFAI(N,M).

We derived close formulae for FAI(N,M) and GAI(N,M) in the electronic supplementary material. Cooperation is risk-dominant against defection, i.e. when ρD,C>ρC,D , which is equivalent to

βFAI(N,M)+logGAI(N,M)>0. (3.1)

For Discriminatory AI, since GAI(N,M)=1 , this condition is equivalent to FAI(N,M)>0 . Thus, equation (3.1) can be simplified to

M>N(TR+PS)2(RP)+1=Ncbc+1. (3.2)

For Samaritan AI, we numerically obtained the critical value of M beyond which cooperation is risk-dominant against defection, i.e. cooperation is at least 50%, see electronic supplementary material, figure S1. This increases with β ; when β is small, few AI agents are required to ensure risk-dominant cooperation. For example, with β0 , only one Samaritan AI agent is needed. When β is sufficiently large, a very high number of AI agents is needed for risk-dominant cooperation. In a population of N=100 human-like agents, β=1 needs at least M=58 AI agents, while when β=2 , at least M=233 AI agents are necessary (i.e. more than double the human population size).

In figure 2, we calculate the frequency of cooperation ΦC for a varying number of AIs and different values of the benefit of cooperation b for both Samaritan AI and Discriminatory AI and for different intensities of selection. The results show that, when β is small, Samaritan AI can lead to significantly higher levels of cooperation than Discriminatory AI, even with fewer AI agents. When β is high (third row), Discriminatory AI is better at promoting cooperation. This suggests that, in a slow-moving society where behaviour change or imitation is moderate, Samaritan AI agents that help everyone regardless of their behaviour, enhance cooperation between human-like agents. The presence of the Samaritan AIs enables more cooperation through increasing the chance that defectors meet a cooperator as a role model (the second term of T+ , see equation 2.4), which out-weights the payoff benefit provided by Discriminatory AIs (for cooperators versus defectors). On the other hand, in a fast-moving society, characterized by a high β , the payoff benefit enabled by Discriminatory AIs for cooperators is significantly magnified and thus outweighs the benefit of Samaritan AIs as role models.

Figure 2.

Unidentifiable AI: Samaritan AI promotes higher levels of cooperation than Discriminatory AI for weak intensities of selection, in contrast to stronger intensities of selection.

Unidentifiable AI: Samaritan AI promotes higher levels of cooperation than Discriminatory AI for weak intensities of selection, in contrast to stronger intensities of selection. We show the frequency of cooperation ( ΦC ) obtained for varying number of AIs, M , and benefit of cooperation, b , for Samaritan AI (a) and Discriminatory AI (b) in a population of N=100 human-like agents. Each row is associated to a different value of β:=βAI=βH . The red line splits the parameter space into two areas corresponding to whether the frequency of cooperation ( ΦC ) is smaller and greater than 0.5 (e.g. risk-dominant conditions). Parameters: c=1 . Figures explore b1.1 .

3.1.2. Identifiable AI

Let us consider the case where human-like agents can distinguish if their co-player is human or AI.

We observe that the formula for the Discriminatory AIs does not change, as pD,C(βAI)=pC,D(βAI)=0 (see the electronic supplementary material). This is due to human strategies being able only to change when encountering another human, as a Discriminatory AI agent always plays the same move as the human co-player. Thus, the results for Discriminatory AIs remain unchanged and in what follows, we will focus on the case of Samaritan AIs.

From figure 3 (also see electronic supplementary material, figure S2), we observe that a low βAI causes an overall increase in cooperation for the same values of βH as figure 2. Part of this overall increase is manifested in the appearance of a sustained band of cooperation at high βH and α where before there was no cooperation to be found. The mechanism behind this is being able to ignore the performance of the AIs which, being Samaritan, will be playing cooperating, a subpar strategy versus defecting. Thus, overlooking the AI’s losses when cooperating boosts their potential as role models and favours imitation when a rational approach would suggest otherwise.

Figure 3.

Identifiable AI: Low values

Identifiable AI: low values of βAI enhance cooperation (results shown for different values of βH , where we fix βAI=0 ; see electronic supplementary material, figure S1 for other values of βAI ). The frequency of cooperation ( ΦC ) is plotted for varying number of AIs, M , and benefit of cooperation, b , for Samaritan AI (a) and Discriminatory AI (b) in a population of N=100 human-like agents. Each row is associated to a different value of βH . The red line indicates the risk dominant condition. Parameters: c=1 . Figures explore b>1.1 .

3.2. Infinite population analysis

We work in the regime N and M/N+Mα ( α is the fraction of AI agents in the system), with payoffs (or β ) rescaled by the number of agents. Considering a time-unit corresponding to N steps of the dynamics, in the case of Samaritan AI the fraction of cooperators among human-like agents, i.e. x=k/N , evolves as follows:

x˙=(1x)[x(1α)pD,C(βH)+αpD,C(βAI)]x(1x)(1α)pC,D(βH)=(1x)[x(1α)(pD,C(βH)pC,D(βH))+αpD,C(βAI)]=(1x)[x(1α)tanh(βHΔf(x)2)+α1+eβAIΔf(x)]=:hSAM(x), (3.3)

where

Δf(x)SAM=ΠC(x)ΠD(x)=(RT)[(1α)x+α]+(SP)(1α)(1x) (3.4)

is the difference in payoffs, which is always negative in this case. That means, the temptation for defection is always higher than the one of cooperation. The system described by (3.3) has at least one fixed point at x*=1 , corresponding to full cooperation, whose stability depends on the system’s parameters.

For Discriminatory AI, the evolution equation reads

x˙=(1x)[x(1α)pD,C(βH)]x(1x)(1α)pC,D(βH)=(1x)x(1α)tanh(βHΔf(x)2)=:hDIS(x).

Notice that in this case there cannot be a change in the strategy for a human when interacting with an AI, as each AI always copies his current strategy. The AI presence enters only in the payoff difference, which reads

Δf(x)DIS=ΠC(x)ΠD(x)=(RT)(1α)x+(SP)(1α)(1x)+α(RP) (3.5)

and whose sign depends on the parameters and the fraction of cooperators. In order to obtain further analytical results, we focus on the donation game. Indeed, we calculate through (3.4) and (3.5) the differences in payoffs, respectively, for Samaritan and Discriminatory AIs and obtain

Δf(x)SAM,don=c (3.6)
Δf(x)DIS,don=αbc (3.7)

Interestingly, in both cases, the payoff difference is independent of the fraction of human cooperators x . Moreover, for Samaritan AI the benefit b does not play any role. These facts significantly simplify the evolution equations, which read

h(x)SAM,don=(1x)[x(1α)tanh(cβH2)+α1+ecβAI], (3.8)
h(x)DIS,don=(1x)x(1α)tanh(βH(αbc)2). (3.9)

Hence, x=0,1 are the only fixed points of h(x)DIS,don , and the stability of the points depends on the concavity or convexity of the function:

  • If αbc>0 , then h(x)DIS,don is concave and x*=1 is stable ( x*=0 unstable).

  • Conversely, if αbc<0 , then h(x)DIS,don is convex and x*=0 is stable ( x*=1 unstable).

Thus, if αbc>0 the system converges to full cooperation, and to full defection if otherwise. Notably, this result is equivalent to the risk-dominance condition obtained for the finite population analysis above (see equation 3.2), with N .

The full analytical study of h(x)SAM,𝒅𝒐𝒏 is more complicated, as the fixed points depend also on βH and βAI , and it is partly omitted. However, one can easily see that as well as x*=1 , another stable fixed point in (0,1) generally appears.

We can conclude that for a donation game, in the limit of infinite population, when αbc>0 Discriminatory AI agents always bring the system to full cooperation, while Samaritan AIs bring the system to a coexistence stable point. Conversely, when αbc<0 , Samaritan AIs always perform better than Discriminatory AIs. Restricting to the case βAI=βH:=β , one can see numerically (see figure 4) that in the Samaritan AI case the fixed point x(0,1) is stable and decreases with β (as the payoff difference is always negative), thus, the level of cooperation at the asymptotic state is inversely proportional to the intensity of selection.

Figure 4.

Evolution equations in the donation game with infinite population.

Evolution equations in the donation game with infinite population. For each colour, which represents different values of α in the left figure and β in the right figure, the solid lines represent h(x)SAM,don , while the dotted lines stand for h(x)DIS,don . For each combination of parameters, the fixed points x* of the evolution are at the intersections of the respective function with the horizontal black line f(x)=0,x[0,1] . Their stability is determined by the sign of the function at x*ϵ and x*+ϵ , ϵ<<1 . In both the figures, the parameters of the donation game’s matrix are set to b=6,c=2 . Moreover, βH=βAI=:β . In the left figure, β=0.5 (different values of α ). In the right figure, α=0.2 (different values of β ).

In addition, we observe that, when βAI , the only stable fixed point of the evolution in the Samaritan AI case (3.8) is x*=0 (full human defection), which was also observed in the finite population analysis above. Thus, for βAI , Discriminatory AI is always preferable. When βH , the only stable fixed point in the Samaritan AI case reads x=α/(1α)×1/(1+ecβAI) , provided that α0.5 .

4. Discussion

Our in-depth analysis has yielded noteworthy insights into the type of AI agents that can best promote the emergence of enhanced cooperation in a population of human-like agents, depending on the intensities of selection. Our findings suggest that the type of AI agents, be they Samaritan or Discriminatory, can profoundly shape cooperation dynamics. In the context of our study, this implies that the selection of certain types of AI agents can promote the development of cooperative behaviour among human-like agents, with effectiveness depending on the specific behaviours these AI agents exhibit. Thus, our research highlights the potential for carefully designed and deployed AI agents to encourage enhanced cooperation within human societies, providing a novel perspective on managing social dilemmas.

According to research on cooperative AI by Dafoe et al. [19] and Conitzer & Oesterheld [22], the cooperative equilibrium can be achieved through mechanisms that create a conditional commitment, communication or the ability to predict other players’ behaviour. For example, commitments can be implemented by repeated play [51,52], the costs of one’s reputation [5355], a contract or a physical constraint. Another method is to ‘change the game’, which can be achieved by the creation of institutions [5661]. These institutions are effective in facilitating collective cooperation, if they promote cooperative understanding, communication or commitments [62,63]. What all of these methods share, is the mutual identification of cooperating players, called positive associativity [64]. In the case of a one-shot game with no memory and no reputation mechanisms, positive associativity is not possible. The cooperative regime can be achieved nonetheless by way of rewarding altruists or punishing wrongdoers, the optional PD, where players can also opt out, punishing defectors, as well as the introduction of zealot players [27,65]. Note that there has been extensive modelling research investigating the roles of the above-mentioned mechanisms for promoting cooperation in non-hybrid populations (e.g. consisting of human-like agents) [1,6,66]. However, little attention has been given to the hybrid settings, thus omitting new issues that might emerge from the presence of AI agents and the new ways one can use to achieve pro-social behaviours [9,21,23,27,6770]. The purpose of having artificial agents that can socially interact with humans at an equal level is being able to play social games but with a completely different reward paradigm: whilst humans tend to maximize their own winnings, AI agents can be designed to disregard their own social loss in favour of promoting a higher goal.

Contrary to basic tenets of EGT, zealot players are a type of agent that does not imitate other players’ strategies but remains committed regardless of payoffs [71]. The mechanism that shifts the equilibrium of defectors towards cooperation with a certain number of zealous cooperators, is the increased probability of cooperative individuals to encounter other cooperators. This effect can be observed in both well-mixed and structured population settings [27,65]. In our model, Samaritan AIs aim to act as zealots and role models, encouraging social imitation of cooperative strategies. Their strength mostly lies in numbers as the diversity of their actions are limited by the moral standards in the system due to only enacting altruist strategies. Their effectiveness is inversely proportional to the intensity of selection: as cooperation is a losing strategy versus defection, a high intensity of selection increases the probability of not copying cooperative agents. Still, a sufficiently large number of Samaritan AI role models can increase the chances of being selected by imitation, overcoming some of the limitations of playing a losing strategy. On the other hand, Discriminatory AIs, who can change their strategy to punish defectors, find their strength in negating the temptation of higher rewards for any non-zero values of intensities of selection, possibly outperforming Samaritan AIs for stronger intensities of selection. More specifically, when βAI>>1 , Discriminatory AIs are systematically not better than Samaritan AIs in enhancing the emergence of cooperation.

Discriminatory AIs are also a relevant case to study as, in real-world scenarios, the punishment of defectors can be achieved by way of third-party punishment or altruistic punishment. According to [72], third-party punishment is directly related to the enforcement of norms that regulate human behaviour. If a first party, or defector, harms a second party, or cheated player, we can introduce a third party that is unaffected by the violation and who can impose a punishment on the norm-violating player. The action, however, is costly for the third party. For a rational agent, it would be illogical to engage in punishing the first party at a personal cost. In other words, the third-party punishment presents a dilemma of social cooperation [72]. Discriminatory AIs can be seen as a form of third-party punishment for the agents in our model. In order to enable this type of third-party punishment, Discriminator AI agents are equipped with the capability of intention or behaviour prediction of their human-like co-players, which can be realized using advanced AI techniques such as emotion, activity and intention recognition [34,41,44]. Our results show that at low intensities of selection, Discriminatory AIs do not push for cooperation as none of them will serve as a role model due to acting with the same strategy as their human co-player. On the other hand, their tit-for-tat-like strategy risks humans losing their perceived high rewards at higher intensities of selection, managing a cooperative regime where Samaritan AIs could not.

Even in a case where AI agents can be distinguished and recognized by the other human players, the different strategies promote cooperative steady states, depending mostly on the trust of human-like agents in their AI companions. If the intensity of selection is smaller when interacting with AIs, Samaritan AIs perform better than their indistinguishable counterpart as there are more role models where their losses can be disregarded in order to imitate, thus facilitating the change to cooperation. This change is not observed for distinguishable Discriminatory AIs as in this setting, human-like agents can only imitate amongst themselves due to AIs never playing a distinct strategy to their human-like co-player, thus disabling the effect of a distinguishable intensity of selection. This finding is useful for the design and implementation of context-dependent AI systems for enhanced prosocial behaviour, as it shows that a simple design (Samaritan AIs with a fixed behaviour) can outperform a complex one that requires advanced AI capabilities (i.e. Discriminatory AIs).

While our model offers useful insights into the role of AI agents in promoting human cooperation, it does have some limitations that could be addressed in future work. First, our model assumes that AI agents can accurately infer humans’ behaviour or intention, using advanced AI techniques such as intention, activity and emotion recognition [41,44,73,74]. Although such capabilities have been demonstrated with strong performance in both game theoretical and real-world scenarios, reaching perfect accuracy might not be possible. Future models could incorporate more realistic assumptions about the capabilities of AI, e.g. by using a probabilistic model of intention recognition [40,75]. We also consider using more advanced approaches such as meta-cognition that combines intention recognition and commitments: when recognition of a co-player’s intention is difficult or with low confidence, agents can arrange a prior commitment to help clarify the intention [7678]. This meta-cognition approach has been applied to evolutionary game models of one-shot Prisoner’s dilemma game [76] (thus readily transferable to our current model), and has also been experimentally analysed in behavioural experiments with human participants [77]. Second, our model focuses on a well-mixed network of interactions. In reality, social networks are heterogeneous and can evolve over time, with relationships forming and dissolving [79,80]. Future iterations of this model could benefit from incorporating the dynamism of real-world social networks, where the heterogeneity in the number of social relationships an agent has can become a significant factor as to where they are an effective role model or third-party punishers.

Another perspective our model can improve is in the modelling of human-like agents as our approach has neither memory nor reputation mechanisms, which has been proven to be important for cooperation in repeated and time-dependent systems. Yet, another direction is to capture specific preferences that humans might exhibit towards certain types of AI, thus influencing how they might imitate an (identifiable) AI agent differently. For example, empirical evidence shows that humans tend to trust and rely on AI algorithms more to solve difficult tasks [81]. In our model, such a preference was captured using two different intensities of selection—one for when imitating a human-like agent, and another for when imitating an AI agent ( βAI )—mainly because our analysis focuses on the impact of varying these intensities. It is noteworthy that, when the payoff difference between human-like and AI agents is negative, a larger βAI can be interpreted as a greater likability towards AI (i.e. higher probability of imitating an AI) and when this payoff difference is positive, as a greater disgust towards AI (i.e. lower probability of imitating an AI). Finally, our model focuses only on two typical behaviours of AI agents. The universe of AI strategies is vast, and different types of AI could have different impacts on human cooperation. Future research could expand the types of AI agents studied, perhaps investigating more nuanced AI strategies. By addressing these issues, we can enhance the accuracy of our model and provide even more robust insights into the role of AI in promoting human cooperation.

Overall, the findings from our theoretical analysis indicate that the inclusion of AI agents with specific strategies can significantly influence the level of cooperation in a simulated population of human-like agents. However, these results should be interpreted with caution, as simulated agents are unlikely to fully replicate human behaviour [66,82]. Future research should empirically test these theoretical predictions with human participants to better understand the interplay between AI and human cooperation, thereby informing further revision and improvement of the models (e.g. for making more accurate predictions) [83,84]. Indeed, to confirm the predictions made by our model, it would be crucial to execute large-scale behavioural experiments across various countries and cultures. The Samaritan and Discriminatory AI strategies we have discussed can be analysed in diverse social and cultural contexts to truly understand their effectiveness in promoting cooperation. Given that people exhibit different behavioural types [8587] influenced by their cultural background, personal beliefs, experiences and psychological traits, these variations need to be considered. AI agents should be designed to recognize these individual traits and adjust their behaviours accordingly. For instance, an AI agent might employ a more Samaritan strategy with individuals who respond well to cooperation, while taking a more Discriminatory approach with those who exhibit less cooperative behaviours. This personalized approach could enhance the ability of AI agents to promote cooperation across a broad spectrum of human behaviours, leading to more nuanced and effective AI–human interactions.

Even with these limitations, our model including a hybrid perspective of human–AI interactions is nuanced enough to provide a baseline benchmark in which to understand the phenomenology of these systems and how we could use them to enhance cooperation in real-life social systems.

Acknowledgements

This work is the output of the Complexity72h workshop, held at IFISC in Palma, Spain, 26–30 June 2023. https://www.complexity72h.com.

Contributor Information

Filippo Zimmaro, Email: filippo.zimmaro@phd.unipi.it.

Manuel Miranda, Email: mmiranda@ifisc.uib-csic.es.

José María Ramos Fernández, Email: alu0101100883@ull.edu.es.

Jesús A. Moreno López, Email: jeslop@ifisc.uib-csic.es.

Max Reddel, Email: max@reddel.ai.

Valeria Widler, Email: widler@zib.de.

Alberto Antonioni, Email: alberto.antonioni@uc3m.es.

The Anh Han, Email: T.Han@tees.ac.uk.

Ethics

This work did not require ethical approval from a human subject or animal welfare committee.

Data accessibility

The code for replicating the results is available at [88,89].

Supplementary material is available online [90].

Declaration of AI use

We have not used AI-assisted technologies in creating this article.

Authors’ contributions

F.Z.: formal analysis, investigation, methodology, software, validation, writing—original draft; M.M.: formal analysis, investigation, methodology, software, validation, writing—original draft; J.M.R.F.: investigation, software, validation, writing—original draft; J.A.M.L.: investigation, software, validation, writing—original draft; M.R.: investigation, writing—original draft; V.W.: investigation, writing—original draft; A.A.: conceptualization, investigation, validation, writing—original draft, writing—review and editing; T.A.H.: conceptualization, formal analysis, investigation, methodology, validation, writing—original draft, writing—review and editing.

All authors gave final approval for publication and agreed to be held accountable for the work performed therein.

Conflict of interest declaration

We declare we have no competing interests.

Funding

T.A.H. is supported by EPSRC (grant EP/Y00857X/1) and the Future of Life Institute. J.A.M.L.’s salary was funded by the Agencia Estatal de Investigación (AEI, MCI, Spain) MCIN/AEI/ 10.13039/501100011033 under grant FPI PRE2019-089734. Partial financial support for J.A.M.L. and M.M. has been received from the Agencia Estatal de Investigación (AEI, MCI, Spain) MCIN/AEI/ 10.13039/501100011033 and Fondo Europeo de Desarrollo Regional (FEDER, UE) under Project APASOS (PID2021-122256NB-C21/C22) and the María de Maeztu Program for units of Excellence in R&D, grant CEX2021-001164-M). M.M. and A.A. acknowledge support from Project OLGRA (PID2019-107603GB-I00) and grant no. IJC2019-040967-I funded by Spanish Ministry of Science and Innovation.

References

  • 1. Perc M, Jordan JJ, Rand DG, Wang Z, Boccaletti S, Szolnoki A. 2017. Statistical physics of human cooperation. Phys. Rep. 687 , 1–51. ( 10.1016/j.physrep.2017.05.004) [DOI] [Google Scholar]
  • 2. Stella M, Ferrara E, De Domenico M. 2018. Bots increase exposure to negative and inflammatory content in online social systems. Proc. Natl Acad. Sci. USA 115 , 12 435–12 440. ( 10.1073/pnas.1803470115) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3. Albert R, Barabási AL. 2002. Statistical mechanics of complex networks. Rev. Mod. Phys. 74 , 47–97. ( 10.1103/RevModPhys.74.47) [DOI] [Google Scholar]
  • 4. Santos FC, Pacheco JM. 2006. A new route to the evolution of cooperation. J. Evol. Biol. 19 , 726–733. ( 10.1111/j.1420-9101.2005.01063.x) [DOI] [PubMed] [Google Scholar]
  • 5. Dasgupta N, Musolesi M. 2023. Investigating the impact of direct punishment on the emergence of cooperation in multi-agent reinforcement learning systems. arXiv. ( 10.48550/arXiv.2301.08278) [DOI]
  • 6. Nowak MA. 2006. Evolutionary dynamics: exploring the equations of life. Cambridge, MA: Harvard University Press. [Google Scholar]
  • 7. Sigmund K. 2010. The calculus of selfishness. Princeton, NJ: Princeton University Press. ( 10.1515/9781400832255) [DOI] [Google Scholar]
  • 8. Brinkmann L, et al. 2023. Machine culture. Nat. Hum. Behav. 7 , 1855–1868. ( 10.1038/s41562-023-01742-2) [DOI] [PubMed] [Google Scholar]
  • 9. Rahwan I, et al. 2019. Machine behaviour. Nature 568 , 477–486. ( 10.1038/s41586-019-1138-y) [DOI] [PubMed] [Google Scholar]
  • 10. Andras P, et al. 2018. Trusting intelligent machines: deepening trust within socio-technical systems. IEEE Technol. Soc. Mag. 37 , 76–83. ( 10.1109/MTS.2018.2876107) [DOI] [Google Scholar]
  • 11. Guo H, Shen C, Hu S, Xing J, Tao P, Shi Y, Wang Z. 2023. Facilitating cooperation in human-agent hybrid populations through autonomous agents. Iscience 26 , 108179. ( 10.1016/j.isci.2023.108179) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12. Santos FP. 2024. Prosocial dynamics in multiagent systems. AI Mag. 45 , 131–138. ( 10.1002/aaai.12143) [DOI] [Google Scholar]
  • 13. Grossmann I, Feinberg M, Parker DC, Christakis NA, Tetlock PE, Cunningham WA. 2023. AI and the transformation of social science research. Science 380 , 1108–1109. ( 10.1126/science.adi1778) [DOI] [PubMed] [Google Scholar]
  • 14. Cimpeanu T, Stewart AJ. 2023. Fairness and deception in human interactions with artificial agents. arXiv. ( 10.48550/arXiv.2312.03645) [DOI]
  • 15. Capraro V, et al. 2023. The impact of generative artificial intelligence on socioeconomic inequalities and policy making. arXiv. ( 10.31234/osf.io/6fd2y) [DOI] [PMC free article] [PubMed]
  • 16. Fernández Domingos E, Terrucha I, Suchon R, Grujić J, Burguillo JC, Santos FC, Lenaerts T. 2022. Delegation to artificial agents fosters prosocial behaviors in the collective risk dilemma. Sci. Rep. 12 , 8492. ( 10.1038/s41598-022-11518-9) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 17. Guess A, Nagler J, Tucker J. 2019. Less than you think: prevalence and predictors of fake news dissemination on Facebook. Sci. Adv. 5 , eaau4586. ( 10.1126/sciadv.aau4586) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18. Powers ST, et al. 2023. The stuff we swim in: regulation alone will not lead to justifiable trust in AI. IEEE Technol. Soc. Mag. 42 , 95–106. ( 10.1109/MTS.2023.3341463) [DOI] [Google Scholar]
  • 19. Dafoe A, Hughes E, Bachrach Y, Collins T, McKee KR, Leibo JZ, Larson K, Graepel T. 2020. Open problems in cooperative AI. arXiv. ( 10.48550/arXiv.2012.08630) [DOI]
  • 20. Guo T, He Z, Shen C, Shi L, Tanimoto J. 2024. Engineering optimal cooperation levels with prosocial autonomous agents in hybrid human-agent populations: an agent-based modeling approach. Comput. Econ. 1–15. ( 10.1007/s10614-024-10559-8) [DOI] [Google Scholar]
  • 21. Paiva A, Santos F, Santos F. 2018. Engineering pro-sociality with autonomous agents. In Proc. of the AAAI Conf. on Artificial Intelligence. vol. 32 . ( 10.1609/aaai.v32i1.12215) [DOI] [Google Scholar]
  • 22. Conitzer V, Oesterheld C. 2023. Foundations of cooperative AI. In Proc. of the AAAI Conf. on Artificial Intelligence, vol. 37 , pp. 15 359–15 367, ( 10.1609/aaai.v37i13.26791) [DOI] [Google Scholar]
  • 23. Santos FP, Pacheco JM, Paiva A, Santos FC. 2019. Evolution of collective fairness in hybrid populations of humans and agents. In Proc. of the AAAI Conf. on Artificial Intelligence, vol. 33 , pp. 6146–6153, ( 10.1609/aaai.v33i01.33016146) [DOI] [Google Scholar]
  • 24. Han TA. 2022. Emergent behaviours in multi-agent systems with evolutionary game theory. AI Comm. 35 , 327–337. ( 10.3233/AIC-220104) [DOI] [Google Scholar]
  • 25. Capraro V, Di Paolo R, Perc M, Pizziol V. 2024. Language-based game theory in the age of artificial intelligence. J. R. Soc. Interface 21 , 20230720. ( 10.1098/rsif.2023.0720) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26. Shen C, He Z, Shi L, Wang Z, Tanimoto J. 2024. Prosocial punishment bots breed social punishment in human players. J. R. Soc. Interface 21 , 20240019. ( 10.1098/rsif.2024.0019) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27. Sharma G, Guo H, Shen C, Tanimoto J. 2023. Small bots, big impact: solving the conundrum of cooperation in optional Prisoner’s Dilemma game through simple strategies. J. R. Soc. Interface 20 , 20230301. ( 10.1098/rsif.2023.0301) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28. Nag Chowdhury S, Banerjee J, Perc M, Ghosh D. 2023. Eco-evolutionary cyclic dominance among predators, prey, and parasites. J. Theor. Biol. 564 , 111446. ( 10.1016/j.jtbi.2023.111446) [DOI] [PubMed] [Google Scholar]
  • 29. Nag Chowdhury S, Kundu S, Duh M, Perc M, Ghosh D. 2020. Cooperation on interdependent networks by means of migration and stochastic imitation. Entropy 22 , 485. ( 10.3390/e22040485) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30. Nag Chowdhury S, Kundu S, Perc M, Ghosh D. 2021. Complex evolutionary dynamics due to punishment and free space in ecological multigames. Proc. R. Soc. A 477 , 20210397. ( 10.1098/rspa.2021.0397) [DOI] [Google Scholar]
  • 31. Nag Chowdhury S, Ray A, Mishra A, Ghosh D. 2021. Extreme events in globally coupled chaotic maps. J. Phys. Complex 2 , 035021. ( 10.1088/2632-072X/ac221f) [DOI] [Google Scholar]
  • 32. Tuyls K, Parsons S. 2007. What evolutionary game theory tells us about multiagent learning. Artif. Intell. 171 , 406–416. ( 10.1016/j.artint.2007.01.004) [DOI] [Google Scholar]
  • 33. Traulsen A, Glynatsi NE. 2023. The future of theoretical evolutionary game theory. Phil. Trans. R. Soc. B 378 , 20210508. ( 10.1098/rstb.2021.0508) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34. Han TA. 2013. Intention recognition, commitments and their roles in the evolution of cooperation: from artificial intelligence techniques to evolutionary game theory models. vol. 9. Berlin, Germany: Springer SAPERE series. ( 10.1007/978-3-642-37512-5) [DOI] [Google Scholar]
  • 35. Xianyu B. 2012. Prisoner’s dilemma game on complex networks with agents’ adaptive expectations. J. Artif. Soc. Soc. Simul. 15 , 3. ( 10.18564/jasss.2009) [DOI] [Google Scholar]
  • 36. Coombs CH. 1973. A reparameterization of the prisoner’s dilemma game. Behav. Sci. 18 , 424–428. ( 10.1002/bs.3830180605) [DOI] [Google Scholar]
  • 37. Nag Chowdhury S, Kundu S, Banerjee J, Perc M, Ghosh D. 2021. Eco-evolutionary dynamics of cooperation in the presence of policing. J. Theor. Biol. 518 , 110606. ( 10.1016/j.jtbi.2021.110606) [DOI] [PubMed] [Google Scholar]
  • 38. Hofbauer J, Sigmund K. 1998. Evolutionary games and population dynamics. Cambridge, UK: Cambridge University Press. ( 10.1017/CBO9781139173179) [DOI] [Google Scholar]
  • 39. Maynard-Smith J. 1982. Evolution and the theory of games. Cambridge, UK: Cambridge University Press. [Google Scholar]
  • 40. Han TA, Pereira LM, Santos FC. 2012. Corpus-based intention recognition in cooperation dilemmas. Artif. Life 18 , 365–383. ( 10.1162/ARTL_a_00072) [DOI] [PubMed] [Google Scholar]
  • 41. Sukthankar G, Geib C, Bui HH, Pynadath D, Goldman RP. 2014. Plan, activity, and intent recognition: theory and practice. Oxford, UK: Newnes. [Google Scholar]
  • 42. Tarnowski P, Kołodziej M, Majkowski A, Rak RJ. 2017. Emotion recognition using facial expressions. Procedia Comput. Sci. 108 , 1175–1184. ( 10.1016/j.procs.2017.05.025) [DOI] [Google Scholar]
  • 43. Kas J, Corten R, van de Rijt A. 2022. The role of reputation systems in digital discrimination. Socio. Econ. Rev. 20 , 1905–1932. ( 10.1093/ser/mwab012) [DOI] [Google Scholar]
  • 44. Chowdary MK, Nguyen TN, Hemanth DJ. 2023. Deep learning-based facial emotion recognition for human–computer interaction applications. Neural Comput. Appl. 35 , 23311–23328. ( 10.1007/s00521-021-06012-8) [DOI] [Google Scholar]
  • 45. Kosinski M. 2023. Theory of mind may have spontaneously emerged in large language models. arXiv. ( 10.48550/arXiv.2302.02083) [DOI]
  • 46. Zhou P, et al. 2023. How far are large language models from agents with theory-of-mind? arXiv. ( 10.48550/arXiv.2310.03051) [DOI]
  • 47. Traulsen A, Nowak MA, Pacheco JM. 2006. Stochastic dynamics of invasion and fixation. Phys. Rev. E 74 , 11909. ( 10.1103/PhysRevE.74.011909) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 48. Nowak MA, Sasaki A, Taylor C, Fudenberg D. 2004. Emergence of cooperation and evolutionary stability in finite populations. Nature 428 , 646–650. ( 10.1038/nature02414) [DOI] [PubMed] [Google Scholar]
  • 49. Imhof LA, Fudenberg D, Nowak MA. 2005. Evolutionary cycles of cooperation and defection. Proc. Natl Acad. Sci. USA 102 , 10 797–10 800. ( 10.1073/pnas.0502589102) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50. Han TA, Tran-Thanh L. 2018. Cost-effective external interference for promoting the evolution of cooperation. Sci. Rep. 8 , 15997. ( 10.1038/s41598-018-34435-2) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 51. Martinez-Vaquero LA, Han TA, Pereira LM, Lenaerts T. 2015. Apology and forgiveness evolve to resolve failures in cooperative agreements. Sci. Rep. 5 , 10639. ( 10.1038/srep10639) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 52. Han TA, Pereira LM, Lenaerts T. 2017. Evolution of commitment and level of participation in public goods games. Auton. Agents Multi-Agent Syst. 31 , 561–583. ( 10.1007/s10458-016-9338-4) [DOI] [Google Scholar]
  • 53. Nesse RM. 2001. Evolution and the capacity for commitment. New York, NY: Foundation series on trust (Russell Sage). [Google Scholar]
  • 54. Okada I. 2020. Two ways to overcome the three social dilemmas of indirect reciprocity. Sci. Rep. 10 , 16799. ( 10.1038/s41598-020-73564-5) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 55. Perret C, Krellner M, Han TA. 2021. The evolution of moral rules in a model of indirect reciprocity with private assessment. Sci. Rep. 11 , 23581. ( 10.1038/s41598-021-02677-2) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56. Sigmund K, De Silva H, Traulsen A, Hauert C. 2010. Social learning promotes institutions for governing the commons. Nature 466 , 861–863. ( 10.1038/nature09203) [DOI] [PubMed] [Google Scholar]
  • 57. Liu L, Chen X. 2022. Effects of interconnections among corruption, institutional punishment, and economic factors on the evolution of cooperation. Appl. Math. Comput. 425 , 127069. ( 10.1016/j.amc.2022.127069) [DOI] [Google Scholar]
  • 58. Chen X, Sasaki T, Brännström Å, Dieckmann U. 2015. First carrot, then stick: how the adaptive hybridization of incentives promotes cooperation. J. R. Soc. Interface 12 , 20140935. ( 10.1098/rsif.2014.0935) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 59. Góis AR, Santos FP, Pacheco JM, Santos FC. 2019. Reward and punishment in climate change dilemmas. Sci. Rep. 9 , 16193. ( 10.1038/s41598-019-52524-8) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 60. Duong MH, Han TA. 2021. Cost efficiency of institutional incentives for promoting cooperation in finite populations. Proc. R. Soc. A 477 , 20210568. ( 10.1098/rspa.2021.0568) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 61. Han TA, Pereira LM, Lenaerts T. 2015. Avoiding or restricting defectors in public goods games? J. R. Soc. Interface 12 , 20141203. ( 10.1098/rsif.2014.1203) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 62. Sasaki T, Okada I, Uchida S, Chen X. 2015. Commitment to cooperation and peer punishment: its evolution. Games 6 , 574–587. ( 10.3390/g6040574) [DOI] [Google Scholar]
  • 63. Han TA. 2022. Institutional incentives for the evolution of committed cooperation: ensuring participation is as important as enhancing compliance. J. R. Soc. Interface 19 , 20220036. ( 10.1098/rsif.2022.0036) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 64. Pepper JW, Smuts BB. 2002. A mechanism for the evolution of altruism among nonkin: positive assortment through environmental feedback. Am. Nat. 160 , 205–213. ( 10.1086/341018) [DOI] [PubMed] [Google Scholar]
  • 65. Shen C, Guo H, Hu S, Shi L, Wang Z, Tanimoto J. 2023. How committed individuals shape social dynamics: a survey on coordination games and social dilemma games. Europhys. Lett. 144 , 11002. ( 10.1209/0295-5075/acfb34) [DOI] [Google Scholar]
  • 66. Rand DG, Nowak MA. 2013. Human cooperation. Trends Cogn. Sci. 17 , 413–425. ( 10.1016/j.tics.2013.06.003) [DOI] [PubMed] [Google Scholar]
  • 67. Kovařík V, Oesterheld C, Conitzer V. 2023. Game theory with simulation of other players. arXiv ( 10.24963/ijcai.2023/312) [DOI] [Google Scholar]
  • 68. Hidalgo CA, Orghian D, Canals JA, de Almeida F, Martin N. 2021. How humans judge machines. Cambridge, MA: MIT Press. ( 10.7551/mitpress/13373.001.0001) [DOI] [Google Scholar]
  • 69. Cimpeanu T, Santos FC, Pereira LM, Lenaerts T, Han TA. 2022. Artificial intelligence development races in heterogeneous settings. Sci. Rep. 12 , 1723. ( 10.1038/s41598-022-05729-3) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 70. Terrucha I, Fernández Domingos E, Simoens P, Lenaerts T. 2024. Committing to the wrong artificial delegate in a collective-risk dilemma is better than directly committing mistakes. Sci. Rep. 14 , 10460. ( 10.1038/s41598-024-61153-9) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 71. Nakajima Y, Masuda N. 2015. Evolutionary dynamics in finite populations with zealots. J. Math. Biol. 70 , 465–484. ( 10.1007/s00285-014-0770-2) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 72. Fehr E, Fischbacher U. 2004. Third-party punishment and social norms. Evol. Hum. Behav. 25 , 63–87. ( 10.1016/S1090-5138(04)00005-4) [DOI] [Google Scholar]
  • 73. Di Stefano A, Jayne C, Angione C, Han TA. 2023. Recognition of behavioural intention in repeated games using machine learning in ALIFE 2023: ghost in the machine. In The 2023 Conf. on Artificial Life. Cambridge, MA: MIT Press. ( 10.1162/isal_a_00637) [DOI] [Google Scholar]
  • 74. Gu F, Chung MH, Chignell M, Valaee S, Zhou B, Liu X. 2022. A survey on deep learning for human activity recognition. ACM Comput. Surv. 54 , 1–34. ( 10.1145/3472290) [DOI] [Google Scholar]
  • 75. Geib CW, Goldman RP. 2009. A probabilistic plan recognition algorithm based on plan tree grammars. Artif. Intell. 173 , 1101–1132. ( 10.1016/j.artint.2009.01.003) [DOI] [Google Scholar]
  • 76. Han TA, Santos FC, Lenaerts T, Pereira LM. 2015. Synergy between intention recognition and commitments in cooperation dilemmas. Sci. Rep. 5 , 9312. ( 10.1038/srep09312) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 77. Kapetaniou GE, Deroy O, Soutschek A. 2023. Social metacognition drives willingness to commit. J. Exp. Psychol. Gen. 152 , 2735–2746. ( 10.1037/xge0001419) [DOI] [PubMed] [Google Scholar]
  • 78. Flores LS, Han TA. 2024. Evolution of commitment in the spatial public goods game through institutional incentives. Appl. Math. Comput. 473 , 128646. ( 10.1016/j.amc.2024.128646) [DOI] [Google Scholar]
  • 79. Szabó G, Fáth G. 2007. Evolutionary games on graphs. Phys. Rep. 446 , 97–216. ( 10.1016/j.physrep.2007.04.004) [DOI] [Google Scholar]
  • 80. Barabasi AL. 2014. Linked: how everything is connected to everything else and what it means for business, science, and everyday life. New York, NY: Perseus Books Group. [Google Scholar]
  • 81. Bogert E, Schecter A, Watson RT. 2021. Humans rely more on algorithms than social influence as a task becomes more difficult. Sci. Rep. 11 , 8028. ( 10.1038/s41598-021-87480-9) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 82. Frank RH, Gilovich T, Regan DT. 1993. Does studying economics inhibit cooperation? J. Econ. Perspect. 7 , 159–171. ( 10.1257/jep.7.2.159) [DOI] [Google Scholar]
  • 83. Zisis I, Di Guida S, Han TA, Kirchsteiger G, Lenaerts T. 2015. Generosity motivated by acceptance - evolutionary analysis of an anticipation game. Sci. Rep. 5 , 18076. ( 10.1038/srep18076) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 84. Rand DG, Tarnita CE, Ohtsuki H, Nowak MA. 2013. Evolution of fairness in the one-shot anonymous ultimatum game. Proc. Natl Acad. Sci. USA 110 , 2581–2586. ( 10.1073/pnas.1214167110) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 85. Kurzban R, Houser D. 2005. Experiments investigating cooperative types in humans: a complement to evolutionary theory and simulations. Proc. Natl Acad. Sci. USA 102 , 1803–1807. ( 10.1073/pnas.0408759102) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 86. Balietti S, Klein B, Riedl C. 2021. Optimal design of experiments to identify latent behavioral types. Exp. Econ. 24 , 772–799. ( 10.1007/s10683-020-09680-w) [DOI] [Google Scholar]
  • 87. Szekely A, Lipari F, Antonioni A, Paolucci M, Sánchez A, Tummolini L, Andrighetto G. 2021. Evidence from a long-term experiment that collective risks change social norms and promote cooperation. Nat. Commun. 12 , 5452. ( 10.1038/s41467-021-25734-w) [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 88. Moreno López JA, Fernández JMR, Zimmaro F, Miranda M. 2024. Emergence-of-cooperation-in-the-one-shot-prisoner-s-dilemma-through-discriminatory-and-Samaritan AIs. GitHub. See https://gitlab.ifisc.uib-csic.es/ jeslop/EoCosPDAIs/. [DOI] [PMC free article] [PubMed]
  • 89. Moreno López JA, Fernández JMR, Zimmaro F, Miranda M. 2024. Emergence-of-cooperation-in-the-one-shot-prisoner-s-dilemma-through-discriminatory-and-Samaritan AIs. Zenodo. https://zenodo.org/records/12705122 [DOI] [PMC free article] [PubMed]
  • 90. Zimmaro F, Miranda M, Fernández JMR, López M, Arturo J, Reddel M, Widler V, Antonioni A, Han TA. 2024. Data from: Emergence of cooperation in the one-shot Prisoner’s dilemma through Discriminatory and Samaritan AIs. Figshare. ( 10.6084/m9.figshare.c.7408351) [DOI] [PMC free article] [PubMed]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The code for replicating the results is available at [88,89].

Supplementary material is available online [90].


Articles from Journal of the Royal Society Interface are provided here courtesy of The Royal Society

RESOURCES