1 Introduction

Before engaging in a group venture individuals often secure prior commitments from other members of the group, and based on the level of participation (i.e. how many group members commit) they can then decide whether it is worthwhile joining the group effort [4, 39, 58]. Many group ventures can be launched only when the majority of the participants commit to contribute to a common good [9, 10]. A cooperative hunting effort (both in animals, such as lions and some birds, and in humans) usually requires a sufficient number of participants “on board” to embark [2, 57]. While some international agreements require ratification by all parties before entering into force, most (especially global treaties) require a minimum less than the total number of negotiating countries [4, 10]. In group or coalition formation in multi-agent systems, a sufficient number of participants needs to agree on the terms of the agreement for it to be binding [29, 47]. In general, it appears that the required participation level depends on the nature of the problem in place. Here we investigate analytically and numerically whether commitment strategies, in which players propose, initiate and honor a deal, evolve as viable strategies for the evolution of cooperative behavior in the public goods game (PGG), while at the same time analyzing the effect of the participation level and the transition from a single to multiple-rounds version of the game.

In a typical PGG, all players can choose whether to cooperate, contributing an amount c to the public good, or to defect, taking advantage of the public good without contributing to it [31, 54]. The total contribution is multiplied by a constant factor, \(r > 1\), and is distributed equally among all players. A group of cooperators hence do better than a group of defectors, but defectors always have a better payoff in their group. Only when r is smaller than the group size (denoted by N), does the PGG represent a social dilemma, i.e. every individual player is better off defecting than cooperating, no matter what the other players do, although in this case it is the worst possible outcome for the group [30]. Evolutionary game theory (EGT) models [32, 54] predict the destruction of cooperation—famously known as ‘the tragedy of commons’ [27].

In our commitment extension to the PGG, agents have, before playing the PGG, the option to propose other members in the group to commit to contribute, where the proposers pay a personal cost \(\epsilon \), to make it credible. If a sufficient number of the members commit (participation level F), the PGG is played. Otherwise, the commitment proposers refuse to play. Those who committed but then do not contribute have to compensate others at a personal cost, \(\delta \). Further details of the game are provided in Sect. 3.

In the two-player setting (namely, the Prisoner’s Dilemma) the behavior of proposing prior commitments has been shown to promote the evolution of cooperation if the cost of arranging commitment \(\epsilon \) is sufficiently small compared to the cost of cooperation [19, 23, 25]. But when larger groups of actors are involved, decision-making becomes much more complex [11, 12, 15, 26, 70]. Instead of a clear, full commitment or, no-commitment, from the co-player as in the two-player game, when moving to the multi-player decision scenario of the PGG, there can be several possible intermediate degrees of participation (as many as the size of the group, i.e. N). It is not clear which minimal participation level would evolve in a the population given the settings of the PGG.

To answer this question, we will distinguish N different participation levels for the one-shot PGG, encoded in terms of commitment-proposing strategies, \( COMP_F \) where \(F \in \{1,\ldots ,N\}\). \( COMP_F \) contributes c to the public good when there are at least F players in the group (including herself) that agree or commit to contribute; otherwise, the strategy refuses to play. Examples for such a minimum membership requirement can be found in the creation of treaties that address international environmental issues [4, 10]Footnote 1 or the formation of coalitions in multi-agent systems [52, 53]. These new strategies allow us to investigate how the severity of the game (defined by \(r<N\), where lower r values correspond to a tougher PGG) and the parameters of the commitment system (\(\epsilon \) and \(\delta \)) influence the required participation level. Second, we examine how strict, in case the PGG is repeated for multiple rounds R, these \( COMP_F \) players should be when they notice that among those that committed to contribute, some of them did not honor the deal: should they immediately claim the compensation or might it be worthwhile to be lenient and continue the game? In that case how lenient should an agent be? Again we determine here how the three parameters, r, \(\epsilon \) and \(\delta \), affect the answers to these questions.

The remainder of this article is structured as follows. In Sect. 2 we highlight the research, both analytical and experimental, that are most closely related to our work. In Sect. 3 the game structure is discussed in more detail and the EGT methods used to obtain the results are explained. Section 4 is divided into three parts. First, a mathematical analysis is performed to determine under which conditions the \( COMP_F \) strategies are evolutionarily viable. Second, results are provided that show what the required participation level in an agreement should be for cooperation to thrive. Third, the results for multiple-round PGGs are presented. Finally, a discussion of all the presented results and conclusions are provided in Sect. 5.

2 Related work

The problem of explaining the emergence of collective behavior has been studied extensively from a wide range of research fields, including Anthropology, Sociology, Economics, Evolutionary Biology, Psychology, and, more recently, Artificial Intelligence (AI) and Multi-agent Systems (MAS) [1, 3, 16, 17, 20, 22, 24, 29, 33, 37, 41, 46, 50, 54, 69, 71]. The PGG is a standard framework to study this problem, as it captures the tension between the benefit of mutual cooperation and the temptation to exploit the efforts of others in a joint venture [13, 31, 43, 49, 56, 70]. Several mechanisms have been proposed that promote the evolution of cooperation within the context of the PGG [41, 54, 71], including (but not limited to) kin and group selection [67, 71], reputation and repeated interactions, networked reciprocity [44, 49, 60], and punishment/reward [31, 55, 6062]. In this work, we study whether the behavior of proposing prior agreements regarding posterior compensations can resolve the tension observed within the PGG, without taking into account relatedness, reputation, structured populations or repeated interaction effects. The focus on strategies capable of creating agreements makes this work more closely linked with evolution of minimal cognitive capabilities. We studied such strategies before in the context of pair-wise interactions [16, 22, 23, 25]. Yet, when moving from pair-wise to group interactions, the outcome is more complex since there are more possible participation levels commitment proposers can insist on. These levels play a crucial role regarding the effectiveness of the mechanism, which cannot be seen in the pair-wise interaction setting.

