Prisoner's Dilemma Calculator

Analyze the classic game theory scenario with payoff matrices, Nash equilibria, and dominant strategies.

Payoff Matrix Values

Standard Payoff Parameters

Defect while other cooperates
Both cooperate
Both defect
Cooperate while other defects

Analysis

Nash Equilibrium
(Defect, Defect)
Payoff: (1, 1)
Valid Prisoner's Dilemma? Yes (T > R > P > S)
Player 1 Dominant Strategy Defect
Player 2 Dominant Strategy Defect
Pareto Optimal Outcome (Cooperate, Cooperate)
Social Optimum Payoff 6 (3 + 3)

Payoff Matrix

P2: Cooperate P2: Defect
P1: Cooperate 3, 3 0, 5
P1: Defect 5, 0 1, 1

Step-by-Step Analysis

T > R > P > S: 5 > 3 > 1 > 0 (Valid PD)

Understanding the Prisoner's Dilemma

The Prisoner's Dilemma is the most famous example in game theory. Two players simultaneously choose to either cooperate or defect. The dilemma arises because each player has an incentive to defect regardless of what the other does, yet both players would be better off if they both cooperated. This tension between individual rationality and collective benefit is at the heart of many real-world problems.

The Payoff Structure

T: Temptation

The payoff for defecting while the other cooperates. The highest individual payoff.

T > R > P > S

R: Reward

The payoff when both players cooperate. The socially optimal outcome.

2R > T + S

P: Punishment

The payoff when both players defect. The Nash equilibrium outcome.

P is the equilibrium payoff

S: Sucker's Payoff

The payoff for cooperating while the other defects. The worst outcome.

S < P (sucker loses most)

Key Concepts

Nash Equilibrium

A Nash equilibrium is a set of strategies where no player can improve their payoff by unilaterally changing their strategy. In the standard Prisoner's Dilemma, (Defect, Defect) is the unique Nash equilibrium. Neither player benefits from switching to Cooperate if the other defects.

Dominant Strategy

A strategy is dominant if it yields a higher payoff regardless of the other player's choice. In the Prisoner's Dilemma, Defect is a dominant strategy for both players: defecting always yields a higher individual payoff than cooperating, no matter what the opponent does.

The Dilemma

The dilemma is that rational self-interest leads both players to defect, resulting in the (P, P) outcome. However, both would be better off with the (R, R) outcome from mutual cooperation. This illustrates how individual rationality can lead to collectively suboptimal outcomes.

Real-World Applications

  • Arms races: Nations may spend on military even though mutual disarmament would benefit all.
  • Climate change: Countries may avoid costly emissions cuts, hoping others will bear the burden.
  • Price competition: Firms may undercut prices, reducing profits for all.
  • Public goods: Individuals may free-ride instead of contributing to shared resources.
  • Biological evolution: The dilemma explains cooperation and altruism in evolutionary biology.

Iterated Prisoner's Dilemma

When the game is played repeatedly, cooperation can emerge through strategies like "Tit for Tat" (cooperate first, then mirror the opponent's previous move). Robert Axelrod's famous tournaments showed that simple, cooperative strategies can outperform purely selfish ones in repeated interactions.