The Ultimatum Game has become a popular paradigm for investigating and elucidating the evolution of fairness[@b1]. In this simple game, two players, one acting as a proposer and the other as a responder, have to share a pie. The proposer suggests a split of the pie, and the responder can either accept it or not. If the responder accepts the offer, the deal is done. If the responder rejects the offer, neither player obtains anything. Apparently, a rational responder should accept any nonzero offer, or else he will end up with getting nothing, and thus a selfish proposer should always claim the large majority of the pie, which is known as the subgame perfect equilibrium in game theory[@b2]. This is also the observed outcome for the evolutionary Ultimatum Game in a well-mixed population[@b3]. However, large amount of empirical experiments show that the majority of proposers offer 40% to 50% of the total sum, and about half of responders reject offers below 30%[@b1][@b4][@b5][@b6][@b7][@b8][@b9], which is obviously at odds with above analytical reasoning. Then how can we understand the emergence and persistence of fairness in a population of self-interest individuals?

Recently, considerable efforts have been made to explore the origins of this altruistic behaviour. Some studies have demonstrated that many people are not only concerned with their own benefits but also influenced by the payoffs of others, which is usually considered in the definitions of utility functions[@b8][@b10][@b11][@b12][@b13]. While others have shown that the preference of people towards fairness may be due to the repeated interactions in the Ultimatum Game[@b6][@b8][@b13][@b14]. In the context of evolutionary game theory[@b15], theoretical studies indicate that small group size[@b16], reputation[@b17], empathy[@b18], population structure[@b19][@b20][@b21][@b22][@b23][@b24][@b25][@b26][@b27][@b28][@b29] and heterogeneity[@b30][@b31] play a vital role in the evolution of fairness in the Ultimatum Game.

To our knowledge, an important issue, which has so far remained unexplored, is how the random allocation of pies affects the evolution of fairness in the Ultimatum Game. In hunter-gatherer societies[@b32], the Ultimatum Game can describe such a situation, where two individuals have to divide in advance the reward of a task which can be obtained only by jointly effort, such as cooperative hunting, forming an alliance against another group member, or food sharing. Obviously, there is no reason that the sizes of rewards must be uniform. Let us take cooperative hunting as an example. It apparently can not be guaranteed that the prey is always the same for each hunting activity. Actually, it seems more plausible to assume that the sizes of pies are subject to some kind of distribution, which motivates us to model and study the random allocation scheme of pies in the Ultimatum Game under the framework of evolutionary game theory (see **Model definition** in **Methods** section). Interestingly, we find that whenever individuals compete for stochastic sizes of pies (introduced by random allocation scheme), evolution can lead to fairer split, without the support of any additional evolutionary mechanisms. Our results thus demonstrate how the randomness can be crucial for the emergence and maintenance of fairness.

Results
=======

In this report, we mainly focus on how the amplitude of fluctuation of the pies, Λ, influences the evolution of fairness in the Ultimatum Game. The strategy of a player is given by a vector *S* = \[*p*, *q*\], where *p* represents the offer level, i.e., the fraction of the pie offered by the player when acting as a proposer, and *q* indicates the acceptance threshold, i.e., the minimum fraction that the player accepts when acting as a responder.