We recently performed a first analysis of commitments in a group interaction setting [19], analyzing commitment strategies that follow two different approaches when facing non-committers, i.e. those who do not agree to contribute. Prior work showed that these defectors can be persistent at higher initiation costs. Because PGG is by definition non-exclusive, it may be costly to prevent the non-committing players from enjoying the public goods without external measures [38]. The article compared two different strategies: (i) AVOID, which specifies that the player does not participate in the creation of the common good whenever there are non-committers; (ii) RESTRICT, which has the capacity to impose boundaries (at a cost) on the common good so that only those that have committed to make it work have (better) access or that the benefit non-contributors can acquire is reduced. The analysis reveals that RESTRICT, rather than AVOID, leads to more favorable societal outcomes, in terms of contribution levels, especially when the group size and/or the benefit of the PGG increase. The AVOID strategy is equivalent to one of the strategies we investigate here: \(\textit{COMP}_F\) with the participation level F being equal to the size of the group (\(F = N\)). The present work investigates participation levels smaller than the group size, focussing on how varying F affects the cooperation in the population and which level is evolutionarily preferred. The current work complements the prior publication, describing a novel, alternative approach to cooperation enhancement in the PGG, as costly restriction measures may not always be possible and they may take additional effort and time to implement [43]. Furthermore, the newly defined participation level factor allows us to extend the definition of commitment from the one-shot PGG to its iterated version. That enables us, for the first time, to show how agents would behave given the length of a commitment deal; for instance, should they be more or less strict in terms of the participation level from the co-players?

The research addressed in this article is directly related to the results produced by Van Segbroeck et al. [70] where a N-person direct reciprocity mechanism was analyzed in the context of a repeated PGG. The authors considered strategies that cooperate only if the number of group members that cooperated in the previous round reaches a certain threshold. Although these threshold strategies resemble the conditional commitment proposers as defined in our model, they are different in the same manner that our work differs from punishment or reward strategies traditionally studied in the context of the evolution of cooperation: The N-player direct reciprocity strategies are reactive in the sense that they respond immediately to the previous behavior of the opponents [8, 55]. Differently, our commitment strategies with participation conditions strategically decide on how to behave before the actual game is played. As a consequence, these strategies can be investigated even in the context of the extended one-shot PGG.

Several behavioral economic experiments on commitments in PGGs have been performed, and our results are in close accordance with the outcome of these experiments [9, 10]. For example, high levels of cooperation were observed in a PGG experiment where a binding agreement, which was enabled through a prior communication stage among the members of the group, could be arranged before the PGG interaction occurred [9]. The experiment also showed that whenever a commitment deal is not binding or not enforced, corresponding to a low compensation cost in our commitment model, defectors are widespread and the contribution level is low. The main difference with this experimental setting is that players, once they agreed to commit, still have the possibility to defect (even when they then have to pay a compensation); while in the experiment, any participant that agrees to contribute is enforced to do so. Hence, the experiments do not reveal the effect of varying the compensation cost, which as we also show here, is a major factor in a commitment system. Our work reveals that, whenever the compensation reaches a certain threshold, increasing it does not lead to further improvement (in terms of cooperation levels). It implies that, when designing laws (whether in real life or in a self-organizing MAS), it is not necessary to have an infinitely large compensation or sanction against law breakers; a sufficient, predefined, one is enough for a wide range of situations.

Another commitment experiment [10] takes the form of a deposit and refund scheme [50]: In this scheme, players that agree to commit have to deposit an amount which will be refunded only if they honor the commitment and contribute to the common good. The main difference with our analysis is that the agreement is set up exogenously by a third party instead of being implemented as a strategic behavior (i.e. it is not an option to propose a commitment in the experiment). Nonetheless, the outcome of the experiment revealed that whenever the deposit amount, corresponding to the compensation cost in our model, is sufficiently high, the contribution level is significant [10]. But again, they considered only one value of the compensation cost, preventing us to compare the effects of varying this essential feature. Furthermore, it is worth noting that in both these experiments [9, 10], the cost of setting up the commitment is always set to 0, thereby leading to effortless and effective commitment strategies. But as we will show, this cost is the decisive factor for the viability of commitment strategies as well as the emerging participation level. In short, the current paper suggests that further experiments are required to explore the effects of varying the essential parameters driving commitments in group interactions, including the costs of arranging commitment and of compensation.

Last but not least, there is a large literature on commitments in AI and MAS [6, 7, 28, 51, 72, 74]. These works focus on how to use commitment for regulating individual and collective behaviors. They study how to formalize commitments and their different aspects, such as norms and conventions, in a MAS. Our work hence provides insights into the design of such self-organizing MAS when dealing with group interactions. For instance, what are the appropriate actual degrees of commitment one should require from group members leading to highest levels of cooperation. In a similar manner, our research may also have important implications for the work on group and coalition formation [52, 53], where a decision on such a formation naturally depends on the number of agents agreeing with the terms of the formation [29, 47, 59]. In turn, as these AI and MAS works focus more on the formalization of more complex decision making aspects, such as in arranging an agreement, they provide us with more sophisticated extensions to our current commitment-organising mechanisms. For instance, in [29] the authors formalize commitment as a device to incentivise other players in a structured population to form coalitions within which they can enjoy mutual cooperation. Agents play an iterated Prisoner’s Dilemma game with their neighbors and offer commitments to their wealthiest neighbors in order to form coalitions. The commitment mechanism is implemented similar to our model [22, 23]. The authors analyze the conditions regarding network structure and payoff configurations under which an optimal coalition is achieved, with highest levels of cooperation.

