Emergence of Cooperation in the thermodynamic limit
Colin Benjamin Shubhayan Sarkar

Spontaneous motion of localized structures induced by parity symmetry transition
     M. Tlidi
    December 30, 2023
================================================================================


Predicting how cooperative behavior arises in the thermodynamic limit is one of the outstanding problems in evolutionary game theory. For two player games, cooperation is seldom the Nash equilibrium. However, in the thermodynamic limit cooperation is the natural recourse regardless of whether we are dealing with humans or animals. In this work, we use the analogy with the Ising model to predict how cooperation arises in the thermodynamic limit.

Keywords: Nash equilibrium; Prisoner's dilemma; game of Chicken; Ising model

PACS numbers: 02.50.Le; 87.23.Kg; 01.80.+b; 05.50.+q


§ INTRODUCTION

The solution to any game theoretic problem involves finding an equilibrium strategy known as the Nash equilibrium, whence deviating from this strategy brings in more loss to the player. An introduction to Nash equilibrium for two player two strategy games can be found in Ref. <cit.>. Finding the Nash equilibrium analytically for a two player game isn't difficult, however, many a situation arises wherein one needs to go beyond two players. To analyze such situations in a game theoretic setting one needs to go beyond two players to a game with infinite number of players, i.e., the thermodynamic limit. A particularly interesting problem arises in the context of evolution, where we see that cooperation arises even when defection is the preferred choice of individuals, see Ref. <cit.>. Game theory is inextricably linked with artificial intelligence. The problem of many or infinite number of agents collaborating is an outstanding problem not just in  game theory but in artificial intelligence too<cit.>. Cooperation in short term might not seem beneficial however, in the long run the population which cooperates survives. This scenario is generally tackled numerically and dynamically using replicator equations as has been shown in Refs. <cit.>. Further, in Ref. <cit.> the authors use the replicator equations to numerically calculate how the fraction of cooperators and defectors evolve in time when playing the Prisoner's dilemma game. The evolution of cooperators and defectors is not just restricted to Prisoner's dilemma, this has also been observed in context of social dilemmas like the Vaccination game, in Refs. <cit.>. The Vaccination game, which is a tool to monitor public health, is essentially a variation of the Prisoner's dilemma wherein instead of coooperators and defectors one has immunizers and anti-immunizers. In this paper, on the other hand, we use statistical mechanics tools to analytically predict whether and how cooperation emerges in the thermodynamic limit and this is one of the main attractions of our work. An approach has also been suggested by  Szabo and Borsos by constructing potentials corresponding to particular games and then comparing with models borrowed from statistical mechanics.  However, our approach is analytical and mathematically much more simpler than the method of Szabo and Borsos, see Ref. <cit.>. This is an interesting topic for evolutionary game theory and useful application of artificial intelligence, as any ecosystem tends to evolve towards an equilibrium with a large number of living beings. We show that 1D statistical models can correctly be applied to such social dilemmas.

Using the analogy with the 1D Ising model, we try to understand the equilibrium strategy in a population and predict how cooperative behavior emerges in the thermodynamic limit. We model a situation similar to 1D Ising model, where the sites are replaced by players and spin up or spin down correspond to the strategies s_1 or s_2 adopted by the players. Magnetization in Ising model is defined as the difference in the number of spin up and spin down particles. Similarly, Magnetization in game theory can be defined as the difference in the number of players choosing strategy s_1 or s_2. We first relate the Ising model to the payoff's in game theory and then apply this method first to Prisoner's dilemma and then to game of Chicken (variant of Hawk-Dove game). There have been earlier attempts to use the 1D Ising model to find the equilibrium strategy in the thermodynamic limit, see Ref. <cit.>. We find that there are some unphysical implications of the results of Ref. <cit.>. This paper is organized as follows-we next discuss how to connect the 1D Ising model to the payoffs of game theory by extending the analogy of Ref. <cit.> to the thermodynamic limit, then  we calculate the game magnetization which gives the Nash equilibrium strategy for Prisoner's dilemma in the thermodynamic limit. We observe how cooperators arise in Prisoner's dilemma in the thermodynamic limit even when defection is the Nash equilibrium. Further, we deal with the problems associated with the model of Ref. <cit.> in brief. Later we do a similar analysis for the game of Chicken which has no unique pure strategy Nash equilibrium in the two player case. We find how in the thermodynamic limit majority of cooperators can emerge. We end with the conclusions.



§ 1D ISING MODEL AND GAME THEORY

