Network and Cooperation

Game Theory - Graphs

The prisonner's dilemma

Imagine you and your best friend get caught doing something wrong. You're both taken to separate rooms and can't talk to each other. The police offer you both a deal:

  • If you both stay quiet (cooperate with each other), you each get 1 year of punishment.
  • If you both tell on each other (betray each other), you each get 2 years of punishment.
  • If one of you stays quiet but the other betrays, the one who tells gets no punishment at all, and the one who stayed quiet gets 3 years of punishment.

We say that the Cooperation Reward \(R\) is 2 (since the player get a 2 years discount on the worst penalty, which is 3), the Punishment payoff \(P\) is 1, the Temptation payoff \(T\) is 3, and finally the Sucker's payoff \(S\) is 0.

This situation is tricky because if you stay quiet, you hope your friend does too, so you both get only 1 year. But if you think your friend will tell on you, you might want to tell on him first, so you don't get 5 years while they go free. And you know that your friend is thinking the same way in his room.

What is the best strategy?

  • Assuming that your friend will betray: if you stay quiet, you will get 3 years, but if you betray you will get only 2 years. Thus, in this situation, you should betray.
  • Now assuming that your friend will stay quiet: if you do so, you will get 1 year, but if you betray you will be free! Therefore, in this situation too, you should betray.

Consequently, if the two prisoners think rationnally, they will both betray. In game theory, this is called a Nash Equilibirum: no player could gain by changing his own strategy.

This reasoning leads us to believe that no one should cooperate. But if this is true when there are only two players, is it also true when we consider an entire community where everyone repeatedly plays against their neighbors?

Games and Graphs

We represent this community as a graph, where each node is a player. Each of them is a defector, colored in red, or a collaborator, colored in green.

  • At each round, each player is playing a Prisoner's Dilemma game with each of their neighbors, playing the same action (Cooperate or Betray) with each one of them.
  • Then, each player will compare his results with one of his neighbors, and mimic is strategy according to this rule: each individual \(i\) chooses randomly one of their direct neighbors \(j\) and with a probability \(P_{ij}\) defined as: $$P_{ij} = \frac{W_j - W_i}{k_{max}D_{max}}$$ where \(W_i\) and \(W_j\) are the payoffs of player \(i\) and \(j\), \(k_{max}\) is the biggest degree between the nodes \(i\) and \(j\), and \(D_{max} = \max(T,R) - \min(S,P)\).

Applet

The following applet allows you to observe how the two strategies spead among the player. You can set the value of the four different rewards, the probability of a player being a defector at the begining, the number of players, as well as the graph geeneration process (Scale-free or Random, see below).

Settings

2 10 40
2 4 6
1 50 100

Rewards

Press start

0%

Results

Two different types of graph

Erdos and Renyi

A random graph (Erdős-Rényi) is built by randomly connecting pairs of nodes with a fixed probability, so each connection is equally likely, resulting in a graph where most nodes have a similar number of connections (degree).
In contrast, a scale-free graph (Barabási-Albert) grows by adding new nodes that preferentially connect to existing nodes with more connections, following a "rich-get-richer" principle. This process creates a graph where a few nodes, called hubs, have many connections, while most nodes have only a few.
The key difference is that random graphs have a more uniform distribution of connections, while scale-free graphs have a few highly connected hubs and many less connected nodes.

Barabasi and Albert

References & Sources

[1] Nash, John F. "Equilibrium points in n-person games". (1950)
[2] Boccaletti, Stefano, Vito Latora, Yamir Moreno, Martin Chavez, and D-U. Hwang. "Complex networks: Structure and dynamics." Physics reports 424, no. 4-5 (2006): 175-308.
[3] Erdős, Paul, and Alfréd Rényi. "On the evolution of random graphs." Publ. Math. Inst. Hung. Acad. Sci 5, no. 1 (1960): 17-60.
[4] Albert, Réka, and Albert-László Barabási. "Statistical mechanics of complex networks." Reviews of modern physics 74, no. 1 (2002): 47.
[5] Clauset, Aaron, Cosma Rohilla Shalizi, and Mark EJ Newman. "Power-law distributions in empirical data." SIAM review 51, no. 4 (2009): 661-703.
[6] Santos, Francisco C., Jorge M. Pacheco, and Tom Lenaerts. "Evolutionary dynamics of social dilemmas in structured heterogeneous populations." Proceedings of the National Academy of Sciences 103, no. 9 (2006): 3490-3494.
[7] Roca, Carlos P., José A. Cuesta, and Angel Sánchez. "Evolutionary game theory: Temporal and spatial effects beyond replicator dynamics." Physics of life reviews 6.4 (2009): 208-249.