In [28, 51], different forms of complex commitments are described, such as commitments conditional on other players’ commitments and actions. The players do not act or commit simultaneously and it is strategically important to take into account the order of making a commitment. In the current PGG framework, commitments are made simultaneously and agents are not aware of each others’ commitments (at least the non-proposing ones). It might be interesting to relax this requirement in future work. More complex approaches to designing a commitment or agreement deal are also extensively studied in coalition formation [47, 52, 53], especially when the terms of an agreement must be negotiated by the coalition members before being enacted.

3 Models and methods

3.1 Commitment in public goods games

As already discussed in the introduction we examine here the evolution of commitment strategies in the context of the PGG. A commitment strategy is defined as follows (see also Fig. 1): Before playing the PGG, the agent or player proposes other members in the group to commit to contribute c, paying a personal cost \(\epsilon \), corresponding to the cost of establishing the agreement. When a sufficient number of the participants commit, the PGG is played. Otherwise, a commitment proposer refuses to play the PGG. Those who committed but then do not contribute, i.e. they defect, have to compensate others at a personal cost, \(\delta \). Yet, how many participants have to commit so that the PGG is played? And how will the parameterisation of the extended PGG influence the level of participation requested by the commitment proposers?

Fig. 1
figure 1

Structure of the PGG with commitments. When there are no proposers among the N players, the original PGG is played (node 5). When there are proposers \( COMP_F \) (node 2), there need to be a sufficient number of acceptors (including the proposers themselves) (node 3), otherwise the game is not played and everyone obtains 0 payoff (node 4). In the former case, the PGG is played but proposers pay the setup cost \(\epsilon \) and those that defect in the PGG (whether they are proposers or acceptors) will have to pay a compensation \(\delta \)

With a fixed group size N, there are N possible participation levels (i.e. how many players in the group agree to contribute, including the proposer), where we identify this participation by \(F \in \{1,\ldots ,N\}\). We hence denote by \( COMP_F \) the corresponding commitment proposing strategy that contributes c if there are at least F players (including herself) in the group that agree to contribute; otherwise, the strategy refuses to play, resulting in a zero payoff for all group members. Note also that the results remain equivalent when the game is still played and \( COMP_F \) defects whenever there are not enough committers, as that would result in the same outcome of zero payoff for everyone in the group.

The space of possible strategies, which do not condition on the presence of a commitment, is determined by three decisions: before the PGG, whether to propose a commitment deal or not; upon receiving a proposal, whether to accept or reject it; and finally, whether to cooperate or defect in the PGG itself. As shown in previous models [19, 23], some unreasonable strategies can be excluded as they will get eliminated anyway. Namely, the strategies that cooperate in the game but will reject commitment proposals by others (i.e. S3 and S7 strategies in Fig. 2) and the strategies that propose an agreement but then defect in the game (i.e. S2 and S4 strategies in Fig. 2), independent of whether they accept another player’s proposal or not. The former ones are willing to cooperate, and thus should also agree to commit when being asked to since they prefer to cooperate anyway. Additionally, a positive compensation is guaranteed without having to pay the cost of arrangement. The latter ones should not propose commitments while intending to defect, as they would lose the cost of arranging the commitment and moreover have to compensate the other players. Figure 2 summarizes the taxonomy of the possible strategies.

Besides the unconditional strategies, we also include in our model a strategy that behaves conditionally on the presence of a commitment deal (see the FREE strategy below), which appeared to be the main obstruction for commitment strategies to evolve [19, 23].

Summarizing, we will examine the evolutionary dynamics of five strategies:

  1. (i)

    The \( COMP_F \) strategies with different levels F of participation, with \(F \in \{1,\ldots ,N\}\);

  2. (ii)

    Traditional unconditional contributors (annotated by C), who always commit when being proposed a commitment deal, contribute whenever the PGG is played, but do not propose commitment;

  3. (iii)

    Unconditional non-contributors (annotated by D), who do not accept commitment, defect when the PGG is played, and do not propose commitment;

  4. (iv)

    Fake committers (annotated by FAKE), who accept a commitment proposal yet do not subsequently contribute whenever the PGG is actually played. These players assume that they can exploit the commitment proposing players without suffering the consequences; and

  5. (v)

    Commitment free-riders (annotated by FREE), who defect unless being proposed a commitment, which they then accept and cooperate subsequently in the PGG. In other words, these players are willing to contribute when a commitment is proposed but are not prepared to pay the cost of setting it up.

Fig. 2
figure 2

Strategy taxonomy. There are three different decisions: (1) before the PGG, whether to propose a commitment deal or not; (2) upon receiving a proposal, whether to accept or reject it; and finally, (3) whether to cooperate or defect in the PGG itself. That leads to eight possible strategies, where four of them can be excluded due to being dominated. Hence, four strategies that are unconditional on the presence of a commitment are named: COMP, C, D, FAKE

The strategies are randomly sampled from a well-mixed, finite population of a constant size Z, which consists of players adhering to one of the five commitment proposing strategies \( COMP_F \) (\(1\le F \le 5\)), C, D, FREE or the FAKE strategy (i.e. nine strategies in total). In each interaction, N agents are randomly selected from the population for playing the PGG.