There have been several works which have found it useful to explain the behavior in social dilemmas by looking at 1D models like the 1D Ising model,  see  Ref. <cit.> wherein the equivalence between the voter model and 1D Ising model has been brought out. Further, the 1D Sznajd model has been used as a template to explain spreading of opinion in a society, see Ref. <cit.>. These are just two examples which have used 1D Ising models to model social dilemmas, many others also do exist, see Ref. <cit.> for more examples.
The most well known among such models is the 1D Ising model<cit.> which consists of spins that can be in either of the two states +1 (↑)  or -1 (↓). The spins are arranged in a line, and can only interact with their nearest neighbors. The Hamiltonian of such a system can be written as-

    H=-J∑^N_i=1σ_iσ_i+1-h∑^N_i=1σ_i,

where J is the coupling between the spins, h is the external magnetic field and σ's denote the spin. The partition function corresponding to the Hamiltonian (<ref>) is

    Z=∑_σ_1...∑_σ_Ne^β(J∑^N_i=1σ_iσ_i+1+h/2∑^N_i=1(σ_i+σ_i+1)),

β=1/k_B T, with k_B being Boltzmann's constant. σ_i denotes either the spin up (+1) or spin down (-1). In order to carry out the spin sum, we define a matrix T with elements as follows,

    <σ|T|σ'>   =    e^β(Jσσ'+h/2(σ+σ')).

Using the transfer matrix T and carrying out the spin sum via the completeness relation, the partition function from Eq. (<ref>) in the large N limit can be written as-

    Z=e^Nβ J(cosh(β h)±√(sinh^2(β h)+e^-4β J))^N.

Since the Free energy F=-k_BT ln Z, the magnetization is

    m=-dF/dh=sinh(β h)/√(sinh^2(β h)+e^-4β J).

In Fig. <ref>, we plot the magnetization versus external magnetic field h for different values of inverse temperature(β).

In Ref. [<cit.>], it has been shown that a one-to-one correspondence can be made between 1D Ising model Hamiltonian and the payoff matrix for a particular game. We first look at a general payoff matrix for two player game and try to understand the methodology,

    U=([  s_1  s_2;  s_1 a,a' b,b';  s_2 c,c' d,d' ]),
 
where U(s_i,s_j) is the payoff function with a, b, c, d as the payoffs for row player and a', b', c', d' are the payoffs for column player, s_1 and s_2 denote the strategies adopted by the two players. The Nash equilibrium as defined before is the strategy, deviating from which brings loss to the players. For the payoff's defined in Eq. (<ref>), the Nash equilibrium, in case one takes the condition of a symmetric game, i.e., b'=c, c=b' and a=a', b=b' with c<d<a<b, is the strategy (s_2,s_2). To make a one-to-one correspondence of the game payoff's with Ising model we need a set of transformations to the payoff's which will achieve that.  The transformations of payoffs of the players are as follows:

    U=([                   s_1        s_2;        s_1  a+λ,a'+λ' b+μ, b'+λ';        s_2  c+λ,c'+μ' d+μ, d'+μ' ]).
 
 We choose the transformations as λ=-a+c/2,λ'=-a'+b'/2 and μ=-b+d/2,μ'=-c'+d'/2. Under such a transformation the Nash equilibrium doesn't change (see Supplementary material section 1.2 for more details where we prove this result using fixed point analysis, see also Ref. <cit.>).  Since Ising model Hamiltonian considered above (<ref>), assumes that the coupling J is symmetric, thus to model the game (<ref>) using Ising model we must consider only symmetric games, i.e., a=a', b=c', c=b' and d=d'. 
After imposing the above conditions the transformed payoff matrix from (<ref>) becomes-

    U=([                     s_1         s_2;         s_1 a-c/2,a-c/2 b-d/2,c-a/2;         s_2 c-a/2,b-d/2 d-b/2,d-b/2 ]).
 

To calculate the Nash equilibrium of a generalised two player game in the thermodynamic limit, we have to relate the transformed payoff matrix of the classical game as in Eq. (<ref>) to the Ising model Hamiltonian with two spins. When N=2, the Hamiltonian Eq. (<ref>) can be written as-

    H=-J(σ_1σ_2+σ_2σ_1)-h(σ_1+σ_2)

So the individual energies of the spins 1 and 2 can be written as: 

    E_1=-Jσ_1σ_2-hσ_1,
    E_2=-Jσ_2σ_1-hσ_2.

It is to be noted that equilibrium in Ising model corresponds to minimizing the energies of spins. Now for symmetric coupling as in Eq.'s (<ref>,<ref>) minimizing Hamiltonian H with respect to spins σ_1, σ_2 is same as maximizing -H with respect to σ_1, σ_2. In game theory, on the other hand players search for the Nash equilibrium with maximum payoffs. This implies maximizing the payoff function U in Eqs (<ref>-<ref>) with respect to strategies s_i,s_j which for the two player Ising model is equivalent to maximizing -E_i, see Eq. (<ref>) with respect to spins σ_i,σ_j. Thus, the Ising game matrix can be written as-

    E=([              σ_2=+1    σ_2=-1;    σ_1=+1   J+h,J+h  -J+h,J-h;    σ_1=-1  J-h,-J+h -J-h,-J-h ]).

Comparing the matrix elements of the transformed payoff matrix- Eq. (<ref>) to the Ising game matrix Eq. (<ref>), we get the relation between parameters of Ising model (J and h) and the payoffs of two player game as- 

    J=a-c+d-b/4, h=a-c+b-d/4.
 
Substituting J and h in terms of payoff's in the equation for magnetization(<ref>), gives us the game magnetization (m_g), defined as the fraction of player's choosing strategy s_1 over s_2 in the thermodynamic limit-

    m_g=-df/dh=sinh(β h)/√(sinh^2(β h)+e^-4β J)=sinh(βa-c+b-d/4)/√(sinh^2(βa-c+b-d/4)+e^-4βa-c+d-b/4).

This completes the connection of the payoffs from a two player game to Ising model relating spins in the thermodynamic limit. β in Ising model is the inverse temperature. Decreasing  β or increasing temperature leads to randomness in spin orientation. Thus, as β→ 0 then game magnetization vanishes, see (<ref>), due to increase in randomness in the strategic choices of the players. In the following sections we will apply this to some famous two player games so as to analyze them in the thermodynamic limit. Note that this approach can't be compared to Nowak's approach as in contrast to replicator equations, the above suggested approach is not dynamical but completely analytical. However, in the next section we qualitatively compare our results with the conclusions presented in Refs. <cit.>. 


§ PRISONER'S DILEMMA

In this game, the police are questioning two suspects in separate cells. Each has two choices: to cooperate with each other and not confess the crime (C), or defect to the police and betray each other(D). We construct the Prisoner's dilemma payoff matrix by taking the matrix elements from Eq. (<ref>) as a=r, d=p, b=s and c=t, with t>r>p>s where r is the reward, t is the temptation, s is the sucker's payoff and p is the punishment. Thus, the payoff matrix is- 

    U=([       C   D;   C r,r s,t;   D t,s p,p ]).
 
The values in the payoff matrix can be explained as follows- reward r means 1 year in jail while punishment p means 10 years in jail, sucker's payoff s represents a life sentence while temptation t implies no jail time. Independent of the other suspects choice, one can improve his own position by defecting. Therefore, the Nash equilibrium in this case is to defect. Following on from the calculations for the general two player game as in Eq. (<ref>) and Eq. (<ref>) as applied to Prisoners dilemma game matrix Eq. (<ref>), we get-
J=r-t+p-s/4 and h=r+s-t-p/4. From Ising model, the game magnetization(m_g) in the thermodynamic limit Eq. (<ref>) is-

    m_g=sinh(βr+s-p-t/4)/√(sinh^2(βr+s-t-p/4)+e^-β (r-t+p-s)).
 

Plotting game magnetization as in Eq. (<ref>) as function of punishment, with the condition: s<p<r, we see in the thermodynamic limit the Nash equilibrium is always the defect strategy. A phase transition would occur only if p<r+s-t which is not possible as the Prisoner's dilemma has the condition: p>s and t>r. When β decreases, game magnetization decreases, which implies that number of cooperators increases. As β→ 0, m_g→ 0, implying equal number of cooperators and defectors. At finite and large β as seen from Fig. <ref>, in the thermodynamic limit for p>1.5 almost all are defectors. However, in the range 0<p<1.5 there is a decrease in the number of defectors so much so that around p=.5,  25 % of the population tend to cooperate for β=1.0. From the numerical calculations presented in Ref. <cit.>, we also see that the number of defectors always remains a majority and the number of cooperators in any particular generation increases if the reward increases which is similar to the results presented above. Further, in Ref. <cit.> it is shown that in the iterative Prisoner's dilemma with finite number of players cooperation can become Nash equilibrium if tit for tat scheme is allowed for some fraction of population but not the entire population. In Ref. <cit.>, the thermodynamic limit is not diretly dealt with however, they infer via natural selection that for the iterative Prisoner's Dilemma the Nash equilibrium would be everyone defecting. Contrary to this we show that even if defection is the Nash equilibrium in the thermodynamic limit there still exist a finite minority of cooperators which too increase as the reward increases. Thus, our results show that even in the thermodynamic limit of Prisoner's dilemma cooperation emerges. In the next section we approach this problem via the method proposed in Ref. <cit.> and unravel some deficiencies in the method of Ref. <cit.>. 


 §.§ Problems with the approach of Ref. <cit.>

The connection between Ising model and game theory as shown above is not the only approach available. In Ref. <cit.> too, it has been shown that in the thermodynamic limit games can be modeled using 1D Ising model. However, when one analyses the Prisoner's dilemma game using the approach of Ref. <cit.>, the results are not compatible with the basic tenets of the game for some cases, as shown below.


  §.§.§  When reward r approaches temptation b:
 We start with payoff matrix(<ref>) used in Ref. <cit.>, to describe Prisoner's dilemma- 

    U=([         C    D;    C  r,r -c,b;    D b,-c  0,0 ]).

where r=b-c, with b>r>0 and b>c>0. Eq. (<ref>) is the payoff matrix used in Ref. <cit.>. This is similar to Eq. (<ref>) with payoffs for reward as r, temptation as b, sucker's payoff as -c and punishment  as 0 with the condition r=b-c. The game magnetization as derived in Ref. <cit.> is given as- 

    m_g= e^-β r-1/(1+e^-β r).

This game magnetization is independent of temptation b unlike that derived in Eq. (<ref>) using our approach. Although in Ref. [<cit.>] it has been shown that for all values of reward r, the dominant choice is to defect but this is not true in the limiting case when r approaches b. We analyze the same situation using the payoff matrix of the Prisoner's dilemma-

    U=([       C   D;   C b,b 0,b;   D b,0 0,0 ]).

In Eq. (<ref>), we see an inconsistency, when reward r equals the temptation b, there is no unique Nash equilibrium, i.e., both strategies cooperation and defection are equiprobable. The players can equally choose between cooperation and defection and hence game Magnetization m_g should be 0. However, from Ref. [<cit.>] the game magnetization (<ref>) is negative (see Fig. <ref> inset) which means that defect is the Nash equilibrium which is not correct. 


  §.§.§  The reward r approaches 0:
 Another situation where Ref. [<cit.>]'s results are negated is when r=0, m_g tends to 0 as in Eq. (<ref>) implying equal number of cooperators and defectors. However, when we look at the payoff matrix Eq. (<ref>) for r=0, we have-

    U=([         C    D;    C  0,0 -b,b;    D b,-b  0,0 ]),
 
one can see defect (D,D) is still the Nash equilibrium. Using our approach, see the calculations as done in Eqs. (<ref>)-(<ref>) and using payoff matrix (<ref>) we get the game magnetization as m_g=tanh(βr-b/2) where we have substituted t=b,s=-c,p=0 with the condition r=b-c in Eq. (<ref>). In Fig. <ref> one sees m_g→ -1 as r→ 0, which is the correct result using our approach. In inset of Fig. <ref>, the game magnetization using the approach of Ref. [<cit.>] however tends to 0 which is obviously incorrect.

From Fig. <ref> as reward r approaches temptation b, game magnetization m_g→ 0. Further, when reward r approaches 0, game magnetization m_g→ -1. Our approach corrects the problems in Ref. <cit.> in the limiting cases when r→ 0 and r → b. This is also elaborately dealt with in Ref. <cit.> along with the case of Public goods game with and without punishment. In the supplementary material accompanying this article we deal elaborately with the reasons behind the problems in approach of Ref. <cit.>.
 Next, we extend this approach to the game of Chicken.


§  GAME OF CHICKEN
 The name “Chicken" has its origins in a game in which two teenagers drive their vehicles towards each other at high speeds<cit.>. Each has two strategies: one is to swerve and the other is going straight. If one teenager swerves and the other drives straight, then the one who swerved will be called a "Chicken" or coward. “Hawk-Dove" game, on the other hand refers to a situation in which players compete for a shared resource and can choose either mediate (Dove strategy) or fight for the resource (Hawk strategy). The parameterized payoff matrix from Eq. (<ref>) by taking a=-s, b=r, c=-r and d=0 for the game of Chicken is given by-

    U=([          straight   swerve; straight    -s,-s     r,-r;   swerve     -r,r      0,0 ]),
 
where “r" denotes the reputation and “s" denotes the cost of injury and s>r>0. If one teen swerves before the other, then the one who drives straight gains in reputation while the other loses reputation. However, if both drive straight, there is a crash, and both are injured. There are two pure strategy Nash equilibriums (straight, swerve) and (swerve, straight). Each gives a payoff of r to one player and -r to the other. There is another mixed strategy Nash equilibrium given by (σ,σ), where [σ = p.straight+(1-p).swerve] where p=r/s (p is the probability to choose straight). In “Hawk-dove" the reputation from game of “Chicken" is replaced by the value of resource and the cost of injury doesn't change. Similar to game of “Chicken", the Hawk-Dove game has two pure strategy Nash equilibrium: (Hawk, Dove) and (Dove, Hawk) and a mixed strategy Nash equilibrium (σ,σ): [σ = p.Hawk +(1-p).Dove]. Thus, from a game-theoretic point of view, “Chicken" and “Hawk-Dove" are identical. 

We analyze the game of Chicken in the thermodynamic limit. Following on from the calculations for the general two player game as in Eq. (4) and Eq. (10) as applied to the game of Chicken payoff's in Eq. (<ref>) we get J=-s/4 and h=2r-s/4. Thus, in the thermodynamic limit of the game of Chicken the game magnetization is-

    m_g=sinh(β h)/√(sinh^2(β h)+e^-4β J)=sinh(β2r-s/4)/√(sinh^2(β2r-s/4)+e^β s).
 
From Eq. (<ref>), the condition for change of sign in “m_g" is given by-

    sinh(β2r-s/4)/√(sinh^2(β2r-s/4)+e^β s)=0
     s=2r.
 
Plotting game magnetization m_g as in Eq. (<ref>), we see from Fig. <ref> that as the reputation r increases more than s/2, more players choose straight as choosing swerve would bring in more loss to one's reputation. Similarly, when r<s/2 then players would rather choose to swerve and not get injured. Further, it should be noted from Eq. (<ref>) that as the cost of injury increases (see inset of  Fig. <ref>), the game magnetization becomes more positive implying that more players choose to swerve or cooperate. 


§ DISCUSSION AND CONCLUSIONS

Since game of Chicken and Hawk-Dove game are equivalent in game theory, it can be inferred from the above results that for Hawk-Dove game as the value of resource increases keeping the cost of injury constant, then more fraction of players choose the Hawk strategy (defect) or fight for the resource. Further, when the cost of injury increases then the players are reluctant to fight for the resource as getting injured is more expensive. Thus, larger fraction of players end up choosing Dove strategy(cooperate), i.e., sharing the resource when cost of injury is high. Contrary to the notion as in two player games that the players would always opt for the Nash equilibrium strategy, in the thermodynamic limit this is not true. In the thermodynamic limit our results show that a larger fraction of the players would choose the Nash equilibrium strategy but not every player. For example, when the temptation decreases in Prisoner's dilemma the fraction of cooperators increases even when the Nash equilibrium is to defect. A natural extension in the thermodynamic limit would be that every player would choose to defect as Nash equilibrium for the two player case is (D, D) however, there is a finite fraction of players who choose cooperation which increases as the temptation (t) decreases. Further, we see in game of Chicken that even if the reputation becomes high still there is a small fraction of players who choose to swerve(cooperate) and lose. This shows that in the thermodynamic limit cooperation does emerge even when defection would be the preferred choice of the individual players. Again, we see in Prisoner's dilemma that in thermodynamic limit slightly reducing  punishment below r/3 where r is the reward increases the fraction of cooperators by a large amount even when the Nash equilibrium is to defect. Even in game of “Chicken", when cost of injury is low the best choice for the players is to choose straight or defect. However, we find that still there exist a large fraction of players who choose to swerve or cooperate. In related works, see Refs. <cit.>, we extend our model of predicting cooperative behavior in the thermodynamic limit to the quantum regime.


§ APPENDIX

In this supplementary material we first detail the reasons for error in the approach of Adami and Hintze, Ref. [<cit.>] and then we show how these errors are not seen in our approach. We also prove that the Nash equilibrium is invariant under transformations we use in our approach. 


 §.§ Reasons for error in approach of Ref. [1]

The main reason for the error in Ref. <cit.>, is that the maximization of the payoffs doesn't take into account the choice of the neighbouring players and occurs only over the payoffs of the individual player. Here, we find the payoffs for just the two player case of any general game using first the approach of Ref. <cit.> and then using our approach as well. We show that the approach of Ref. <cit.> gives incorrect average payoff implying that the maximization scheme used in Ref. <cit.> is not correct. In contrast our approach gives correct average payoff.


  §.§.§ Mapping Ising model and payoffs, approach of Ref. [1]

Let's consider a two spin system, and find the average payoff. The Hamiltonian for a 2-spin system is defined using the approach and notation of Ref. <cit.> as- 

    H=∑_m,n=0,1U_mnP_m^(1)⊗ P_n^(2)+∑_m,n=0,1U_nmP_m^(2)⊗ P_n^(1)

The above equation is Eq. (2) of Ref. <cit.> for N=2. U_mn represents the element of the payoff matrix U for the m^th row and n^th column. The P's represents projectors similar to the σ's in the Ising model Hamiltonian (Eq. (1) of our manuscript) and P_0^(1)=|0⟩⟨ 0| and P_1^(1)=|1⟩⟨ 1|. 
P_m^(1) defines the projector of site (1) with m either 0 (meaning  P_1^(1)= |0⟩⟨0|) or if at site (1) again with m being 1 then  P_1^(1)=|1⟩⟨ 1|. Similarly P_m^(2)  defines the projector of site (2) with m taking values 0 or 1.  m, n denote the indices for strategy which for 0 denotes  cooperation while when 1 denotes defection. 
Expanding the Hamiltonian Eq. (<ref>) gives,

    H   =   U_00P_0^(1)⊗ P_0^(2)+ U_01P_0^(1)⊗ P_1^(2)+U_10P_1^(1)⊗ P_0^(2)+
    U_11P_1^(1)⊗ P_1^(2)
           +U_00P_0^(2)⊗ P_0^(1)+ U_01P_1^(2)⊗ P_0^(1)+ 
    U_10P_0^(2)⊗ P_1^(1)+ U_11P_1^(2)⊗ P_1^(1)
       =    2U_00P_0^(1)⊗ P_0^(2)+(U_01+U_10)P_0^(1)⊗ P_1^(2)+(U_10+U_01)P_1^(1)⊗ P_0^(2)+2U_11P_1^(1)⊗ P_1^(2).

The state of the two spin system can written as- |x⟩=|m_1m_2⟩. |m_1⟩  (|m_2⟩) represent the state of the first (second) spin which can either be |0⟩ or |1⟩.  Thus, the partition function for the two spin system is-

    Z=Tr(e^-β H)   =   ∑_x⟨ x|e^-β H|x⟩=∑_m_1,m_2=1,2⟨ m_1m_2|(1-β H+(β H)^2/2!...)|m_1m_2⟩, 
       =    1-∑_m_1,m_2=1,2β⟨ m_1m_2|H|m_1m_2⟩ +∑_m_1,m_2=1,2β/2!⟨ m_1m_2|H^2|m_1m_2⟩+....
 
Since P_m^(1)=|m_1><m_1| and P_m^(2)=|m_2><m_2|, we have H|m_1m_2>= (U_m_1m_2+U_m_2m_1)|m_1m_2>. Thus,

    ⟨ m_1m_2|H|m_1m_2⟩   =    U_m_1m_2+U_m_2m_1,
    ⟨ m_1m_2|H^2|m_1m_2⟩   =   ( U_m_1m_2+U_m_2m_1)⟨ m_1m_2|H|m_1m_2⟩=(U_m_1m_2+U_m_2m_1)^2.

Therefore, from Eq. (<ref>) we have-

    Z   =   ∑_m_1,m_2=1,2[1-β(U_m_1m_2+U_m_2m_1)+β^2/2!(U_m_1m_2+U_m_2m_1)^2+....],
    Z   =   ∑_m_1,m_2=1,2e^-β( U_m_1m_2+U_m_2m_1)= e^-2β U_00+e^-β (U_01+U_10)+e^-β (U_10+U_01)+e^-2β U_11.

The payoff matrix (see page 2, of Ref. <cit.>) obeys the condition- U_01+U_10=U_00+U_11. 
Now for a general payoff matrix for a symmetric game-

    U=([     s_1 s_2; s_1 a,a b,c; s_2 c,b d,d ])
 
wherein U_00=a, U_01=b, U_10=c, U_11=d, with the condition a+d=b+c, we have

    Z=(e^-β U_00+e^-β U_11)^2=(e^-β a+e^-β d)^2.

The average payoff's can be found then by minimizing the Free energy in the no noise limit(zero temperature), i.e., β→∞, the average payoff using approach of Ref. [<cit.>] is then-

    ⟨ E⟩=-∂ln Z/∂β=-2∂ln(e^-β d+e^-β a)/∂β=2(de^-2β d+ae^-β a)/(e^-β d+e^-β a)

in the limit β→∞, the payoff for each player(dividing  ⟨ E⟩ by 2) becomes-

    lim_β→∞⟨ E⟩=lim_β→∞(de^-β d+ae^-β a)/(e^-β d+e^-β a)

Let's consider two cases and check whether it gives the correct average payoff.


  * For a>c, d<b a possibility exists such that  a>c>b>d. The Nash equilibrium for such a payoff matrix is the strategy (s_1,s_1). However, from Eq. (<ref>), we get-

    lim_β→∞⟨ E⟩=lim_β→∞(ae^-β a+de^-β d)/(e^-β a+e^-β d)=d

which is the payoff of strategy (s_2,s_2). An incorrect conclusion.

  * For a<c, d>b a possibility exists such that  d>b>c>a. The Nash equilibrium for such a payoff matrix is the strategy (s_2,s_2). However, from Eq. (<ref>), we get-

    lim_β→∞⟨ E⟩=lim_β→∞(ae^-β a+de^-β d)/(e^-β a+e^-β d)=a


which is the payoff of the strategy (s_1,s_1). Thus, we have shown that even in the two player case, the approach of Ref. [<cit.>] gives incorrect average payoff. Now, lets check the average payoff calculation using our approach.


  §.§.§ Mapping Ising model and payoffs, using our approach

 For two spin case the Hamiltonian from Eq. (1) is,

    H=-J(σ_1σ_2+σ_2σ_1)-h/2(σ_1+σ_2).

The partition function is given by-

    Z=∑_σ_1,σ_2 e^β(J(σ_1σ_2+σ_2σ_1)+h/2(σ_1+σ_2))=e^β(2J+h)+2e^-β(2J)+e^β(2J-h).

As derived in manuscript Eq. (10) of the main manuscript, for any general game J=a-c+d-b/4 and h=a-c+b-d/4. Putting the condition from Ref. <cit.>, a+d=b+c- we get J=0 and h=a-c/2. Thus, we have Z=e^β(h)+2+e^-β(h).  The average payoff for 2 player case is then-

    ⟨ E⟩=-∂ln Z/∂β=-∂ln(e^β(h)+2+e^-β(h)))/∂β=-he^β(h)+he^-β(h)/e^β(h)+2+e^-β(h)

 However, unlike the approach of Ref. <cit.> which equates directly the energies to payoffs, in our approach while energies are minimized to find the equilibrium (point of lowest energy or ground state) the payoffs are maximized, meaning the payoffs should be taken as -E as for game we intend to maximize the payoffs (whereas, Ising model aims to minimize the energies). The philosophy behind this is that in game theory players search for a Nash equilibrium with maximum payoff's. Thus one aims to maximize payoff's with respect to strategies (s_1,s_2) which implies maximizing -E. Now, let's take two cases and see whether this gives the correct average payoff.


  * For a>c, d<b a possibility exists such that  a>c>b>d. From game theory the Nash equilibrium is the strategy s_1. Using our approach from Eq. (<ref>), for a>c  and as h=a-c/2 we get h>0. Thus, 

    lim_β→∞-⟨ E⟩=lim_β→∞he^β(h)-he^-β(h)/e^β(h)+2+e^-β(h)=h=a-c/2

