Win-Stay-Lose-Learn Promotes Cooperation in the Spatial Prisoner's Dilemma Game

Holding on to one's strategy is natural and common if the later warrants success and satisfaction. This goes against widespread simulation practices of evolutionary games, where players frequently consider changing their strategy even though their payoffs may be marginally different than those of the other players. Inspired by this observation, we introduce an aspiration-based win-stay-lose-learn strategy updating rule into the spatial prisoner's dilemma game. The rule is simple and intuitive, foreseeing strategy changes only by dissatisfied players, who then attempt to adopt the strategy of one of their nearest neighbors, while the strategies of satisfied players are not subject to change. We find that the proposed win-stay-lose-learn rule promotes the evolution of cooperation, and it does so very robustly and independently of the initial conditions. In fact, we show that even a minute initial fraction of cooperators may be sufficient to eventually secure a highly cooperative final state. In addition to extensive simulation results that support our conclusions, we also present results obtained by means of the pair approximation of the studied game. Our findings continue the success story of related win-stay strategy updating rules, and by doing so reveal new ways of resolving the prisoner's dilemma.


Introduction
Evolutionary game theory provides a powerful mathematical framework for studying the emergence and stability of cooperation in social, economic and biological systems [1][2][3][4][5]. The prisoner's dilemma game, in particular, is frequently considered as a paradigm for studying the emergence of cooperation among selfish and unrelated individuals [6]. The outcome of the prisoner's dilemma game is governed by pairwise interactions, such that at any instance of the game two individuals, who can either cooperate or defect, play the game against each other by selecting their strategy simultaneously and without knowing what the other player has chosen. Both players receive the reward R upon mutual cooperation, but the punishment P upon mutual defection. If one player defects while the other cooperates, however, the cooperator receives the sucker's payoff S while the defector receives the temptation T~b. Since TwRwPwS, there is an innate tension between individual interests (the rational strategy, yielding an optimal outcome for the player regardless of what the other player chooses, is defection) and social welfare (for the society as a whole the optimal strategy is cooperation) that may result in the ''tragedy of the commons'' [7]. Five prominent rules for the successful evolution of cooperation, which may help avert an impeding social decline, are kin selection, direct and indirect reciprocity, network reciprocity as well as group selection, as comprehensively reviewed in [8].
Regardless of the details of mechanisms that may promote the evolution of cooperation in the spatial prisoner's dilemma game, most frequently, it was assumed that individual players learn from their neighbors to update their strategies, and that they do so more or less in every round of game. But in reality, we are much less prone to changing our strategy (see [64] and references therein). Withstanding ample trial and error, only when we feel to a sufficiently high degree unsuccessful and dissatisfied may we be tempted into altering it. Enter aspirations, which play a pivotal role in determining our satisfaction and the notion of personal success. Indeed, the subtle role of aspirations in evolutionary games has recently received a lot of attention [65][66][67][68][69][70][71][72][73], and amongst others, it was discovered that too high aspirations may act detrimental on the evolution of cooperation. This result is quite intuitive, as very high aspirations will inevitably lead players to choose defection over cooperation in order to achieve their high goals. Regardless of the level, however, aspiration provides an elegant means to define when a player is prone to changing its strategy and when not. In particular, if the performance trails behind the aspiration, then the player will likely attempt to change its strategy. On the other hand, if the performance agrees or is even better than the aspiration, then the player will not attempt to change its strategy. Here we make use of this simple and intuitive rationale to build on the seminal works that introduced and studied the win-stay-like (win-stay-lose-shift being the most prominent example) strategy updating rules [74][75][76].
In this paper, we thus introduce a so-called win-stay-lose-learn strategy updating rule as follows. When satisfied, players maintain their strategies and do not attempt to change them. When dissatisfied, however, players proceed as it is traditionally assumed, i.e., by attempting to imitate the strategy of one of their neighbors [77]. It is worth pointing out that since in evolutionary games on structured populations individuals need to interact with their neighbors for collecting payoffs, it can be assumed that such an interaction mode provides enough opportunities for players to observe the information of their neighbors (including payoffs). Nevertheless, it is difficult to pinpoint whether our model can be held accountable only for human behavior or also for animal behavior. Certainly, some level of intelligence is needed by the players to accommodate our assumptions. In the proposed model the strategy updating is thus conditional on whether the players are satisfied or not, which we determine by means of the aspiration level Aw0 that is considered as a free parameter. We note again that the majority of previous studies assumed that players will always try and adopt the strategy of one of their neighbors, even if the neighbor is performing worse, and regardless of the individual level of satisfaction. Here we depart from this somewhat simplifying assumption, and by doing so discover that the aspiration-based conditional strategy updating, termed win-staylose-learn, strongly promotes the evolution of cooperation in the spatial prisoner's dilemma game, even under very unfavorable initial conditions [78,79] and by high temptations to defect b. All the details of the proposed win-stay-lose-learn strategy updating rule and the setup of the spatial prisoner's dilemma game are described in the Methods section, while here we proceed with presenting the main results.