Table 1 Specification of the strategy payoffs

Table 1 lists the payoffs each strategy receives when encountering specific other strategies. We denote by \(\varPi _{ij}(k)\) and \(\varPi _{ji}(k)\) the payoffs of a strategist of type i and j, respectively, when the random sampling consists of k players of type i and \((N-k)\) players of type j. Next to providing the well-known payoffs for the typical PGG strategies the table specifies also for every \(\textit{COMP}_F\) strategy as well as the \(\textit{FREE}\) and \(\textit{FAKE}\) strategies how their payoff is determined. The first column captures the first strategy and the second the list of opponent strategies. These payoffs are used in the EGT methods, which are discussed in detail in the next section.

3.2 Evolutionary dynamics in finite populations

Both the analytical and numerical results obtained here use EGT methods for finite as opposed to infinite well-mixed populations [34, 42, 54]. Differently from the infinitely large population settings in which the deterministic replicator dynamics equation is adopted to model the population dynamics [32], the finite population approach uses a Moran process [40], a type of birth–death process that incorporates random replacement of one individual by the offspring of another individual (selection) with the offspring having the possibility to adopt the behavior of the parent or to pick a random alternative (mutation). The first mechanism eliminates strategies either randomly or in a fitness proportionate manner (exploitation) and the second mechanism provides the means for novel strategies to appear in the population (exploration) [66]. Different from the dynamics in infinitely large populations, which can be characterized by stable equilibrium points where multiple strategies may co-exist, the stochasticity (i.e. the random replacement) in a finite population will, given enough time, drive the population to a homogeneous state, wherein all agents use the same strategy, as long as the state is reachable [40]. This homogenous state might be escaped only via mutation, as once all agents adopt the same strategy no change to the population strategic composition can be obtained otherwise. Nonetheless, any state is reachable from any other state, since there is always a non-zero probability that an agent imitates another agent’s strategyFootnote 2 if the influence of the game payoff on the fitness is not infinitely large (see the Fermi function below). In general, the finite population dynamics defined by the Moran process allow one to characterise the probabilities of moving between the homogeneous population states and how often each homogeneous state is visited in the long run (see details of the Markov process below). For a nice illustration of the difference between the two approaches see some examples in [34] where the approaches were used to analyze strategies in the iterated Prisoner’s Dilemma. Finite population dynamics have received increasing attention over the years as it has been shown to be successful in explaining different realistic observations in the study of the evolution of cooperation [31, 34, 42, 65] as well as having the capacity to elegantly reproduce results from behavioral experiments [45, 75].

In the current setting, an agent’s payoff represents its fitness or social success, and the evolutionary dynamics are driven by social learning [32, 48, 54], whereby the more successful agents tend to be imitated more often by the others. In the current work, imitation is modeled through the widely used pair-wise comparison rule [68], which assumes that an agent A with fitness \(f_A\) adopts the strategy of another agent B with fitness \(f_B\) with probability given by the Fermi function,Footnote 3

$$\begin{aligned} \left( 1 + e^{-\beta (f_B-f_A)}\right) ^{-1}. \end{aligned}$$

The parameter \(\beta \) represents the ‘imitation strength’ or ‘intensity of selection’, i.e., how strongly the agents base their decision to imitate on the fitness difference \((f_B-f_A)\). For \(\beta =0\), we obtain the limit of neutral drift—the imitation decision is random. For large \(\beta \), imitation becomes increasingly deterministic. It is noteworthy, especially for those who are familiar with other learning literature, that this parameter plays a similar role as the temperature factor in Boltzmann exploration mechanism usually used in Reinforcement Learning to balance between exploitation and exploration [5]. Indeed, as exploration is introduced below, \(\beta \) balances between greedily mimicing more successful interaction partners and randomly switching to the alternatives available in the population.

As this imitation dynamics only work with the strategies available in the population, novel behaviors can only be explored through mutation [66]. In the evolutionary process, one assumes that, with a certain mutation probability \(\mu \), agents switch randomly to one of the potential strategies instead of imitating another agent (which now occurs with the probability \(1-\mu \)). Mutation hence seeds the population with new strategies, providing them the possibility to invade (when they are more successful than the resident strategy). As such it provides an additional way of exploring the strategy space.

Given the previous components, the population dynamics can be described by a Markov chain, for which the stationary distribution characterizes the average time the population spends in each of monomorphic end state consisting of only one strategic type. For arbitrary mutation probabilities, this stationary distribution is cumbersome to compute analytically as one has to deal with multiple new mutants at the same time [31, 66]. In the limit of small mutation rates [14, 31, 34], any newly occurring mutant in a homogeneous population will fixate or become extinct long before the occurrence of the next mutation. Hence, the evolutionary dynamics will proceed with, at most, two strategies in the population, allowing one to describe the behavioral dynamics by a Markov chain, in which each state corresponds to a monomorphic population, whereas the transition probabilities are given by the fixation probability of a single mutant [14, 34]. This approach has been proven useful for explaining different realistic observations in the study of the evolution of cooperation [22, 31, 42], and for generating results close to real experimental data [45, 75]. Below we describe how the fixation probabilities and the stationary distribution are determined analytically.

3.2.1 Payoffs over group samplings