which is the payoff of the strategy (s_1,s_1) from the payoff matrices, see Eqs. (5,6).

  * For a<c, d>b a possibility exists such that  d>b>c>a. From game theory the Nash equilibrium is the strategy s_2. Using our approach from Eq. (<ref>), for a<c and as h=a-c/2, we get h<0. Thus,

    lim_β→∞-⟨ E⟩=lim_β→∞he^β(h)-he^-β(h)/e^β(h)+2+e^-β(h)=-h=c-a/2=d-b/2.

which is the payoff of the strategy (s_2,s_2) from the payoff matrices, see Eqs. (5,6).

Thus, our approach gives the correct payoffs corresponding to the Nash equilibrium strategies.

An essay by P Ralegankar, Understanding Emergence of Cooperation using tools from Thermodynamics, available at:
 http://guava.physics.uiuc.edu/ nigel/courses/569/Essays_Spring2018/Files/Ralegankar.pdf 


also comes to similar conclusions.
 

 §.§ Invariance of Nash equilibrium under transformations of Eq. (6) in main manuscript

Let's take the generalised game theory payoff matrix for two player games

    E=([       s_1  s_2;  s_1 a,a' b,b';  s_2 c,c' d,d' ]).
 
Transforming the elements of the payoff matrix by adding a factor λ to column 1 and μ to column 2 for row player's payoffs and adding a factor λ' to row 1 and μ' to row 2 for column player's payoffs   we get:

    U=([                   s_1        s_2;        s_1  a+λ,a'+λ' b+μ, b'+λ';        s_2  c+λ,c'+μ' d+μ, d'+μ' ]).
 