Results
We start by presenting the results as obtained when the cooperators and defectors are distributed uniformly at random, each thus initially occupying half of the square lattice. As the main parameters, we consider the aspiration level A and the temptation to defect b. Figure 1 shows the fraction of cooperators r C as a function of the temptation to defect b for different aspiration levels A. We find that the aspiration level has a significant influence on the density of cooperators. In particular, for small values of A, intermediate levels of cooperation are maintained, and the temptation to defect has no effect on cooperation, e.g., for A~0 and A~0:2, r C~0 :5 and r C~0 :47, respectively, irrespective of the value of b. When A is within an intermediate range, the density of cooperators increases with increasing A, however, the maximal value of b still warranting high cooperation levels becomes smaller, e.g., when A~0:4, r C~0 :7 for b[½0,1:6 and when A~0:6, r C ?1:0 for b[½0,1:2. In addition, as b increases, transitions to different stationary states can be observed for certain values of A. Notable examples occur at b~1:6 for A~0:4 and at b~1:2 for A~0:6, which will be explained below. When A~0:8, cooperation cannot evolve even if the value of b is only slightly larger than 1:0. When A~2:0, the result coincides with that for A~0:8. It is worth pointing out that, in fact, when A is large, e.g., A~2:0, individuals are always dissatisfied (as shown below), and that then our model recovers the traditional version of the prisoner's dilemma game. By comparing the results for A~2:0 and those for other values of A, as shown in Fig. 1, we find that the present updating rule can effectively facilitate the evolution of cooperation. In particular, when A §2:0, cooperators can survive only if bv1:05. By contrast, with win-stay-lose-learn updating, cooperators can not only survive but also thrive even for much larger values of b. The results obtained by means of pair approximation are presented in Fig. 1(b). It can be observed that the pair approximation can qualitatively correctly predict the cooperation level, especially for small values of A. For example, the result for A~0:0 is exactly the same as the simulation result. The transition at A~0:4 can be observed in Fig. 1(b). On the other hand, when Aw0:5, the satisfaction of individuals is increasingly difficult to achieve such that individuals tend to learn their neighbors when updating strategies, and the current model approaches the model of continuous updating [53]. Hence, there exist some differences between the results obtained by means of simulations and the pair approximation. Despite this, in general the results of the pair approximation support the main conclusions at which we arrive at by means of simulations.
In order to obtain a more complete picture about the joint effects of the aspiration level and the temptation to defect, we show the simulation results as a function of both A and b, as shown in Fig. 2. The results are consistent with those presented in Fig. 1(a), e.g., when Aƒ0:25, an intermediate level of cooperation (r C &0:5) is maintained, irrespective of the value of b. Within the interval of 0:25vAv0:5, the cooperation level is higher than that for Aƒ0:25 and the transition can be observed at a fixed value of b for each value of A. It is interesting that the highest levels of cooperation occur within the interval of 0:5ƒAv0:75. Moreover, it can be observed that as A increases, discontinuous transitions occur at A~0:0, 0:25, 0:5 and 0:75.
These transitions can be understood as follows. On a square lattice with nearest neighbor interactions, the payoffs of a cooperator and a defector are given by n 1 Rzn 2 S and n 3 Tzn 4 P, respectively, where n k [f0,1,2,3,4g, and k[f1,2,3,4g. Given that T~b, R~1, and P~S~0, the above payoffs can be simplified as n 1 and n 3 b, respectively. In our model, when an individual is dissatisfied, it will learn a randomly chosen neighbor, which may lead to the change of r C . For a cooperator, when n 1 v4A, it is dissatisfied. While for a defector, the condition for its dissatisfaction is n 3 bv4A. The phase transition points can be obtained by letting n 1~4 A and n 3 b~4A. Thus, the value of A at which phase transition occurs is given by A~n 1 =4 and that for b is given by b~(4A)=n 3 w1. Considering all the possible values of n 1 , that is n 1~0 , 1, 2, 3 and 4, we can obtain the phase transition points of A, which are A~0:0, 0:25, 0:5, 0:75 and 1:0, as shown in Fig. 2. (As a matter of fact, A~1:0 is also a phase transition point, however, because when A~1:0, the density of cooperators is very low such that the phase transition phenomenon cannot be observed). The phase transition points of b can be calculated similarly, e.g., when n 3~1 and A~0:4, the phase transition point of b is b~1:6, which is verified by our simulation (see Fig. 2).
Since the strategy changes of individual players are determined by their satisfaction, we proceed with the results on the satisfaction rates in the population as a function of b for different values of A, as shown in Fig. 3. A highly cooperative society where each member is satisfied can be declared as the ultimate goal. If all members cooperate, then the social welfare will peak. Moreover, if then every member is satisfied, the society will be stable. We find from Fig. 3 that, if we regard the present system as a social prototype, then the optimal situation occurs within the interval of b[½1:0,1:2 for A~0:6, since it leads to a highly cooperative society with a high satisfaction rate. For the extreme case of A~0:0, all individuals are satisfied. On the contrary, at the other extreme, i.e.,at A~2:0, no individual is ever satisfied. For A~0:2, even though that more than 90% of individuals are satisfied, the cooperation level is not high (r C~0 :47). This indicates that a large number of defectors are satisfied by exploiting cooperators. The obtained result for A~0:2 reveals that a society where each member has a low aspiration level cannot be cooperative due to an inherent lack of incentives. When A~0:4, the fraction of satisfied individuals drops suddenly at b~1:6. When bƒ1:6, nearly 70% of individuals cooperate and the satisfaction rate is high, which is more or less a better situation. Whereas bw1:6 results in the low cooperation level as well as the low satisfaction rate, which is a society that should be avoided. When A~0:8, few individuals in the population are satisfied such that almost all individuals seek for higher payoffs by imitation, and ultimately defection becomes the  Because initial conditions are relevant for the evolutionary success of cooperators in spatial games [78,79], it is also of interest to test the robustness of the proposed updating rule. We thus investigate how cooperation evolves under different (adverse) initial conditions, which are shown in Fig. 4. We first focus on the initial configuration of cooperators and consider the case of Fig. 4(a), where only one cooperator exists in the population initially. For Aw0, the cooperator surely resorts to defection by imitation because of his dissatisfaction. Hence, a single cooperator surrounded by defectors cannot survive Aw0. When initially there are two neighboring cooperators [see Fig. 4(b)], for Aƒ0:25, both cooperators and defectors at the boundary are satisfied such that the pattern is stable. However, when 0:25vAƒb=4, defectors are satisfied but cooperators are not. Thus, cooperators will become defectors by imitation. When Awb=4, all individuals are dissatisfied such that all of them imitate neighbors' strategies. Since defectors have a higher payoff, cooperators are more likely to become defectors. Therefore, Aƒ0:25 is needed to make cooperators survive. When there exist four cooperators in the population initially, as shown in Fig. 4(c), the pattern is frozen if Aƒb=4. However, when b=4vAƒ0:5, cooperators can have advantages over defectors such that they can invade defectors and dominate the population ultimately, as shown in Fig. 5. This indicates the relevance of our model since it allows cooperators to thrive in harsh conditions where there only exist several cooperators initially. When Aw0:5, cooperators cannot expand their territories and, at the same time, they confront the intense invasion by defectors. Eventually cooperators are wiped out from the population. In this scenario, Aƒ0:5 is needed to maintain the pattern. This indicates that greediness may be detrimental to the emergence of cooperation. The more favorable case emerges when each cooperator has three cooperative neighbors, i.e. the population is initialized with two neighboring straight lines of cooperators, as shown in Fig. 4(d). Under these circumstances, Aƒ0:75 is required for cooperators to maintain strategies, which, however, does not warrant cooperators to expand territories. In order to realize the expansion, we need Aƒ0:5. When Aw0:5, the expansion of areas of cooperators is significantly restrained, which is demonstrated in Fig. 5. One can find that in order for the boom of cooperation, cooperators must, first, form clusters, which  ensures they have advantages over defectors in terms of payoffs. Second, cooperators cannot set their aspirations too high such that their satisfactions can easily be achieved [80]. Thus, they will hold their strategies, which is the precondition for the spreading of strategies. The fulfillment of the above two conditions as well as the dissatisfaction of defectors leads to the dissemination of the cooperative strategy in the population.
Lastly, we elaborate on how cooperators can resist the invasion by defectors. For this purpose, we consider the special initial conditions depicted in Fig. 6. Focusing first on Fig. 6(a), we find that when Aw0:75, cooperators are dissatisfied, which can lead to the extinction of cooperators. The case in Fig. 6(b) is qualitatively the same, the only difference being that the payoff of each defector is 3b. In the situation where there exists a square block of four defectors [ Fig. 6(c)], when Aƒ0:75, cooperators can at least survive. If b=2vAƒ0:75 (bv1:5), cooperators can even invade the dissatisfied defectors. If bw1:5, cooperators and defectors can coexist. On the contrary, when Aw0:75, cooperators are doomed to extinction. The above analysis explains why when Aw0:75, cooperators cannot flourish. That is, as long as cooperators do not set their goals too high (too greedy), cooperators can resist the invasion of defectors [80]. If they can also have higher payoffs than neighboring defectors, as shown in Figs. 6(c) and (d), then defectors can be defeated.

Discussion
In summary, we have studied the impact of the win-stay-loselearn strategy updating rule on the evolution of cooperation in the spatial prisoner's dilemma game. Unlike in the majority of previous works, in our case the strategy updating is not unconditional, but rather it depends on the level of satisfaction of individual players. The latter is determined by the aspiration level, which we have considered as a free parameter. If the payoff of a player is equal or higher than its aspiration, it is assumed that this player is satisfied and that there is thus no immediate need of changing its strategy. Conversely, if the payoff is lower than the aspired amount, the player will attempt to adopt the strategy of one of its nearest neighbors in the hope that it will reach the desired success. With this setup, we have found that if all players retain their strategies when being satisfied then the evolution of cooperation is remarkably facilitated. Especially for intermediate values of the aspiration parameter, e.g., A~0:6, virtually complete cooperation dominance can be achieved even for values of the temptation to defect that significantly exceed 1. This is in sharp contrast to the results obtained with (too) large aspiration levels, e.g., A~2:0, where the traditional version of the spatial prisoner's dilemma game is essentially fully recovered. The presented results also indicate that as long as individuals are not too greedy, i.e., aspire to modest (honest) incomes, cooperation thrives best, which is also in agreement with recent results obtained by means of a different model [80]. Moreover, we have tested the impact of different initial configurations, in particular such where cooperators initially have an inherent disadvantage over defectors, and we have discovered that the studied win-stay-lose-learn rule ensures that cooperators are able to spread even from very small numbers. In this sense, the proposed rule is very effective in unleashing the spreading potential of cooperative behavior, which is to some extent already provided (seeded) by means of spatial reciprocity [9]. We have also employed the pair approximation method to support our simulation results with semi-analytical calculations and to explain the observed transitions to different levels of cooperation on the square lattice.
It is instructive to discuss the differences between this work and related previous works [66,67,[70][71][72][73]. For example, Chen and Wang [66] investigated a stochastic win-stay-lose-shift (WSLS) rule, under which dissatisfied individuals switch their strategies to the opposite one. It was reported that for small values of the temptation to defect cooperation can be best promoted at intermediate values of the aspiration level. Moreover, in [67] a N-person prisoner's dilemma game in a continuous population with a time-dependent aspiration level was investigated, while in [70] each individual had an aspiration-based learning motivation (which actually can depend directly on the aspiration level according to the rule of WSLS). It was reported that the results produced in [70] are similar to those in [66]. In [72] a payoffbased preferential learning mechanism was investigated (where individuals with higher payoffs are more likely to be imitated), and in [73] an aspiration-based preferential learning mechanism was studied where an individual whose strategy can provide the desired payoff when being imitated will be imitated also in the next round. In our model, however, we incorporate individual aspirations into the traditional imitation rule, and investigate how cooperation evolves under the aspiration-based conditional learning in the spatial prisoner's dilemma game. The proposed rule is simple and reasonable, and moreover, we show that it is effective and robust in promoting cooperation. In particular, cooperation can be maintained (and can even thrive) even under unfavorable initial conditions.
Our work also has some parallels with other models not necessarily incorporating aspirations. Namely, the model introduced recently in [81], where inertia was considered as something that can disable players to actively change their strategies, or with the early win-stay-lose-shift models [74][75][76]. Furthermore, it is possible to relate our work to those considering the importance of time scales in evolutionary games [44,45,47]. Note that under the presently introduced win-stay-lose-learn rule, for small values of A, the strategy transfers are rare and far apart in time. This has similar consequences as when decreasing the strategy-selection rate [47]. For intermediate aspiration levels, however, we essentially have a segregated population if judging from individual satisfaction, i.e., some players are satisfied while others are not. This in turn implies that different players have different strategyselection time scales. Even more importantly, these time scales are adaptive (they change over time), as players that eventually do change their strategies may go from being dissatisfied to becoming satisfied, or vice versa. In this sense, our model introduces different evolutionary time scales by means of aspiration, which is an endogenous property of individuals, and in so doing, it also relaxes the demand for their (the players') rationality. Note that in our model, there is frequently no need to compare payoffs with the neighbors, apart from when approaching the A?2 limit. Lastly, we hope that this study will enrich our knowledge on how to successfully resolve the prisoner's dilemma, and we hope it will inspire further work along this very interesting and vibrant avenue of research.

Methods
The spatial prisoner's dilemma game is staged on a square lattice of size L|L with periodic boundary conditions. In accordance with common practice [9], the payoffs are as follows: T~b is the temptation to defect, R~1 is the reward for mutual cooperation, while P~S~0 are the punishment for mutual defection and the sucker's payoff, respectively, where 1vbv2. Although this formulation of the game has P~S rather than PwS, it captures succinctly the essential social dilemma, and accordingly, the presented results can be considered fully relevant and without loss of generality with respect to more elaborated formulations of the payoffs. Moreover, each player i has an aspiration level A i~ki A, where k i is the player's degree and A is a free parameter that determines the overall aspiration level of the population, which is typically constrained to the interval 0vAvb. Since we consider the square lattice as the interaction network, we have k i~k~4 , which in turn postulates that each player in this study has an equal aspiration equal to kA.
Player i acquires its payoff P i by playing the game with its four nearest neighbors. A randomly selected nearest neighbor j acquires its payoff P j likewise by playing the game with its four nearest neighbors. If P i §A i , i.e., if the payoff of player i is equal or higher than its aspiration, then strategy adoption from player j is not attempted. If, however, P i vA i , then player i adopts the strategy of player j with the probability where k determines the amplitude of noise [33], accounting for imperfect information and errors in decision making. It is wellknown that there exists an optimal intermediate value of k at which the evolution of cooperation is most successful [34,35], yet in general the outcome of the prisoner's dilemma game is robust to variations of k. Without much loss of generality, we use k~0:1, meaning that it is very likely that the better performing players will pass their strategy to other players, yet it is not impossible that players will occasionally learn also from the less successful neighbors. The simulations of this spatial prisoner's dilemma game were performed by means of a synchronous updating rule, using L~100 to 400 system size and discarding the transient times prior to reaching the stationary states before recording the average fraction of cooperators r C in the population. We have verified that the presented results are robust to variations of the system size, and to the variation of the simulation procedure (e.g., by using random rather than synchronous updating). It is also worth noting that because Avb and bv2, the present definition of the win-staylose-learn transforms to the traditional spatial prisoner's dilemma game when A §2:0, given that then individual cannot be satisfied and thus attempt to change their strategy whenever they receive a chance to do so. In addition to the simulation results of the proposed spatial game, we also present the results of pair approximation [53,[82][83][84][85] that are obtained with the rate equations of cooperator-cooperator (c,c) and cooperator-defector (c,d) edges, which are as follows: where x,y,z are either cooperators or defectors and n c (x,y,z) denote the number of cooperators among x,y,z. Moreover, where P i and P j are the payoffs of the two neighboring players i and j, respectively, and A i is the payoff aspiration of player i (equal to Ak for all i). By performing the numerical integration for the above two differential equations (2,3), and by using p c,d~pd,c and p c,c zp c,d zp d,c zp d,d~1 , we can obtain r C from p c,c zp c,d .