In finite populations, the groups engaging in a PGG are given by multivariate hypergeometric sampling. For transition between two pure states (small mutation), this reduces to sampling (without replacement) from a hypergeometric distribution [31, 54]. Namely, in a population of size Z with x individuals of type i and \(Z-x\) individuals of type j, the probability to select k individuals of type i and \(N-k\) individuals of type j in N trials is [31]

$$\begin{aligned} H(k,N,x,Z) = \frac{\genfrac(){0.0pt}0{x}{k}\genfrac(){0.0pt}0{Z-x}{N-k}}{ \genfrac(){0.0pt}0{Z}{N}}. \end{aligned}$$

Recall that \(\varPi _{ij}(k)\) and \(\varPi _{ji}(k)\) denote the payoff of a strategist of type i and j, respectively, when the random sampling consists of k players of type i and \(N-k\) players of type j (as derived above). Hence, in a population of x i-strategists and \((Z-x)\) j-strategists, the average payoffs to i and j strategists are [31, 54]:

$$\begin{aligned} P_{ij}(x)= & {} \sum ^{N-1}_{k=0} H(k,N-1,x-1,Z-1) \ \varPi _{ij}(k+1) \nonumber \\= & {} \sum ^{N-1}_{k=0}\frac{\genfrac(){0.0pt}0{x-1}{k}\genfrac(){0.0pt}0{Z-x}{N-1-k}}{ \genfrac(){0.0pt}0{Z-1}{N-1}} \ \varPi _{ij}(k+1), \nonumber \\ P_{ji}(x)= & {} \sum ^{N-1}_{k=0} H(k,N-1,x,Z-1) \ \varPi _{ji}(k) \nonumber \\= & {} \sum ^{N-1}_{k=0} \frac{\genfrac(){0.0pt}0{x}{k}\genfrac(){0.0pt}0{Z-1-x}{N-1-k}}{ \genfrac(){0.0pt}0{Z-1}{N-1}} \ \varPi _{ji}(k). \end{aligned}$$
(1)

Now, the probability to change the number k of agents using strategy i by ±1 in each time step can be written as

$$\begin{aligned} T^{\pm }(k) = \frac{Z-k}{Z} \frac{k}{Z} \left[ 1 + e^{\mp \beta [P_{ij}(k) - P_{ji}(k)]}\right] ^{-1}, \end{aligned}$$
(2)

with \(T^+\) corresponding to an increase from k tot \(k+1\) and \(T^-\) corresponding to the opposite. The fixation probability of a single mutant with a strategy i in a population of \((N-1)\) agents using j is given by [14, 34, 35, 68]

$$\begin{aligned} \rho _{j,i} = \left( 1 + \sum _{i = 1}^{Z-1} \prod _{j = 1}^i \frac{T^-(j)}{T^+(j)}\right) ^{-1}. \end{aligned}$$
(3)

In the limit of neutral drift (i.e. \(\beta = 0\)), \(\rho _{B,A}\) equals the inverse of population size, 1 / Z.

Considering a set \(\{1,\ldots ,q\}\) of different strategies, these fixation probabilities determine a transition matrix \(M = \{T_{ij}\}_{i,j = 1}^q\), with \(T_{ij, j \ne i} = \rho _{ji}/(q-1)\) and \(T_{ii} = 1 - \sum ^{q}_{j = 1, j \ne i} T_{ij}\), of a Markov chain. The normalized eigenvector associated with the eigenvalue 1 of the transposed of M provides the stationary distribution described above [14, 34, 35], describing the relative time the population spends in a configuration with only one of the strategies.

3.2.2 Risk-dominance condition

An important analytical criteria to determine the evolutionary viability of a given strategy is whether it is risk-dominant with respect to other strategies [15, 41]. Namely, one considers which selection direction is more probable: an i mutant fixating in a homogeneous population of agents playing j or a j mutant fixating in a homogeneous population of agents playing i. When the first is more likely than the latter, i is said to be risk-dominant against j [15], which holds for any intensity of selection and in the limit of large population size Z when

$$\begin{aligned} \sum ^{N}_{k=1} \varPi _{ij}(k) \ge \sum ^{N-1}_{k=0} \varPi _{ji}(k). \end{aligned}$$
(4)

4 Results

4.1 Constraints on the evolutionary viability of \( COMP_F \)

In order to assess whether and when the commitment proposing behavior can be a viable strategy for the evolution of cooperation we first derive conditions for which \( COMP_F \) are risk-dominant against other strategies in the population [15, 41]. This derivation requires us to combine the information in Table 1 and Eq. (4).

  1. 1.

    \( COMP_F \) is risk-dominant against FREE when

    $$\begin{aligned} \sum ^{N}_{k=1} (rc-c-\epsilon /k) \ge (N-1)(rc-c), \end{aligned}$$
    (5)

    which can be simplified to

    $$\begin{aligned} \epsilon \le \frac{c(r-1)}{H_N},\quad \text {where}\;H_N = \sum ^{N}_{k=1} 1/k^{4}. \end{aligned}$$
    (6)
  2. 2.

    \( COMP_F \) is risk-dominant against FAKE ifFootnote 4

    $$\begin{aligned} \sum ^{N}_{k=1}\left( \left( \frac{rk}{N}-1\right) c + \frac{N\delta - \epsilon }{k} -\delta \right) \ge \sum ^{N-1}_{k=1} \left( \frac{r(N-k)}{N}c -\delta \right) , \end{aligned}$$
    (7)

    which can be simplified to

    $$\begin{aligned} \delta \ge \frac{(N-r)c}{N H_{N-1}} + \frac{H_{N}}{NH_{N-1}}\epsilon \end{aligned}$$
    (8)

    Note that both conditions do not depend on the participation level F.

  3. 3.

    \( COMP_F \) is risk-dominant against D if

    $$\begin{aligned} \epsilon \le \left( \frac{r+F-N-1}{H_N-H_{F-1}}\right) c \end{aligned}$$
    (9)