Herein, we give a simple proof that under such transformations the Nash equilibrium remains invariant using fixed point analysis. A fixed point is a point on the coordinate space which maps a function to the coordinate. For a two dimensional coordinate space, a fixed point of a function f(x,y) is mathematically defined as (x,y), see Ref. <cit.> such that-

    f(x,y)=(x,y).

From Brouwer's fixed point theorem it is known that a 2D triangle Δ_2 has a fixed point property. This implies that any function which defines all the points inside a 2D triangle has a fixed point (for a detailed proof of this theorem refer to<cit.>). Also the probabilities for choosing a strategy, represents points inside a square of side length 1. Thus
S_2,2=(x,y) with 0<x<1 and 0<y<1, where x represents the probability of choosing a strategy by row player and y represents the probability of choosing a strategy by column player. It can shown that a triangle and a square are topologically equivalent<cit.>, and this implies that if a triangle has a fixed point property, so does a square. So a function is constructed such that it represents all the points inside the square. To construct the function<cit.>, a vector with coordinates (u_1, u_2) and another vector with coordinate (v_1, v_2) are defined as follows-

    ([ u_1; u_2 ])=A ([   y; 1-y ]),

and

    ([ v_1 v_2 ])= ([   x 1-x ])B,

where x and y are the probabilities to choose a particular strategy. A and B denote the respective payoff matrix for row player and column player. Using this, the fixed point function from Eq. (<ref>) is given by

    f(x,y)=(x+(u_1-u_2)^+/1+|u_1-u_2|,y+(v_1-v_2)^+/1+|v_1-v_2|),

