Help us improve
Share bugs, ideas, or general feedback.
From skills-for-humanity
Analyses cooperation problems where individual rationality leads to collective irrationality. Identifies prisoner's dilemma structures and applies Axelrod's Tit for Tat insights.
npx claudepluginhub human-avatar/skills-for-humanityHow this skill is triggered — by the user, by Claude, or both
Slash command
/skills-for-humanity:s4h-game-theory-prisoners-dilemmaThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The prisoner's dilemma is the central problem of cooperation. Its structure: each player has an individual incentive to defect regardless of what the other does, so both defect — and both end up worse than if they had cooperated. Individual rationality produces collective irrationality.
../../../../.claude/skills/game-theory/prisoners-dilemma-and-cooperation.md
Routes strategic situations to the appropriate game-theory skill for payoff analysis, incentive design, cooperation problems, or bidding strategy.
Applies Nash equilibrium analysis to competitive strategy, pricing, auctions, contracts, or negotiations where multiple rational parties make interdependent decisions — identifies stable strategy combinations and predicts where unstable strategies will drift.
Share bugs, ideas, or general feedback.
The prisoner's dilemma is the central problem of cooperation. Its structure: each player has an individual incentive to defect regardless of what the other does, so both defect — and both end up worse than if they had cooperated. Individual rationality produces collective irrationality.
This structure appears everywhere: countries competing on subsidies both nations would be better without, companies in a price war that erodes margins for everyone, colleagues who each underinvest in shared infrastructure, advertisers who would all benefit if no one ran ads but each is tempted to run them. Recognising the structure is the first move; it tells you why the situation is hard and what the real leverage points are.
Robert Axelrod's computer tournaments (1984) produced one of the most important empirical results in social science: in repeated prisoners' dilemmas, Tit for Tat — cooperate first, then mirror your opponent's previous move — consistently outperformed every more complex strategy. Its winning properties: nice (cooperates first), retaliatory (immediately punishes defection), forgiving (returns to cooperation as soon as the opponent does), and clear (easy to understand and predict). The lesson: cooperation is achievable without altruism, if the game is repeated and players are patient.
Step 1: Structure verification Confirm the three conditions that define a prisoner's dilemma:
If all three hold: this is a genuine prisoner's dilemma. If (a) fails, cooperation isn't actually better — the analysis changes. If (b) fails, there's no defection temptation — cooperation is already individually rational.
Framing check: Confirm the specific cooperation problem before continuing. State the players involved, what constitutes cooperation vs. defection for each, and why individual incentives diverge from collective interest in one sentence, then use AskUserQuestion:
Step 2: One-shot vs. repeated Is this a single interaction or an ongoing relationship? This is the most important structural question. In a one-shot game, defection is the rational dominant strategy and there is no mechanism for cooperation. In a repeated game, the future creates incentives for today's cooperation.
Step 3: Shadow of the future In repeated games, assess how much each player values future interactions. The discount factor (δ) captures how much tomorrow's payoff is worth today — high δ means future interactions matter a great deal; low δ means players are impatient or uncertain the relationship will continue. Cooperation is sustainable in repeated play if δ is above a threshold that depends on the payoff structure. Practically: ask how much each player needs the relationship to continue, how visible their defection will be, and how quickly punishment can be applied.
Step 4: Trigger conditions In a cooperative equilibrium, cooperation is sustained by the threat of punishment. What action would constitute defection? How quickly would it be detected? How severe is the punishment, and is it credible? A cooperation equilibrium is only stable if the punishment threat is believable and proportionate.
Step 5: Structural prescriptions If cooperation is failing or fragile, what changes to the structure could make cooperation individually rational?
Before proceeding, use the AskUserQuestion tool. State your interpretation of the situation in 1–2 sentences — what is being analyzed and what the core question is — then ask:
Proceed based on their selection. If the user reframes, incorporate the correction before running any analysis.
Structure Verification
Payoff Map [The four key outcomes: mutual cooperation / you cooperate, they defect / you defect, they cooperate / mutual defection — with approximate payoffs or ordinal rankings]
One-Shot vs. Repeated Assessment [Is this a single interaction or an ongoing relationship? How many rounds are expected? Does either player expect to exit soon?]
Shadow of the Future Analysis [How much do players value continued interaction? What is the discount factor — high (cooperation sustainable) or low (cooperation fragile)? What would cause either player to reduce their valuation of the relationship?]
Trigger Conditions [What constitutes defection? How quickly detected? Is punishment credible and proportionate?]
Structural Prescriptions [Specific recommendations for changing the game structure to make cooperation individually rational — ranked by feasibility and impact]
The prisoner's dilemma is the one-shot cooperation problem. For formal analysis of how cooperation can be sustained in repeated interactions, including specific strategy recommendations, use /s4h-game-theory-iterated.
If the structure is right but the rules are wrong — you want to change the game itself — use /s4h-game-theory-mechanism-design, which designs payoffs and rules specifically to align individual and collective incentives.
For analysis of the stable outcome of the one-shot version (and confirmation that defection is indeed the Nash equilibrium), use /s4h-game-theory-equilibrium.
Pairs with: /s4h-social-incentive-analysis (the social and power dynamics around the same incentive problem), /s4h-strategy-alliance (the strategic logic of forming cooperative relationships).
After delivering this output, use AskUserQuestion to offer the next move:
/s4h-game-theory-mechanism-design — Design away from mutual defection/s4h-social-incentive-analysis — Align incentives to encourage cooperation/s4h-game-theory-iterated — Test whether cooperation emerges with repeated interaction