Fig. 3
figure 3

a Stationary distribution and transition probabilities in a population of nine strategies, including five types of \( COMP_F \) and the other four strategies. The black arrows identify the transitions that are stronger than neutral, which is \(\rho _N = 1/Z\). The dashed lines denote neutral transitions. Also, different types of \( COMP_F \), within the pentagon, are neutral among each other. They behave equivalently when facing FAKE, FREE and C players. When playing with D, there are transitions from D to \( COMP_3 \), \( COMP_4 \) and \( COMP_5 \), but it is reversed for \( COMP_1 \). b Cooperation and c commitment levels in the population of nine strategies, as a function of \(\epsilon \) and r. Cooperation level corresponds to the sum of the frequencies of C and all \( COMP_F \) strategies. Commitment level is the total frequency of all \( COMP_F \). In both cases, the smaller the cost of arranging commitment (i.e. the smaller \(\epsilon \)), the higher level of cooperation and commitment in the population. Furthermore, the cooperation level also increases with r. Parameters: in all panels, \(N = 5\), \(Z = 100\), \(\delta = 2\); \(\beta = 0.25\). In a \(r = 4\); \(\epsilon = 0.25\)

Combining these three conditions, one can see that \( COMP_F \) is risk-dominant against all three defecting strategies when \(\delta \) satisfies Eq. (8) and \(\epsilon \) is bounded as follows

$$\begin{aligned} \epsilon \le \min \left\{ \frac{r+F-N-1}{H_N-H_{F-1}}, \frac{r-1}{H_N} \right\} \cdot c. \end{aligned}$$
(10)

These conditions can be understood intuitively. For a successful commitment, the cost of arranging the commitment needs to be justified with respect to the benefit of mutual cooperation, i.e. \((r -1) c\), as well as a sufficient compensation is to be arranged. Moreover, the necessary condition for the cost, specified in Eq. (10), to hold is \(r + F \ge N + 1\). Since \(N > r\) it implies that \(F \ge 2\). That said, \( COMP_1 \) can never be risk-dominant or viable against defectors. Commitment proposers should initiate the PGG only when there is at least one other player, apart herself, agreeing to commit.

This analytical observation is corroborated by the numerical computation of the transition probabilities and stationary distribution (see Methods in the previous section) in Fig. 3a. Note the transitions between different types of \( COMP_F \) players and D. There are transitions from D to \( COMP_3 \), \( COMP_4 \) and \( COMP_5 \), but it is reversed for \( COMP_1 \). No transitions between \( COMP_2 \) and D are shown since they are both weaker than neutral, though the one from \( COMP_2 \) to D is stronger than the opposite one. All \( COMP_F \) behave equivalently to each other when facing FAKE, FREE and C players, with the same transition probabilities from and to the three latter strategies. There are cycles from C to defecting strategies and back to certain commitment proposing strategies, namely, \( COMP_3 \), \( COMP_4 \) and \( COMP_5 \).

Note that the risk-dominance conditions are derived in the limit of large population sizes Z. It is therefore interesting (and possible) to analyze these conditions when the group size \(N \rightarrow \infty \) (see again Eq. 4). In Appendix we provide detailed analysis for this. Apart from conclusions that are obtained from direct application of taking the limit of the right-hand sides in the inequalities (8) and (10), we obtained necessary asymptotic conditions for the multiplication factor r(N), the cost of arranging commitment \(\epsilon (N)\), and the compensation \(\delta (N)\), all as a function of N, for which \( COMP_F \) can be risk-dominant against all the defective strategies, as follows

  1. 1.

    r(N) satisfies that \(r(N) = \varOmega (\log N)\), i.e.

    $$\begin{aligned} \lim _{N \rightarrow \infty } \frac{r(N)}{\log N} > 0; \text { and} \end{aligned}$$
  2. 2.

    \(\epsilon (N)\) grows at most as fast as \(\frac{r(N)}{\log N}\) when \(N \rightarrow \infty \); and

  3. 3.

    \(\delta (N)\) grows at least as fast as \(\frac{\epsilon (N)}{N}\) when \(N \rightarrow \infty \).

4.2 Emergence of cooperation and sufficient participation levels

To provide further understanding on the viability of \( COMP_F \) in dealing with defectors and free-riders, we compute the stationary distributions for a range of values of the commitment cost \(\epsilon \) and the multiplication factor r, see Fig. 3b, c. The results show that, when the cost of arranging the commitment is sufficiently small compared to the cost of cooperation, commitment arranging behavior is frequent leading to a high level of cooperation in the population. We plot the total levels of cooperation and commitment in this population (where cooperation level is the sum of the frequencies of C and of all the \( COMP_F \) strategies; and commitment level is the sum of frequency of each \( COMP_F \)). We can see that in both cases, the smaller the cost of arranging commitment (i.e. the smaller \(\epsilon \)), the higher level of cooperation and commitment in the population. Furthermore, the cooperation level also increases when the dilemma becomes less harsh, i.e. with increasing r. The contour lines of \(\epsilon \in [0.25,0.3]\) mark the transition between more and less than \(50~\%\) of cooperation and commitment in the PGG. Our additional numerical results (see Fig. 7 in Appendix 2) demonstrate that these results are robust for different values of compensation cost and group size.