where (u_1-u_2)^+=u_1-u_2+|u_1-u_2|/2 and (v_1-v_2)^+=v_1-v_2+|v_1-v_2|/2.
We determine u_1, u_2, v_1 and v_2 for the  payoff matrix as in Eq. (<ref>) and then the transformed one Eq. (<ref>). For the payoff matrix Eq. (<ref>) we get the coordinates (a_i's and b_i's for i=1,2) as

    u_1=ay+b(1-y)
    
    u_2=cy+d(1-y)
    
    v_1=a'x+c'(1-x)
    
    v_2=b'x+d'(1-x).

Now for the transformed payoff matrix as in  Eq. (<ref>) the fixed point function is given by

    f^t(x,y)=(x+(u_1^t-u_2^t)^+/1+|u_1^t-u_2^t|,y+(v_1^t-v_2^t)^+/1+|v_1^t-v_2^t|).

Again we determine the coordinates (a_i's and b_i's for i=1,2), as follows from Eq. (<ref>,<ref>)

    u_1^t=(a+λ)y+(b+μ)(1-y)
    
    u_2^t=(c+λ)y+(d+μ)(1-y)
    
    v_1^t=(a'+λ')x+(c'+μ')(1-x)
    
    v_2^t=(b'+λ')x+(d'+μ')(1-x).

