Keywords

1 Introduction

Nowadays, the studying of the human behavior is of interest in several fields, as social psychology [1], physics and computer science [24]. In particular, the relatively modern field of social dynamics [3] represents the attempt to analyze human and social behaviors by using the framework of the statistical mechanics. In this work, we focus our attention on conformity [1], a behavior deemed relevant in social psychology, in the context of game theory [58]. We consider two famous games, i.e., the Prisoner’s Dilemma (PD hereinafter) and the Hack-Dove game (HD hereinafter). In particular, we study the evolution of a population of agents, embedded in a two dimensional space, that interact by playing the cited games. In both games, agents follow a strategy, i.e., cooperation or defection, that can be updated (by each agent) during the evolution of the system. Remarkably, in the proposed model, agents update their strategy according to their social behavior, i.e., conformist or nonconformist, in relation to the strategy followed by their neighbors, identified by the Euclidean distance. Previous works, as [9, 10], found important relations between the emergence of cooperation [11] and agents’ conditions, while they play different games. For instance, authors of [9] showed that a high level of cooperation can be reached when agents can randomly move in the space, when they play the PD. Instead, a defection strategy is followed by the whole population when agents are fixed (i.e., they cannot move). On the other hand, several studies in social dynamics showed that the human behavior can strongly affects dynamical processes in agent populations [4, 1215]. Therefore, we are interested in studying the relation between conformity and the emergence of cooperation in classical game theory. As result, we found that conformity strongly affects the cooperation among agents, in both considered games (i.e., the PD and HD). Notably, when agents select a strategy to play, driven by their behavior, a high level of cooperation can emerge even under conditions of games that usually lead agents to defect. The remainder of the paper is organized as follows: Sect. 2 introduces the proposed model, for investigating the relations between conformity and the emergence cooperation in two games: PD and HD. Section 3 shows results of numerical simulations. Finally, Sect. 4 ends the paper.

2 The Model

The proposed model considers a population of interacting agents embedded in a \(2D\) space, i.e., a square of side \(L=1\) where, at the beginning, they are randomly spread with an uniform distribution. Furthermore, agents interact with their neighbors, identified by a distance rule. In particular, the set of neighbors \({N_j(t)}\) of the \(j\)th agent is computed by the Euclidean distance, by considering an interaction radius \(r\) (equal for all agents). In so doing, all the agents that fall into the circle drawn around the \(j\)th agent are its neighbors, i.e., \(N_j(t)=\{\forall z \in N \mid dist(j,z) < r \}\) with \(dist(j,z)\) Euclidean distance between the \(j\)th agent and the \(z\)th one. Hence, it is possible to generate an agent network, where each agent is represented by a node and its interactions by edges. The average degree \(\bar{k}\) of the agent network depends on the interaction radius \(r\), used to define the social circle (i.e., the list of neighbors) of each agent. Notably, considering that \(N\) agents are spread in a square of area \(L^2=1\), we consider their density equal to \(\rho =N\) and, since interactions are defined inside circles of area \(\pi r^2\), the average degree can be computed as \(\bar{k}=\rho \pi r^2\). Therefore, we can refer to this system both by the interaction radius \(r\) and by the average degree \(\bar{k}\). We focus our attention on two classical games, i.e., the Prisoner’s Dilemma and the Hawk-Dove game. These games are described by the following payoff matrix

$$\begin{aligned}&\ \ C \ \ D \nonumber \\ \begin{array}{l} C\\ D \end{array}&\left( \begin{array}{ll} 1&{}S\\ T&{}0 \end{array}\right) \end{aligned}$$
(1)

The set of strategies is \(\varSigma = \left\{ C,D\right\} \) where C stands for “Cooperator” and D for “Defector”. Depending on the strategy chosen by opponent agents, they increase/decrease their payoff according to the cited payoff matrix, with T representing the Temptation, i.e., the payoff that an agent gains if it defects while its opponent cooperates, that in turn gets the Sucker’s payoff S. In accordance with a specific game, the parameters T and S have different values. In particular, the PD is characterized by \(T\) and \(S\) in the following ranges: \(1 \le T \le 2\) and \(-1 \le S \le 0\), whereas the following ranges hold for the HD: \(1 \le T \le 2\) and \(0 \le S \le 1\). It is worth to note that both games are played asynchronously, i.e., at every time step only one agent plays against its neighbors. In particular, the main steps of the proposed model are:

  1. 1.

    A randomly chosen agent, say the \(j\)th, computes the set of its neighbors in accordance with \(r\);

  2. 2.

    The \(j\)th agent plays the game (i.e., the PD or the HD) with all its neighbors (recall that each single challenge involves only two agents at time);

  3. 3.

    All agents playing at this step compute their new payoff;

  4. 4.

    The selected agent updates its strategy according to a revision rule.

In so doing, each agent involved in the game accumulates its payoff according to its strategy (i.e., cooperation or defection) and to the payoff matrix. Let \(\sigma _j(t)\) be a vector giving the strategy profile of the \(j\)th agent at time \(t\), with \(C=(1,0)\) and \(D=(0,1)\), and let \(M\) be the payoff matrix discussed above. Then, the payoff collected by the player \(j\), at time \(t\), can be computed as

