Prisoner's dilemma is a standard example of a game analyzed in game theory that shows why two completely rational individuals might not cooperate, even if it appears that it is in their best interests to do so. It was originally framed by Merrill Flood and Melvin Dresher while working at RAND in 1950. Albert W. Tucker formalized the game with prison sentence rewards and named it "prisoner's dilemma", presenting it as follows:
"Two members of a criminal gang are arrested and imprisoned. Each prisoner is in solitary confinement with no means of communicating with the other. The prosecutors lack sufficient evidence to convict the pair on the principal charge, but they have enough to convict both on a lesser charge. Simultaneously, the prosecutors offer each prisoner a bargain. Each prisoner is given the opportunity either to betray the other by testifying that the other committed the crime, or to cooperate with the other by remaining silent. The possible outcomes are:
The payoff table is presented below.
| $B$ cooperates | $B$ not-cooperating | |
|---|---|---|
| $A$ cooperates | $A \rightarrow -x$ | $A\rightarrow -w$ |
| $B\rightarrow -x$ | $B\rightarrow -y$ | |
| $A$ not-cooperating | $A\rightarrow -y$ | $A\rightarrow -z$ |
| $B\rightarrow -w$ | $B\rightarrow -z$ |
However, this is only a Prisoner's Dilemma GAME for A GIVEN RELATION between the years in prison (payoffs) as to be studied next.
ps. Text adapted from Wikipedia.
(1) Consider the Prisoner's dilemma description given above.
(a) What is the relation between the payoffs values $x\geq 0$, $y\geq 0$, $w\geq 0$ and $z \geq 0$ so that the game can be classified as Prisoner's Dilemma?
(b) Verify the results (i.e., the proposed inequality) with numerical examples using nashpy. Please provide one example when the inequality holds and one it does not (check my example for Dove and Hawyk game).
For the game to be a Prisoner's dilemma, the payoff values must hold:
Therefore, $y > x > z > w$.
Case 1: $y > x > z > w$ $$ A = \begin{pmatrix} 3 & 0\\ 5 & 1 \end{pmatrix} $$
$$ B = \begin{pmatrix} 3 & 5\\ 0 & 1 \end{pmatrix} $$import matplotlib.pyplot as plt
import numpy as np
import nashpy as nash
A = [[3, 0], [5, 1]]
B = [[3, 5], [0, 1]]
game = nash.Game(A,B)
print(game)
eqs = game.support_enumeration()
list(eqs)
Bi matrix game with payoff matrices: Row player: [[3 0] [5 1]] Column player: [[3 5] [0 1]]
[(array([0., 1.]), array([0., 1.]))]
Strategy Betrayal for both prisoners is the Nash equilibrium, which satisfies the condition for the game.
Case 2: $x > y$ $$ A = \begin{pmatrix} 3 & 0\\ 5 & 1 \end{pmatrix} $$
$$ B = \begin{pmatrix} 3 & 5\\ 0 & 1 \end{pmatrix} $$import matplotlib.pyplot as plt
import numpy as np
import nashpy as nash
A = [[5, 0], [3, 1]]
B = [[5, 3], [0, 1]]
game = nash.Game(A,B)
print(game)
eqs = game.support_enumeration()
list(eqs)
Bi matrix game with payoff matrices: Row player: [[5 0] [3 1]] Column player: [[5 3] [0 1]]
[(array([1., 0.]), array([1., 0.])), (array([0., 1.]), array([0., 1.])), (array([0.33333333, 0.66666667]), array([0.33333333, 0.66666667]))]
In this case, both prisoners have multiple strategies for the Nash equilibria. For the game to be a Prisoner's dilemma, the strategy needs to be betrayal in all rounds. Therefore, the 2nd case does not satisfy the condition.
(2) Justify why the game from the previous exercise is or is not a good (reasonable) model when $A$ and $B$ are:
1. Two trained members from the army when they are in prison.
2. Competitive companies in the market discussing standardization.
3. Two different autonomous IoT-based home energy management algorithms that are focus on energy efficiency.
4. Two different autonomous IoT-based home energy management algorithms that are focus on profit maximization.
ps. You need to think about the assumption used in Game Theory and in the Prisoner's dilemma problem setting.
(1) Yes. This is a classic Prisoner's Dilemma scenario. Both prisoners' optimal strategy is to betray the other. Being an army veteran does not affect this. (2) No. The two companies can adopt different standards according to their needs. Both will gain benefits from either having their own or having a shared standard. (3) No. They work independently and have a common goal. (4) No. They work independently and have a common goal.