As we can see from Eq. (<ref>) and Eq. (<ref>), u_1-u_2=u_1^t-u_2^t=(a-c)y+(b-d)(1-y) and v_1-v_2=v_1^t-v_2^t=(a'-b')x+(c'-d')(1-x). Thus, f^t(x,y)=f(x,y) which implies that the Nash equilibrium remains unchanged under the transformations as described before in Eq. (<ref>, <ref>). 



§ ACKNOWLEDGEMENTS 

CB thanks Science and Engineering Research Board (SERB) for funding under MATRICS grant ”Nash equilibrium versus Pareto optimality in N-Player games“ (MTR/2018/000070).



§ AUTHOR CONTRIBUTIONS STATEMENT

C.B. conceived the proposal,  S.S. did the calculations on the advice of C.B., C.B. and S.S. wrote the paper and analyzed the results. C.B reviewed the manuscript. 



§ ADDITIONAL INFORMATION

 Competing interests The authors declare no competing interests. 
 99
4Game Theory in Action: An Introduction to Classical and Evolutionary Models, S. Schecter and H. Gintis, Princeton Univ. Press (2016).
5 C. Adami and A. Hintze, Thermodynamics of Evolutionary Games, Phys. Rev. E 97, 062136 (2018).
ai Liviu Panait and Sean Luke,  Cooperative Multi-Agent Learning: The State of the Art. In Autonomous Agents and
Multi-Agent Systems. (Springer) 11(3) 387-434 (2005). 
12 M. A. Nowak, A. Sasaki, C. Taylor and D. Fudenberg, Emergence of cooperation and evolutionary stability in finite populations, Nature, 428, 646 (2004).
nowak M. A. Nowak, Five Rules for the Evolution of Cooperation, Science (2006) 314, 1560-1563.
13 A. Bravetti, P. Padilla, An optimal strategy to solve the Prisoner’s Dilemma, Scientific Reports, 8, 1948 (2018). 
21 X. Chen and F. Fu, Imperfect vaccine and hysteresis, Proceedings of the royal society B 286(2019)
22 X. Chen and F. Fu, Social Learning of Prescribing Behavior Can Promote Population Optimum of Antibiotic Use, Frontiers in Physics 6, 139(2018)
19 G. Szabo and I. Borsos, Evolutionary potential games on lattices, Physics Reports, 624, 1 (2016).
1 S. Galam and B. Walliser, Ising model versus normal form game, Physica A 389, 481 (2010).
14 Sociophysics : An Introduction by P. Sen and B. K. Chakravarti, Oxford Univ. Press (2014).
15 K. Sznajd-Weron, J. Sznajd, Opinion evolution in closed community, Int. J. Mod. Phys. C 11 (6) (2000) 1157-1165. 
6 G. T. Landi, "Ising Model and Landau theory” in  Lecture notes on undergraduate Statistical Mechanics (2017) available at: http://www.fmt.if.usp.br/ gtlandi/courses/stat-mech.html

11 Game Theory: A Playful Introduction, M. DeVos and D. A. Kent, American Mathematical Society (2016)
18 C. Benjamin and S. Sarkar, Triggers for cooperative behavior in the thermodynamic limit: a case study in Public goods game, Chaos 29, 053131 (2019).
10 S. Sarkar and C. Benjamin, Quantum Nash equilibrium in the thermodynamic limit, Quantum Information Processing 18:122 (2019). 
sar-benj-physa S. Sarkar and C. Benjamin, Entanglement renders free riding redundant in the thermodynamic limit, Physica A 521, 607 (2019).




