game-theoretic-analysis
Game-Theoretic Analysis
Core principle: When multiple agents interact and each agent's outcome depends on the choices of others, you have a game. Understanding the game's structure — who the players are, what strategies they have, what payoffs result, and what equilibria emerge — is the only reliable way to predict behavior and design systems where rational self-interest produces good outcomes.
When to Use This Skill
Trigger whenever:
- Multiple agents (people, teams, companies, AI agents) interact and their choices affect each other's outcomes
- Incentive misalignment is suspected — the system should work but doesn't because participants optimize locally
- Designing rules, protocols, scoring systems, or allocation mechanisms
- Cooperation is needed but not happening (or is fragile)
- Negotiation strategy is being planned
- Multi-agent AI systems are being designed, debugged, or evaluated
- A "tragedy of the commons" pattern is observed (shared resources degrading)
- Someone asks "why would they do X?" where X seems irrational — it's probably rational given their payoffs
The Core Process
Step 1: Define the Game
Every strategic interaction has these components. Identify each explicitly before analyzing:
Players: Who are the decision-making agents? (Don't just list teams — identify the actual decision-makers whose choices matter.)
Strategies: What are each player's available actions? Be precise — "cooperate" and "defect" are archetypes, but real strategies are concrete: "share full context," "hoard information," "invest in quality," "ship fast and cut corners," "match competitor's price," "undercut."
Payoffs: What does each player gain or lose for each combination of strategies? This is where most analyses fail — people skip quantifying (even roughly) what's at stake. Map the payoff structure even if approximate.
Information: What does each player know about the other players' strategies, payoffs, and past actions? Information asymmetry fundamentally changes the game.
Timing: Are moves simultaneous or sequential? One-shot or repeated? Finite or indefinite horizon?
Step 2: Classify the Game Type
Identify which archetype(s) best fit the situation:
| Game type | Structure | Real-world pattern |
|---|---|---|
| Prisoner's Dilemma | Individual rationality → collective harm | Code quality shortcuts, context hoarding, tech debt accumulation, arms races |
| Coordination Game | Multiple good equilibria, risk of miscoordination | Standard adoption, API design, team conventions, migration timing |
| Chicken / Hawk-Dove | Mutual aggression = worst outcome | Deadline negotiations, resource contention, who blinks first |
| Stag Hunt | High reward requires trust; safe option exists | Ambitious refactors, adopting new tools as a team, investing in shared infrastructure |
| Public Goods / Commons | Contributing benefits all, but free-riding tempts each | Shared documentation, code reviews, context enrichment, open-source contribution |
| Auction / Allocation | Scarce resources, competing claims | Token budget distribution, context window allocation, CI pipeline priority |
| Principal-Agent | One party acts on behalf of another with different incentives | Manager-engineer, company-contractor, user-AI agent delegation |
| Signaling Game | One party has private info, the other observes actions | Job interviews, PR descriptions, agent confidence reporting, status updates |
| Bargaining / Negotiation | Surplus to divide, disagreement point exists | Salary negotiation, scope negotiation, resource sharing between teams |
Step 3: Find the Equilibrium
Ask: If every player optimizes for their own payoff, what's the stable outcome?
- Dominant strategy: Does any player have a strategy that's best regardless of what others do? If so, predict they'll play it.
- Nash Equilibrium: Is there a strategy profile where no player can improve by unilaterally changing? There may be multiple — identify all of them.
- Pareto optimality: Is the equilibrium also the best collective outcome? If not, there's a social dilemma — the game's structure is producing a suboptimal result.
- Mixed strategies: If there's no pure equilibrium, players may randomize. This shows up as unpredictable or oscillating behavior in practice.
The critical diagnostic: If the Nash Equilibrium ≠ Pareto Optimum, the game is broken by design. No amount of persuasion or "alignment" fixes it — the rules must change.
Step 4: Analyze Dynamics (for Repeated Games)
If the interaction repeats over time:
- Shadow of the future: How much do players value future interactions? Higher value → more cooperation. Finite known endpoints kill cooperation (backward induction).
- Reputation effects: Can players build and observe reputations? Reputation is the enforcement mechanism in repeated games.
- Tit-for-tat dynamics: Does the system support reciprocity? Can defection be detected and punished? Can cooperation be rewarded?
- Equilibrium selection: In repeated games, many equilibria exist (Folk Theorem). The question shifts from "what's the equilibrium?" to "which equilibrium does the system select for?" — and that depends on norms, history, and focal points.
Step 5: Design the Mechanism (if you can change the rules)
If you have power to redesign the game, apply mechanism design — reverse game theory:
Goal: Define the outcome you want (efficiency, fairness, truthfulness, cooperation).
Lever 1 — Change the payoffs: Make cooperation pay more or defection cost more. Bonuses for shared context, penalties for hoarded information, rewards tied to collective outcomes.
Lever 2 — Change the information structure: Make actions observable. Transparency kills many defection strategies. Dashboards, audit trails, public commits, shared kanban boards.
Lever 3 — Change the timing: Sequential moves with commitment change equilibria. Letting one player move first (and commit visibly) can break coordination deadlocks.
Lever 4 — Change the rules: Introduce enforcement (automated checks, reviews), create contracts (SLAs, definitions of done), or restructure who plays with whom (team composition, agent topology).
Lever 5 — Eliminate the game: Sometimes the best mechanism design is making the strategic interaction disappear. Centralize the decision, automate the allocation, or remove the resource contention entirely. Your kanban-as-truth architecture does this — it eliminates the context-hoarding game by making externalization the only path forward.
Key mechanism design properties to aim for:
- Incentive compatibility: Truth-telling and cooperation are the dominant strategy, not just one option
- Individual rationality: Every player is better off participating than not
- Budget balance: The mechanism doesn't require external subsidy to run
- Robustness: The mechanism works even if players are strategic, not just when they're cooperative
Multi-Agent AI Applications
Game theory is especially critical when designing AI agent systems:
Context as a strategic resource: When agents share a token budget or context window, allocation is a game. An agent that claims more context may perform better individually but degrades the system. Design allocation mechanisms, not just budgets.
Agent negotiation protocols: When agents must agree (on a plan, an API contract, a code design), the negotiation protocol determines the outcome. Poorly designed protocols produce deadlocks, oscillation, or convergence on mediocre solutions.
Scoring and evaluation as incentive design: The metric you score agents on IS the incentive function. If you score on speed, agents sacrifice quality. If you score on coverage, agents pad output. Goodhart's Law is a game-theoretic prediction: agents optimize for the metric, not the goal behind the metric.
Cooperative vs. competitive agent topologies: A pipeline (sequential agents) creates a principal-agent chain. A committee (parallel agents voting) creates a coordination game. A debate (adversarial agents) creates a zero-sum game. The topology choice IS a game design choice.
Emergent equilibria in agent loops: When agents interact repeatedly (iterative refinement, review cycles), they can converge on locally stable but globally suboptimal patterns — a bad equilibrium. Detecting this requires monitoring for convergence without improvement.
Output Format
Structure the analysis as follows:
🎮 Game Definition
- Players: [List with their roles and decision authority]
- Strategies: [Available actions per player]
- Payoffs: [What each player gains/loses — use a matrix for 2-player games]
- Information: [Who knows what, and when]
- Timing: [Simultaneous/sequential, one-shot/repeated]
🏷️ Game Classification
- Type: [Prisoner's Dilemma / Coordination / Stag Hunt / etc.]
- Why: [What structural feature maps to this archetype]
⚖️ Equilibrium Analysis
- Nash Equilibrium: [The stable outcome under self-interested play]
- Pareto Optimum: [The best collective outcome]
- Gap: [If these differ — the core problem to solve]
- Dynamics: [For repeated games — cooperation sustainability, reputation effects]
🔧 Mechanism Design Recommendations
- [Ranked interventions — which lever to pull and why]
- [For each: what changes, what new equilibrium emerges, what could go wrong]
- [Flag perverse incentives the mechanism might create]
⚠️ Strategic Risks
- What happens if a player discovers an exploit in the mechanism?
- Where might coalitions form to game the system?
- What information asymmetry could be weaponized?
Thinking Triggers
- "Why would a rational agent NOT cooperate here?" — find the defection incentive
- "What game are they actually playing?" — the stated game and the real game often differ
- "If I were optimizing selfishly, what would I do?" — reveals the equilibrium
- "Can I make the desired behavior also the self-interested behavior?" — the mechanism design question
- "What information would change the equilibrium?" — transparency as a design lever
- "Is this a one-shot game or repeated? Does the end date matter?" — finite vs. infinite horizon changes everything
- "Who's the residual claimant?" — who bears the cost of bad outcomes? That's who has the incentive to fix things
Interaction with Other Skills
- systems-thinking: Maps dynamics and feedback loops. Game theory adds strategic agency — systems thinking shows how the system behaves; game theory shows why rational agents make it behave that way.
- stakeholder-power-mapping: Identifies the players and their influence. Game theory formalizes what those players will do given their incentives.
- second-order-thinking: Traces consequence chains. Game theory adds strategic anticipation — "what will they do in response to what I do in response to what they do?"
- theory-of-constraints: Identifies the bottleneck. Game theory asks whether the bottleneck persists because someone benefits from it.
- mechanism design is the constructive application: Other skills diagnose. Game theory both diagnoses and designs — it's the only skill that lets you engineer incentive-compatible rules.
Example Application Triggers
- "Our agents keep converging on mediocre solutions" → identify the equilibrium, check if the scoring function creates a Prisoner's Dilemma where safe-but-mediocre is dominant
- "Nobody contributes to shared documentation" → Public Goods game, design contribution incentives or make non-contribution visible
- "Two teams can't agree on the API contract" → Bargaining game with outside options, identify the disagreement point and design a fair division
- "How should we allocate context window across agents?" → Auction/allocation mechanism, design for truthful reporting of agent needs
- "Why does the Copilot auto-review keep getting gamed?" → Principal-Agent problem with information asymmetry, agents know more about code than the review metric captures
- "We set up a great process but nobody follows it" → Check if following the process is a dominant strategy. If not, the process design is the bug.
More from andurilcode/skills
causal-inference
Apply causal inference whenever the user is interpreting metrics, debugging system behavior, reading A/B test results, or trying to understand whether an observed change was caused by an action or by something else. Triggers on phrases like "X caused Y", "since we deployed this, metrics changed", "the A/B test showed a lift", "why did this metric move?", "is this correlation or causation?", "we changed X and Y improved", "how do we know this worked?", "the data shows…", or any situation where conclusions are being drawn from observational data. Also trigger before any decision based on metric interpretation — confusing correlation with causation leads to interventions that don't work and misattribution of credit. Never assume causation without applying this skill.
30probabilistic-thinking
Apply probabilistic and Bayesian thinking whenever the user needs to reason under uncertainty, compare risks, prioritize between options, update beliefs based on new evidence, or make decisions without complete information. Triggers on phrases like "what are the odds?", "how likely is this?", "should I be worried about X?", "which risk is bigger?", "does this data change anything?", "is this a signal or noise?", "what's the probability?", "how confident are we?", or any situation where decisions are being made based on incomplete or ambiguous evidence. Also trigger when someone is treating uncertain outcomes as certainties, or when probability language is being used loosely ("probably", "unlikely", "very likely") without quantification. Don't leave uncertainty unexamined.
27inversion-premortem
Apply inversion and pre-mortem thinking whenever the user asks to evaluate a plan, strategy, architecture, feature, or decision before execution — or when they want to stress-test something that already exists. Triggers on phrases like "is this a good idea?", "what could go wrong?", "review this plan", "should we do this?", "are we missing anything?", "stress-test this", "what are the risks?", or any request to validate a decision or design. Use this skill proactively — if the user is about to commit to something, this skill should be consulted even if they don't ask for it explicitly.
23analogical-thinking
Apply analogical thinking whenever the user is designing a system, architecture, or process and would benefit from structural patterns that already exist in other domains — or when a problem feels novel but may have been solved elsewhere under a different name. Triggers on phrases like "how should we structure this?", "has anyone solved this before?", "we're designing from scratch", "what's a good model for this?", "I keep feeling like this resembles something", "what patterns apply here?", or when facing architecture, organizational, or process design decisions. Also trigger when a problem has been analyzed thoroughly but no good solution has emerged — the answer may exist in an adjacent domain. Don't reinvent what's been solved. Recognize the shape of the problem first.
22scenario-planning
Apply scenario planning whenever the user is making long-term decisions, building roadmaps, evaluating strategies, or operating in an environment with significant uncertainty about how the future will unfold. Triggers on phrases like "what should our roadmap look like?", "how do we plan for the future?", "what if things change?", "we're not sure which direction the market will go", "how do we make this strategy resilient?", "what's our plan B?", "what are the different futures we could face?", or when a plan assumes a single future state. Also trigger when someone is over-committed to one expected outcome and hasn't stress-tested the strategy against alternative futures. Don't plan for one future — plan for multiple.
21second-order-thinking
Apply second-order thinking whenever the user is making a decision, proposing a change, or evaluating an action — especially one that seems obviously good or obviously safe. Triggers on phrases like "let's just do X", "the obvious answer is", "we should change Y", "what happens if we do Z?", "should we implement this?", "will this work?", or any time a user proposes an intervention in a system involving people, incentives, markets, or complex processes. Also trigger when first-order analysis has already been done and the user needs to go deeper. Second-order thinking should be applied before any significant decision is made — don't wait to be asked.
20