$$\begin{aligned} \Pi _j(t)=\sum _{i\in N_j} \sigma _j(t)M\sigma _i^\top (t) \end{aligned}$$
(2)

In the proposed model, the revision rule is based on the behavior of the considered agent (i.e., conformist or nonconformist). Therefore, the revision phase is performed by each agent without paying attention to its neighbors’ payoffs. In so doing, conformist agents adopt the most popular strategy used in their social circle, whereas nonconformist agents do the opposite. Eventually, the considered agent randomly moves to another position inside the square, by performing a step of length \(\epsilon \). The latter is constant and also equal for all the agents. Since at each time step one agent moves, the underlying random graph generated by agents’ interactions varies over time, hence it can be considered as an adaptive network [16]. Therefore, every time an agent plays the game, it is very likely it faces with new opponents. Mapping strategies (i.e., cooperation and defection) to states (e.g., \(0\) and \(1\)), the proposed model can be described in terms of opinion dynamics [2, 3] where, at each time step, a sequence of strategy profiles (i.e., the agents’ states) can be extracted: \(\left\{ \sigma _1,\ldots ,\sigma _N\right\} _t\), with \(N\) number of agents and \(t\) considered time step. Finally, it is worth to note that, during each simulation, only one game is considered.

3 Results

We performed many numerical simulations of the proposed model in order to analyze how conformity affects the emergence of cooperation when agents play the PD and the HD. In particular, we study a population with \(N= 100\) agents by varying the density of nonconformists \(\rho _{a}\), and by considering two different scenarios: fixed agents \(v=0\) (i.e., agents that do not move) and moving agents \(v=0.01\) (i.e., agents that randomly move as described above). In so doing, the displacement of each agent is computed as \(\epsilon = v \cdot \varDelta t\); hence considering that the single action lasts for one time step (i.e., \(\varDelta t = 1\)), \(\epsilon = v \cdot 1\). The value of \(\rho _{a}\) is in the set \([0.0, 0.25, 0.5, 0.75, 1.0]\), therefore we start with a configuration without nonconformist agents (i.e., \(\rho _{a} = 0.0\)) and we increase their amount until there are only nonconformists (i.e., \(\rho _{a} = 1.0\)). It is worth to recall that each simulation run, performed with a fixed value of \(\rho _{a}\) and \(v\), lasts for \(50000\) time steps.

Fig. 1.
figure 1

Cooperation frequencies in the TS-plane of the PD game. On the top, results achieved by fixed agents. On the bottom, results achieved by moving agents. From left to right, results related to populations with increasing values of \(\rho _{a}\) (from \(0.0\) to \(1.0\)).

Fig. 2.
figure 2

Cooperation frequencies in the TS-plane of the HD game. On the top, results achieved by fixed agents. On the bottom, results achieved by moving agents. From left to right, results related to populations with increasing values of \(\rho _{a}\) (from \(0.0\) to \(1.0\)).

3.1 Emergence of Cooperation

In order to analyze the evolution of the system, we show the TS-plane related to both games (i.e., PD and HD) — see Figs. 1 and 2. It is interesting to note that, although the PD and the HD are different games under several aspects, for instance the former is usually dominated by defector agents whereas in the latter a full cooperation can emerge for a wide parameters’ range T and S (after a number of time step) [9], in the proposed model their evolutions are very similar. In particular, for \(v = 0.01\), the cooperation emerges in several areas of the TS-plane in the event there are only conformist agents. Then, increasing \(\rho _{a}\), both defection and cooperation disappear and mixed phases emerge. Mixed phases are characterized by a distribution of strategies almost uniform among agents over time. On the other hand, for \(v=0\), only small areas of high cooperation and high defection are present at \(t=0\); whereas, as \(\rho _{a}\) increases, the evolution of the system is similar to those achieved by \(v = 0.01\). As discussed before, the evolution of the system can be viewed also in terms of opinion dynamics, where the agents’ strategy is mapped to a state (e.g., \(\sigma = \pm 1\) or \(\sigma \in [0,1]\)). In so doing, a relevant parameter is the magnetization of the system [17] defined as follows

$$\begin{aligned} <M> = \frac{|S_0 - S_1|}{N} \end{aligned}$$
(3)
Fig. 3.
figure 3

Magnetization of the system, in random points of the TS-plane, as agents play the PD. On the top, results achieved by fixed agents. On the bottom, results achieved by moving agents. From left to right, results related to populations with increasing value of \(\rho _{a}\), from \(0.0\) to \(1.0\).