Fig. 4
figure 4

a Average individual payoff in the population of nine strategies, as a function of \(\epsilon \) and r. Similar to the cooperation level, the smaller the cost of arranging commitment (i.e. the smaller \(\epsilon \)), the higher the average individual payoff in the population. It also increases with r. b Average individual payoff in the population of nine strategies in comparison with that in the population of two strategies C and D, for varying r. For a reasonable \(\epsilon \), the average individual payoff (hence also the population total payoff or welfare) in the former population is significantly greater than that in the latter one. For very high values of \(\epsilon \), it is reverse when r is high. Parameters: in both panels, \(N = 5\), \(Z = 100\), \(\delta = 2\); \(\beta = 0.25\)

One can easily determine the effect of commitment on the average payoff and compare that to the case where commitment is absent. In the latter case, as commitment is absent there is only one decision the players need to make, which is whether to cooperate or defect in the PGG. Hence, we have only two possible strategies C (always cooperate) and D (always defect). In Fig. 4a, we plot the average individual payoff when commitment is present, as a function of \(\epsilon \) and r. This average is calculated by weighting the payoff in each monomorphic state of the Markov chain by its frequency in the stationary distribution. Namely, the average individual payoff in each \( COMP_F \) state is \((rc - c - \epsilon /N)\), in C state is \((rc - c)\), and in each defective strategy state (i.e. FREE, D and FAKE) is 0. One can observe in the figure, on one hand, that, similarly to the cooperation level, the smaller the cost of arranging commitment (i.e. the smaller \(\epsilon \)) and the higher the multiplication factor of the PGG (i.e. r), the higher the average individual payoff in the population. On the other hand, for a reasonable \(\epsilon \), the average individual payoff when commitment is present is significantly larger than when it is absent (see Fig. 4b), demonstrating that the introduction of commitment not only improves the level of cooperation but, as a consequence, the overall population welfare.

Fig. 5
figure 5

a Average level of commitment among commitment proposing strategies and b optimal commitment strategy (denoted by \(F^\star \)), as a function of r and \(\epsilon \), in a population of the nine strategies. There is an intermediate value of F for which commitment proposers are most frequent. The larger the cost of arranging commitment, \(\epsilon \), and the harsher the PGG dilemma (i.e. the lower r), the higher \(F^\star \) is and a higher average number of committers are required to play the game (i.e. the stricter \( COMP_F \) should be). Optimal threshold \(F^\star \) as a function of \(\epsilon \) and \(\delta \), for c \(r = 2.5\) and d \(r = 4.0\). There is an intermediate value \(F^\star \) where the highest frequency is achieved, and the higher \(\epsilon \), the higher \(F^\star \) becomes. Moreover, given the cost of arranging commitment, the optimal commitment threshold does not depend on the compensation \(\delta \). Parameters: in all panels: \(N = 5\), \(Z = 100\), \(\beta = 0.25\). In a, b \(\delta = 6\)

As was shown in Fig. 3a, the participation level plays a determining role in the evolutionary viability of the commitment proposing strategies, in relation to their ambition to induce cooperation in the population. We determine now in Fig. 5 the appropriate or minimal participation level that ensures sufficient frequencies of the commitment proposer and cooperation, for different values of the most relevant parameters. The results show that the participation level depends both on the dilemma at stake and the cost of arranging the commitment. Namely, the harsher the dilemma (i.e. small r) and the costlier the commitment arrangement (i.e. bigger \(\epsilon \)), the more agents need to accept to contribute in the PGG in order for commitment proposers to invest in the common good themselves (see Fig. 5a, b). Figure 5b also reveals that for a given situation there is an optimal threshold (\(F^\star \)) that varies most strongly with the severity of the dilemma. Moreover, given the cost of arranging commitments, this optimal commitment threshold is (almost) independent of the compensation \(\delta \) (see Fig. 5c, d). This observation is robust for a predefined r. These results also imply that \(\epsilon \) is the essential parameter in a group commitment system, determining which participation level is required to ensure high levels of cooperation. Indeed, as shown in Fig. 7 in Appendix—where we plot the total frequency of the commitment proposing strategies as a function of \(\epsilon \) and \(\delta \)—when \(\delta \) reaches a certain threshold, increasing it does not lead to notable improvement.

Fig. 6
figure 6

a Average \(F^\prime \) level in the population among commitment proposing strategies and b optimal \(F^\prime \) level (with the highest frequency), as a function of r and R, in a population of all types of \( COMP_{F,F^\prime } \) and the other four strategies. Parameters: \(N = 5\), \(Z = 100\); \(\epsilon = 0.25, \ \delta = 20\); \(\beta = 0.25\)

4.3 Lenience in long-term commitments

Suppose now that commitments may last more than 1 round (denoted by \(R>1\)).Footnote 5 When facing FAKE players who commit but then do not contribute, \( COMP_F \) can choose to take immediately the compensation as stated in the agreement thereby ceasing the group interaction for the rest of the commitment time \((R-1)\). Yet, the commitment player may see that although the expected number F was not attained, there is still sufficient participation to make it worthwhile to continue for the remaining rounds. The model discussed so far can be easily extended to incorporate this kind of behavior. The question then becomes for which parameters the \( COMP_F \) players can be lenient and for which conditions they need to be strict.

The model is extended to incorporate such behavior by adding another threshold \(F^\prime \) (\(1 \le F^\prime \le N\)) saying that, as long as the number of contributors in the group is at least \(F^\prime \), \( COMP_{F,F^\prime } \) will not demand the compensation (thereby ceasing the interactions) and continue to interact in the current group.