We start by studying how local random allocation scheme of pies affects the evolution of fairness in the spatial Ultimatum Game. It should be noticed that Λ = 0 recovers the original spatial Ultimatum Game[@b19], wherein uniform allocation scheme of pies is adopted. With the increment of Λ, the allocated pies become increasingly stochastic. [Figure 1](#f1){ref-type="fig"} shows the results for the evolution of fairness across the whole applicable span of Λ. Comparison between the results on uniform allocation scheme (i.e., Λ = 0) with those on local random allocation scheme (i.e., 0 \< Λ ≤ 1) reveals the impact of randomness on the evolution of fairness. For uniform allocation scheme, the population evolves towards a state deviating from the game-theoretic prediction, and equilibrates at and on spatial networks, which is similar to the positive effect of network structure on facilitating cooperation[@b33][@b34][@b35][@b36][@b37]. As Λ increases, both and monotonically increase, and reach their own maximums (i.e., and ) at Λ = 1.

The time evolution of typical spatial strategy distributions for Λ = 0 and Λ = 1 is depicted in [Figs. 2(a) and 2(b)](#f2){ref-type="fig"}, respectively. Generally, the evolutionary process for the case of Λ = 0 can be characterized by two distinct dynamical phases: local aggregation (from *t* = 1 to *t* = 10) followed by global expansion (from *t* = 10 to *t* = 10000). Initially, self-incompatible strategies (i.e., strategies satisfying *p* \< *q*) are extinct after the first few time steps \[see *t* = 10 for Λ = 0 in [Fig. 2(a)](#f2){ref-type="fig"}\]. Such strategies obtain nothing when interacting with themselves. Consequently, they will disappear in a spatial world. On the other hand, self-compatible strategies (i.e., strategies satisfying *p* ≥ *q*), which can be roughly classified into two categories: generous strategies (i.e., strategies that satisfy the condition that *p* is large, while *q* is small) and quasiempathic strategies (i.e., strategies that satisfy the condition that *p* and *q* are similar with each other.), gradually form spatial clusters in a self-organized manner \[see *t* = 10 for Λ = 0 in [Fig. 2(a)](#f2){ref-type="fig"}\]. Therefore, we can make the macroscopic observation that the average offer level of the population increases, while the average acceptance threshold decreases in this stage \[see *t* = 1 and *t* = 10 for Λ = 0 in [Fig. 2(a)](#f2){ref-type="fig"}\]. Subsequently, the system enters into the global expansion phase. The more fair quasiempathic strategies can expand into the territories of the less fair quasiempathic and the generous ones in the form of spatial clusters. We emphasize that theories related to spatial selection of cooperators in the prisoner\'s dilemma game[@b38] or the public goods game[@b39] do not help explain fairness in the Ultimatum Game at this stage, as a cluster of individuals with more fair quasiempathic strategies receives the same average payoff as a cluster of individuals with less fair quasiempathic strategies or generous ones. On the contrary, it is the performance of one strategy against other strategies that determines its own evolutionary fate. With these facts in mind, we can explain the above phenomenon by considering the following situation: a player with more fair quasiempathic strategy *S*~2~ = \[*p*~2~, *q*~2~\] competes with another player with less fair quasiempathic strategy *S*~1~ = \[*p*~1~, *q*~1~\]. Then the following two cases should be considered: (a) or , and (b) . The payoff difference between the player with *S*~2~ and the one with *S*~1~ is 2(*p*~1~ − *p*~2~) if condition (a) holds, and 1 − 2*p*~2~ if condition (b) holds. Obviously, it is advantageous for players to enhance their acceptance thresholds. Though it gives a good estimation of the local competition between players on spatial networks especially if the connectivity is low, this simple analysis ignores the fact that the performance of a player depends not merely on one single interaction, but on the interactions with players in the whole neighborhood. From this perspective, players are tempted to lower their acceptance thresholds. Put differently, there is a tradeoff between rejecting unfair offers (achieving by increasing *q*) and making more successful splits (achieving by decreasing *q*) for players in structured populations. As a result, we can inspect a sharp increase of the average acceptance threshold of the population from a low level at *t* = 10 to a moderate level at *t* = 100, while a relatively moderate increase of the average offer level of the population in this stage \[see *t* = 10 and *t* = 100 for Λ = 0 in [Fig. 2(a)](#f2){ref-type="fig"}\]. Still, there are a few small residual clusters of generous strategies embedded in a spatial world of fair quasiempathic strategies at *t* = 100. The offer level of each player is roughly equal \[*σ~p~* ≈ 0.0328 at *t* = 100, see [Fig. 2(a)](#f2){ref-type="fig"}\]. On the other hand, the strategies surviving in the structured population are self-compatible \[see [Fig. 2(a)](#f2){ref-type="fig"}\]. Both factors lead to the result that the payoff of each player is approximately equal in the population. The strategy evolution is largely controlled by slowly coarsening dynamics, which is similar to the behaviour of the voter model[@b40]. Since the fraction of fair quasiempathic strategies is much higher compared to the fraction of generous ones, the fair quasiempathic strategies will take over the whole population eventually \[see *t* = 100 and *t* = 10000 for Λ = 0 in [Fig. 2(a)](#f2){ref-type="fig"}\]. Regarding the case of Λ = 1, we inspect a very similar evolutionary process as Λ = 0 \[see [Fig. 2(b)](#f2){ref-type="fig"}\].

For the purpose of shedding light on the constructive impact of local random allocation scheme of pies on the evolutionary success of fairness in our agent based simulations, we turn to consider a mini spatial Ultimatum Game[@b17][@b19][@b41], in which only two strategies, i.e., *S*~1~ = \[*p*~1~, *q*~1~\] and *S*~2~ = \[*p*~2~, *q*~2~\] satisfying , are present. It was previously reported that the fate of a random arrangement of two strategies on the two-dimensional grid relies on whether a 3 × 3 cluster of one strategy can spread or not[@b19][@b41]. We thus investigate how the invasion ability of a 3 × 3 *S*~2~ mutant cluster varies with Λ in a spatial world of players with strategy *S*~1~. In [Supplementary Note](#s1){ref-type="supplementary-material"}, we find that the parameter region, under which the 3 × 3 *S*~2~ mutant cluster is expected to expand \[i.e., \], is enlarged when Λ increases (see [Supplementary Fig. S13](#s1){ref-type="supplementary-material"}). More intriguingly, there exists a intermediate value of Λ that leads to the most favorable condition for the evolution of fairness in the mini spatial Ultimatum Game. Such observation reminds us of the coherence resonance phenomenon in dynamical systems, where noise can anticipate the behaviour of the system past a bifurcation point in a resonant manner[@b42][@b43][@b44][@b45][@b46]. Indeed, results presented in [Supplementary Fig. S13](#s1){ref-type="supplementary-material"} clearly show that there exists an optimal Λ for which the parameter region of is maximal. As a matter of fact, can be assumed to represent the constructive effects of noise on the system, and has similar meaning as the signal-to-noise ratio in dynamical systems[@b42]. Then we can regard the phase transition as a bifurcation point of a dynamical system. This conjecture can be strengthened by considering that the parameter *p*~2~ in the noisy regime truly acts as a bifurcation parameter, since increasing its value pushes the system further away from the transition line, which makes it increasingly difficult for noise to anticipate the behaviour of the system beyond the bifurcation (see [Supplementary Fig. S13](#s1){ref-type="supplementary-material"}). Extensive computer simulations also show the existence of intermediate optimum Λ in the full spatial Ultimatum Game (i.e., with its continuum of strategies) by expanding Λ beyond the reasonable range \[0, 1\], and thus verify our explanation (see [Supplementary Fig. S1](#s1){ref-type="supplementary-material"}).

[Figure 3](#f3){ref-type="fig"} shows how fairness evolves if the randomness of pies is extended from local to global in the spatial Ultimatum Game. The results obtained here are qualitatively identical as the ones for the case of local random allocation scheme. Namely, as Λ increases, both the average offer level and the average acceptance threshold of the population increase. Thus together with the results obtained from [Fig. 1](#f1){ref-type="fig"}, one can conclude that the stochasticity in the sizes of pies facilitates the evolution of fairness in the spatial Ultimatum Game.

To check the universality of the drawn conclusions, we have tested various aspects of the model. Considering a well-mixed population, a small-world network, or a scale-free network does not affect our qualitative results (see [Supplementary Figs. S2, S3 and S4](#s1){ref-type="supplementary-material"}). Without the aid of "spatial reciprocity"[@b19], the well-mixed population evolves into a considerably unfair state (see [Supplementary Fig. S2](#s1){ref-type="supplementary-material"}). The degree of fairness increases compared with that observed on square lattices, when individuals interact on small-world networks. Namely, the small-world effect can further enhance the level of fairness (compare [Figs. 1](#f1){ref-type="fig"} and [3](#f3){ref-type="fig"} with [Supplementary Fig. S3](#s1){ref-type="supplementary-material"}). In contrast, the heterogeneity of the degree distribution disfavors fairness, as the level of fairness achieved in the scale-free networks is more modest in comparison with that observed on square lattices (compare [Figs. 1](#f1){ref-type="fig"} and [3](#f3){ref-type="fig"} with [Supplementary Fig. S4](#s1){ref-type="supplementary-material"}). This is in sharp contrast with other theoretical investigations that inhomogeneity of the networks can result in a remarkable boost in cooperation[@b37][@b47]. Altering the update rule (employing asynchronous updating rule) results in the same qualitative outcomes (see [Supplementary Fig. S5](#s1){ref-type="supplementary-material"}). Applying overlapping generations (asynchronous updating) instead of non-overlapping generations (synchronous updating) can further elevate the degree of fairness (compare [Figs. 1](#f1){ref-type="fig"} and [3](#f3){ref-type="fig"} with [Supplementary Fig. S5](#s1){ref-type="supplementary-material"}). Moreover, the variation of noise or learning error does not affect our qualitative outcomes (see [Supplementary Figs. S6 and S7](#s1){ref-type="supplementary-material"}). Moderately adjusting the noise as well as learning error does not alter the conclusion that random allocation of pies promotes the evolution of fairness. As a further test of robustness, we investigate another pattern of Ultimatum Game, in which the game is played only once between two parties, and roles (proposer or responder) are randomly assigned to them. Again, we find qualitative equivalent behaviour (see [Supplementary Fig. S8](#s1){ref-type="supplementary-material"}). Moreover, we also test another widely applied initial strategy distribution setup, in which the two components *p* and *q* of each individual\'s strategy vector \[*p*, *q*\] are initially picked up in the interval \[0, 1\] randomly and independently. We show that such change does not affect the generality of the reported results (see [Supplementary Fig. S9](#s1){ref-type="supplementary-material"}). In addition, when replacing the uniform distribution of pies with exponential or power-law distribution, we find qualitatively the same results (see [Supplementary Fig. S10](#s1){ref-type="supplementary-material"}). All the above results have indicated that the main conclusions are robust against a wide variety of perturbations of the model.

Discussion
==========

In sum, we have studied how random allocation of pies affects the evolution of fairness in the spatial Ultimatum Game. It was found that the evolution of fairness can be promoted if randomness is involved in the allocation of pies. In order to elaborate the underlying reason for the facilitation of fairness, we have analyzed a mini spatial Ultimatum Game, and found that the introduced randomness can favor fairness in a resonant manner, which is similar to coherence resonance in other dynamical systems[@b36][@b42]. This explanation is further supported by the observation of the resonant phenomenon made on the full spatial Ultimatum Game. Moreover, we have demonstrated that the main findings are robust against numerous variations of the model, and thus designating the randomness of pies as a universal mechanism to promote the evolution of fairness.

Lastly, we would like to relate the present work to some other game-theoretical ones. By using stochastic evolutionary game theory, Rand *et al.*[@b48] studied the effect of randomness on the evolution of fairness in the Ultimatum Game. Interestingly, they found that natural selection favors fairness, when selection is sufficiently weak or mutation is sufficiently high. However, such assumptions are not necessary in our study. Instead, we find that the randomness arising from the allocation of pies can promote the evolution of fairness in the Ultimatum Game even if selection is strong and mutation is low (see [Supplementary Fig. S2](#s1){ref-type="supplementary-material"}). Note that it is the errors in social learning process and the finiteness of the populations that lead to the randomness in their study. Although the randomness origins from different aspects for these two works, both of them lead to the conclusion that fairness has a better chance to triumph in a random world.

In fact, the effect of the size of pies on the origin of fair behavior has also attracted lots of interests from experimental economists. In one setup of experimental designs[@b49][@b50][@b51], the empirical studies assumed that the size of the pies to be allocated would decay over rounds until an agreement is reached. While in our model, the size is randomly changed during the evolutionary process, and we focus on the one-round Ultimatum Game. In another pattern[@b52][@b53], researchers investigate the Ultimatum Game with incomplete information, that is, both parties have limited information regarding the game (e.g., only proposer knows the size of pie, while the responder is merely informed about the probability distribution of possible pie sizes when responding to the proposal[@b52].). In our study, however, players have no information about their co-players and they have completely no idea on the size of pies. Our analysis shows that randomness of pies facilitates the evolution of fairness in the Ultimatum Game even in such information-deficiency situation.

Methods
=======

Model definition
----------------

The strategy of each player can be characterized by a vector *S* = \[*p*, *q*\]. The value of *p* denotes the fraction of the pie offered by the player when acting as a proposer, while the value of *q* indicates the acceptance threshold, i.e., the minimum fraction that the player accepts when acting as a responder. Each time step, every individual plays the Ultimatum Game with each of its neighbors, once in the role of proposer and once in the role of responder. Let *P* (*S~i~*, *S~j~*) be the payoff that player *i* with strategy *S~i~* = \[*p~i~*, *q~i~*\] gets from player *j* with strategy *S~j~* = \[*p~j~*, *q~j~*\]. Thus *P*(*S~i~*, *S~j~*) is given by where *R~i~* (*R~j~*) is the pie allocated to the Ultimatum Game, in which player *i* (*j*) acts as a proposer, and *j* (*i*) as a responder. As far as we know, previous studies regarding the Ultimatum Game simply assume the uniform allocation scheme of pies, that is, the size of pies is constant (i.e., *R~i~* = *R~j~* = 1). In this report, we would like to relax this assumption, and introduce randomness by considering random allocation scheme of pies.

### Random allocation scheme

For random allocation scheme, pies are randomly allocated to the Ultimatum Games. As the first step to model the random allocation scheme and for the convenience of analysis, the pies *R~i~* and *R~j~*, which are split between player *i* and *j*, are simply assumed to be *R~i~* = 1 + *ξ* and *R~j~* = 1 − *ξ*, where *ξ* is a random variable and subject to uniform distribution ranging from −Λ to Λ \[see [Fig. 4(a)](#f4){ref-type="fig"}\]. As the total size of pie *R~i~* + *R~j~* = 2 to be split between *i* and *j* is constant, the randomness of the allocation of pies is merely local in this case. Therefore, we term this mode of random allocation scheme as local random allocation scheme. Later, we will also investigate the so called global random allocation scheme, wherein *R~i~* = 1 + *ξ~i~* and *R~j~* = 1 + *ξ~j~* \[see [Fig. 4(b)](#f4){ref-type="fig"}\]. Here *ξ~i~* and *ξ~j~* are independent random variables, and subject to uniform distribution ranging from −Λ to Λ. The parameter Λ determines the amplitude of undulation of the pies. For reasonability of the model, we set 0 ≤ Λ ≤ 1 for both local and global random allocation schemes, making sure that *R~i~* ≥ 0 and *R~j~* ≥ 0. It is important to note that all the expectations of the above random variables equal to zero, and thus there is no net contribution of both kinds of random allocation schemes to the total expected payoff of the population statistically.

Subsequently to the games, players consider updating their strategies. Every player accumulates the payoff and then would experience the strategy updating synchronously. Particularly, player *i* adopts the strategy *S~j~* of a randomly selected neighbor *j* with the probability where *P~i~* and *P~j~* are the payoffs of *i* and *j*, respectively. The parameter *K* quantifies the amplitude of noise[@b36]. As the strategies in the Ultimatum Game are continuous, it is almost impossible to imitate the strategy of the role model precisely. Thus we add a small perturbation to the process of strategy updating. Namely, after learning from *j*, the strategy of *i* becomes *S~i~* = \[*p~i~* + *ε*~1~, *q~i~* + *ε*~2~\] with *ε*~1~ and *ε*~2~ being randomly picked up from the interval \[−*ε*, *ε*\]. Both the noise *K* and the learning error *ε* are used to create a "trembling hand" effect[@b2]. After these updating events have been performed for all of the individuals in the population, a new time step begins.

Model parameters settings
-------------------------

The simulation results were obtained by applying a square lattice with the *von Neumann* neighborhood (i.e., the number of neighbors for each site is 4), which is of size *N* = 100 × 100 and with periodic boundary condition. Based on rational self-interest, the two components *p* and *q* of each individual\'s strategy vector \[*p*, *q*\] are initially picked up in the interval \[0, 0.5\] randomly and independently[@b17][@b26]. To evaluate the stationary state, we simulated the model for 3 × 10^4^ generations, calculated the mean value over the last 1 × 10^4^ generations, and averaged the results of 50 independent initial realizations. We confirm that runs for longer time periods did not affect the the presented results.

Author Contributions
====================

X.W., X.C. and L.W. conceived and designed the study and carried out the research. All authors contributed to writing the manuscript.

Supplementary Material {#s1}
======================

###### Supplementary Information

Supplementary Information

The authors are supported by National 973 Program (2012CB821203) and NSFC (61020106005, 61375120, 61203374 and 11161011).

![Evolution of fairness in the spatial Ultimatum Game.\
The average offer level and the average acceptance threshold of the population as a function of the parameter Λ, if local random allocation scheme is adopted. Error bars indicate the standard deviation. Other parameters: *K* = 0.1 and *ε* = 0.005.](srep04534-f1){#f1}

![Evolutionary process of characteristic spatial strategy distributions emerging for (a) Λ = 0 and (b) Λ = 1 starting from identical random initial conditions.\
(a) *t* = 1: and *σ~p~* ≈ 0.147, and *σ~q~* ≈ 0.148, and and *σ~p~*~--*q*~ ≈ 0.208. *t* = 10: and *σ~p~* ≈ 0.0828, and *σ~q~* ≈ 0.109, and and *σ~p~*~--*q*~ ≈ 0.103. *t* = 100: and *σ~p~* ≈ 0.0328, and *σ~q~* ≈ 0.0629, and and *σ~p~*~--*q*~ ≈ 0.0492. *t* = 10000: and *σ~p~* ≈ 0.0176, and *σ~q~* ≈ 0.0220, and and *σ~p~*~--*q*~ ≈ 0.0148. (b) *t* = 1: and *σ~p~* ≈ 0.147, and *σ~q~* ≈ 0.148, and and *σ~p~*~--*q*~ ≈ 0.208. *t* = 10: and *σ~p~* ≈ 0.0875, and *σ~q~* ≈ 0.110, and and *σ~p~*~--*q*~ ≈ 0.110. *t* = 100: and *σ~p~* ≈ 0.0389, and *σ~q~* ≈ 0.0637, and and *σ~p~*~--*q*~ ≈ 0.0439. *t* = 10000: and *σ~p~* ≈ 0.0165, and *σ~q~* ≈ 0.0230, and and *σ~p~*~--*q*~ \~\~ 0.0187. Other parameters: *K* = 0.1 and *ε* = 0.005.](srep04534-f2){#f2}

![Evolution of fairness in the spatial Ultimatum Game.\
The average offer level and the average acceptance threshold of the population as a function of the parameter Λ, if global random allocation scheme is adopted. Error bars indicate the standard deviation. Other parameters: *K* = 0.1 and *ε* = 0.005.](srep04534-f3){#f3}

![Schematic diagram of (a) local and (b) global random allocation scheme.\
In the diagram, the player at the end of the arrow plays as a proposer, while the one at the front of the arrow acts as a responder for each Ultimatum Game. The size of pie allocated to each Ultimatum Game is denoted at the middle of the arrow. *R~i~* (*R~j~*) is the pie to be split in one of the two Ultimatum Games played between player *i* and *j*, in which *i* (*j*) acts as the proposer and *j* (*i*) as the responder at time *t*. For both local and global random allocation scheme, the pies are randomly allocated to the Ultimatum Games. The difference lies in that the total size of pie *R~i~* + *R~j~* = 2 to be split between *i* and *j* is constant for local random allocation scheme.](srep04534-f4){#f4}