with \(S_0\) and \(S_1\) summations of agents having the state \(0\) and \(1\), respectively, considering that \(0\) represents the number of cooperators and \(1\) that of defectors. Since strategies are equally spread at the beginning of any simulation, at \(t=0\) the value of the magnetization is \(<M(0)> \sim 0\); then during the evolution of system also \(<M>\) varies over time. The initial scenario represents a disordered phase of the system, so the evolution toward a full cooperation (or a full defection) corresponds to the evolution toward an ordered phase. Figure 3 illustrates the magnetization of the system when agents play the PD. As expected, it is possible to get \(<M(t)> \sim 1\) if \(\rho _{a} = 0\), as the system reaches several points (in the TS-plane) of full cooperation or full defection. Instead, increasing \(\rho _{a}\) the system fluctuates around values far from the ordered phase. Figure 4 shows values of magnetization, in random points of the TS-plane, when agents play the HD. On a quality level, results are identical to those achieved by the PD game. Furthermore, it is interesting to observe that for \(\rho _{a} = 1.0\), in both games when \(v=0\), the system seems to reach a steady-state in a disordered phase. Moreover, under these conditions the magnetization has few fluctuations before reaching its final value. Finally, although we performed \(20\) simulation runs under the same initial conditions, it is worth to highlight that results, shown in these figures, are related to single runs and not to average values (achieved by considering all simulations). This choice has been done because of the nature of results. In particular, we found that there are no relations between cooperation areas and defection areas with \((T,S)\) values. For instance, when \(\rho _{a} = 0\), in different simulations the amount of cooperation areas is the same, but not their position in the TS-plane. Therefore, by averaging these results, a defection area can be overlapped to one of cooperation, giving as result meaningless interference patterns.

Fig. 4.
figure 4

Magnetization of the system, in random points of the TS-plane, when agents play the HD. On the top, results achieved by fixed agents. On the bottom, results achieved by moving agents. From left to right, results related to populations with increasing value of \(\rho _{a}\), from \(0.0\) to \(1.0\).

3.2 Conformists vs Nonconformists

As agents are provided with a social behavior, that drives the selection of their strategy, it is interesting to evaluate which behavior is more convenient. In particular, we compare the payoffs accumulated by conformist agents with those accumulated by nonconformist ones. Since simulations are performed with different values of \(\rho _{a}\), summations of payoffs gained by the two categories of players are weighted, i.e., they are computed considering the amount of players of each category. Figures 5 and 6 show results of this comparison in the PD and in the HD, respectively.

Fig. 5.
figure 5

Payoff accumulated by agents playing the PD in function of the density of nonconformist agents. On the left, results achieved by fixed agents. On the right, results achieved by moving agents. As indicated in the legend, blue bars are related to conformist agents, whereas red bars to nonconformist agents (Color figure online).

Fig. 6.
figure 6

Payoff accumulated by agents playing the HD in function of the density of nonconformist agents. On the left, results achieved by fixed agents. On the right, results achieved by moving agents. As indicated in the legend, blue bars are related to conformist agents, whereas red bars to nonconformist agents (Color figure online).

It is worth to note that in the PD we found a symmetrical scenario, i.e., playing as a conformist or as a nonconformist does not matter, because both categories of players gain overall the same amount of payoff. On the other hand, in the HD game we found that playing as a nonconformist allows to get higher payoffs. Finally, when comparing the accumulated payoffs between the two categories of agents, their velocity does not matter as results are identical for fixed and moving agents (considering the same game).

4 Discussion and Conclusions

In this work, we analyze the evolution of a population composed by agents that play a game, as the PD or the HD, and that are provided with a social behavior. In particular, agents can be conformists or nonconformists, and their behavior drives the selection of their strategy (i.e., cooperation and defection). Conformity is a behavior deemed relevant in several contexts, spanning from social psychology to opinion dynamics and, in general, to social dynamics. Numerical simulations of the proposed model, performed considering both games (i.e., PD and HD), allow to achieve interesting results. Notably, although the PD and the HD are different games, in the proposed model their evolutions follow very similar paths. Both the TS-planes and the magnetization show the emergence of different phases in the population, i.e., from full cooperation (or full defection) to mixed phases characterized by the coexistence of cooperation and defection (i.e., steady-states). We highlight that, by using fixed agents, it is very difficult to achieve areas (in the TS-plane) of full cooperation, whereas it is more likely by using moving agents. This result has been achieved, by using a different strategy revision phase, by other authors (e.g., [9, 10]). Moreover, it is worth to observe that in [18], authors found that cooperation can emerge by using fixed agents embedded in competitive environments. Therefore, we can state that both physical properties of agents (e.g., velocity and interaction radius) and social behaviors [19] are fundamental in these dynamics and can lead to cooperation. Finally, we compared performances achieved by conformists and nonconformists in both games. Remarkably, we did not find differences between the two social behaviors in the PD. On the other hand, in the HD, we observed that conformist agents gain higher payoffs than nonconformist ones. Furthermore, it seems that the agents’ velocity does not matter to compare the two social behaviors (in both games). To summarize, we can state that conformity strongly affects the emergence of cooperation in populations playing the PD and the HD. In order to conclude, we deem relevant this result from different perspectives, as social dynamics, game theory and also social psychology. In particular, since games as the PD allow to model real scenarios where conformity may be present (e.g., financial markets and trader systems), further investigations, performed also by mapping other social behaviors, may shade some light to better understand the underlying mechanisms that lead to the achieved results.