We compare all types of \( COMP_{F,F^\prime } \) with different values of F and \(F^\prime \) (i.e. \(N^2\) of them) within a population of these strategies with the other four non-proposing commitment strategies (i.e. 29 strategies in total). To understand the evolutionary viability of \( COMP_{F,F^\prime } \) and to calculate the stationary distributions we need to consider how this increase of complexity to the strategies affects the payoff values listed in Table 1 (note that we now calculate payoffs averaged over all rounds):

  • The payoffs between two different types of \( COMP_{F,F^\prime } \) are the same as the payoffs between two different types of \( COMP_{F} \) in the one-shot game (i.e. \(rc - c - \frac{\epsilon }{N}\)) because they all commit and cooperate in all the rounds.

  • The interactions between \( COMP_{F,F^\prime } \) on one hand, and C, D and FREE, on the other hand, do not depend on the parameter \(F^\prime \) as they all behave the same in all the R rounds (C and FREE commit and cooperate in all the rounds; while, in case of D, the game is either not formed in the first place when there are not sufficient committers in the group or when it is otherwise formed, it stays the same as D players do not commit in the first place—hence no compensation can be enforced). Hence, the payoffs for all these pairs are identical to those in Table 1.

  • Only the payoffs for each \( COMP_{F,F^\prime } \) strategy when interacting with FAKE remain to be determined. If \(k \ge F^\prime \), \( COMP_{F,F^\prime } \) will not demand the compensation even when FAKE committed and does not contribute. Hence, \(\varPi _{ COMP_{F,F^\prime } ,\textit{FAKE}}(k) = \varPi _{ COMP_{F} ,\textit{FAKE}}(k) \) and \(\varPi _{ FAKE,COMP_{F,F^\prime } }(k) = \varPi _{FAKE, COMP_{F} }(k) \). Otherwise, i.e. if \(k < F^\prime \), only the first round takes place and then the commitment is broken as \( COMP_{F,F^\prime } \) will demand immediate compensation from FAKE players. Hence, \(\varPi _{ COMP_{F,F^\prime } ,\textit{FAKE}}(k) =\) \( \frac{1}{R} \varPi _{ COMP_{F} ,\textit{FAKE}}(k) \) and \(\varPi _{ FAKE,COMP_{F,F^\prime } }(k) = \) \(\frac{1}{R} \varPi _{FAKE, COMP_{F} }(k) \).

The results as visualized in Fig. 6, show that for increasing R (i.e. the longer the commitment lasts), the stricter \( COMP_{F,F^\prime } \) should be when there is an agreement in place, requiring more contributors in the group to decide to continue to play. Concretely, take for instance the results in Fig. 6 for \(\epsilon =0.25\): To set up the agreement, different starting participation levels F are necessary depending on the severity of the game (see Fig. 5a, b). For instance, for \(r= 3\), a commitment proposer should play the PGG if only three other players accept to commit (or 2.5 additional players on average). Taking this result, we can see in Fig. 6 that even when starting out more strict, the proposer can be lenient towards the actual level of participation as long as the number of rounds is low (in this case \(R<10\)): Only when the number of rounds becomes bigger than 40 will she need to be as strict as at the start of the game (i.e. \(F=F'=4\)). Notice that a rather high \(\delta \) (namely, equal 20) is used in Fig. 6 to ensure a sufficient average compensation cost for varying R, though our additional analysis shows the results are qualitatively the same when varying \(\delta \). Furthermore, we see the same tendency when computing the average frequency of \(F^\prime \) in the population (as can be seen in Fig. 6a).

5 Conclusions

We have provided a new EGT model, which shows that arranging prior commitments in multiagent group interactions, not just pair-wise ones, provides a pathway towards the evolution of cooperation in the typical PGG. Our analytical and numerical results clearly exhibit that if the cost of arranging commitment is sufficiently small compared to cost of cooperation, then commitment arranging behavior becomes frequent, leading henceforth to high levels of cooperation in a population sporting a representative variety of playing strategies. Furthermore, an optimal prior commitment participation level emerges, dependent both on the common goods dilemma and on the cost of arranging commitment. In particular, the harsher the dilemma and the costlier the commitment, the higher the required commitment participation level to ensure the success of the joint venture. Additionally, as a commitment deal may last for more than one round, we evince that longer-lasting commitments require a greater strictness upon fake committers than short ones.

The results we obtain are in close accordance with experimental economic outcomes obtained by others [9, 10]. But the present work further reveals that, whenever the compensation that needs to be paid by fake committers reaches a certain threshold, increasing it does not lead to improvement in terms of cooperation levels. It implies that, when designing norms, whether in real life or a self-organizing MAS, it is not necessary to have an infinitely large compensation or sanction against law breakers, for a sufficient one is enough for a wide range of situations. Moreover, the current paper suggests the need for further behavioral experiments to explore the effects of varying the essential parameters that drive commitments.

Finally, our work provides specific insights into the design of self-organizing MAS when dealing with group interactions. For instance, in finding the effective degrees of commitment one should require from group members which lead to highest levels of cooperation. Another instance concerns the use of commitment with a view to cooperation in lieu of intention recognition [18, 20, 21], when the latter is not reliable enough. Commitment can be seen as a cogent form of intention manifestation, and achieving joint intentions is an exclusive characteristic of the human species [63]. Notwithstanding, as groups increase in size, intention recognition may need to be supplemented by explicit intention commitment to ensure joint success [64].