Prisoner's Dilemma Calculator
Analyze game theory strategies, Nash equilibrium, and optimal decision-making in cooperation vs defection scenarios
Game Theory Analysis
Payoff Matrix (T > R > P > S)
Best payoff (defect vs cooperate)
Mutual cooperation
Mutual defection
Worst payoff (cooperate vs defect)
Player Strategies
Game Outcome
Outcome: Mutual Cooperation (R,R)
Description: Both players cooperate and receive the reward payoff
Stability: Unstable - both players have incentive to defect for higher payoff
Payoff Matrix
| Bob Cooperates | Bob Defects | |
|---|---|---|
| Alice Cooperates | (-1, -1) Mutual Cooperation | (-10, 0) Alice Exploited |
| Alice Defects | (0, -10) Bob Exploited | (-5, -5) Nash Equilibrium |
Classic Example Analysis
Standard Prison Scenario
Context: Two prisoners accused of a crime, interrogated separately
Strategies: Stay silent (cooperate) or confess (defect)
Payoffs (prison years):
- T = 0 (traitor goes free)
- R = -1 (both cooperate, light sentence)
- P = -5 (both defect, moderate sentence)
- S = -10 (sucker gets heavy sentence)
Nash Equilibrium Analysis
• Both players will choose to defect (confess)
• Neither benefits from unilateral strategy change
• Outcome: (-5, -5) - suboptimal for both
• Paradox: Individual rationality leads to collective irrationality
Strategy Guide
Single Game
Iterated Game
Game Theory Principles
Nash Equilibrium
No player benefits from changing strategy unilaterally
Dominant Strategy
Best choice regardless of opponent's action
Pareto Optimal
Cannot improve one player without hurting another
Zero-Sum vs Non-Zero-Sum
Prisoner's dilemma is non-zero-sum
Understanding the Prisoner's Dilemma
The Classic Scenario
Two prisoners are arrested and held separately. Each must decide whether to confess (defect) or stay silent (cooperate). The outcome depends on both choices, creating a strategic interaction where individual rationality leads to collective irrationality.
Mathematical Framework
The payoff structure must satisfy T > R > P > S, where:
- •T (Traitor): Best payoff when you defect and opponent cooperates
- •R (Reward): Payoff for mutual cooperation
- •P (Punishment): Payoff for mutual defection
- •S (Sucker): Worst payoff when you cooperate and opponent defects
Strategic Analysis
Single Game
Defection is the dominant strategy because it provides a better payoff regardless of the opponent's choice.
- • If opponent cooperates: T > R (defect beats cooperate)
- • If opponent defects: P > S (defect beats cooperate)
Iterated Game
Repeated interactions enable cooperation through reputation and retaliation.
- • Cumulative payoff: Σ(payoff_i × δ^(i-1))
- • Discount factor δ weights future rounds
- • Strategies can react to opponent's history
Real-World Applications
Economics
Trade wars, price competition, public goods provision
Biology
Evolution of cooperation, symbiotic relationships
Politics
Arms races, international cooperation, voting