game-theory-tit-for-tat

Apply Tit for Tat strategy for negotiations, relationships, and repeated interactions. Use when navigating workplace dynamics, building partnerships, handling conflicts, or designing systems with reciprocal interactions.

210 stars

Best use case

game-theory-tit-for-tat is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Apply Tit for Tat strategy for negotiations, relationships, and repeated interactions. Use when navigating workplace dynamics, building partnerships, handling conflicts, or designing systems with reciprocal interactions.

Teams using game-theory-tit-for-tat should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/game-theory-tit-for-tat/SKILL.md --create-dirs "https://raw.githubusercontent.com/flpbalada/my-opencode-config/main/skills/game-theory-tit-for-tat/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/game-theory-tit-for-tat/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How game-theory-tit-for-tat Compares

Feature / Agentgame-theory-tit-for-tatStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Apply Tit for Tat strategy for negotiations, relationships, and repeated interactions. Use when navigating workplace dynamics, building partnerships, handling conflicts, or designing systems with reciprocal interactions.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Tit for Tat - Game Theory Strategy

Tit for Tat (TFT) is a strategy from game theory for repeated interactions. It
famously won Robert Axelrod's computer tournaments by being simple yet
remarkably effective. The strategy succeeds not by "beating" others, but by
achieving the best possible mutual outcome.

## When to Use This Skill

- Navigating workplace relationships and conflicts
- Building long-term business partnerships
- Handling negotiations with repeat interactions
- Designing reputation and trust systems
- Managing team dynamics
- Resolving ongoing disputes

## The Strategy

```
Tit for Tat Rules:

┌─────────────────────────────────────────────────────────────────┐
│                                                                  │
│   RULE 1: COOPERATE first                                       │
│           Start every new relationship with trust               │
│                                                                  │
│   RULE 2: MIRROR their last move                                │
│           If they cooperated → Cooperate                        │
│           If they defected  → Defect                            │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘
```

## The Four Qualities

```
Why TFT Wins:

┌──────────────┬───────────────────────────────────────────────────┐
│   NICE       │ Never defects first                               │
│              │ Starts with cooperation and good faith            │
├──────────────┼───────────────────────────────────────────────────┤
│   RETALIATORY│ Immediately punishes defection                    │
│              │ Prevents exploitation                             │
├──────────────┼───────────────────────────────────────────────────┤
│   FORGIVING  │ Returns to cooperation after one punishment       │
│              │ Enables recovery of relationships                 │
├──────────────┼───────────────────────────────────────────────────┤
│   CLEAR      │ Pattern is easy to recognize                      │
│              │ Opponents learn cooperation is rewarded           │
└──────────────┴───────────────────────────────────────────────────┘
```

## Understanding the Payoff Matrix

```
Prisoner's Dilemma Payoffs:

                    Partner's Choice
                    ┌─────────────┬─────────────┐
                    │  COOPERATE  │   DEFECT    │
         ┌──────────┼─────────────┼─────────────┤
    Your │COOPERATE │  Win-Win    │  You Lose   │
   Choice│          │  (3, 3)     │  (0, 5)     │
         ├──────────┼─────────────┼─────────────┤
         │ DEFECT   │  You Win    │  Lose-Lose  │
         │          │  (5, 0)     │  (1, 1)     │
         └──────────┴─────────────┴─────────────┘

In single games: Defection seems better (5 > 3)
In repeated games: Mutual cooperation wins (3+3+3... > 5+1+1...)
```

## Application Framework

### Step 1: Assess the Interaction Type

```
Is TFT appropriate?

Repeated interaction?
├── YES → TFT applies
└── NO  → One-shot game (different strategy needed)

Shadow of the future?
├── Will interact again → TFT works well
└── No future interaction → Less effective

Can they observe your response?
├── YES → TFT signals clearly
└── NO  → Communication needed
```

### Step 2: Determine Your Starting Position

```
First Move Decision:

New relationship?
└── COOPERATE (be nice)

Existing relationship?
├── Their last action was cooperative → COOPERATE
└── Their last action was defection → DEFECT (once)

After punishment?
└── If they cooperate again → COOPERATE (forgive)
```

### Step 3: Execute and Communicate

| Situation        | Action    | Communication                           |
| ---------------- | --------- | --------------------------------------- |
| New relationship | Cooperate | "I'm starting with trust"               |
| They cooperated  | Cooperate | Reinforce positive cycle                |
| They defected    | Defect    | "This response is to [specific action]" |
| After punishment | Cooperate | "Let's move forward"                    |

## Output Template

After analyzing a situation, document as:

```markdown
## Tit for Tat Analysis

**Situation:** [Description]

**Date:** [Date]

### Relationship Assessment

| Factor                | Status                                       |
| --------------------- | -------------------------------------------- |
| Repeated interaction? | Yes/No                                       |
| History               | [Cooperative/Mixed/Adversarial]              |
| Their last move       | [Cooperate/Defect]                           |
| Current state         | [In good standing/Punishment phase/Recovery] |

### Recommended Action

**Action:** [Cooperate/Defect]

**Rationale:** [Based on which TFT principle]

### Communication Plan

**If Cooperating:**

- [What to say/do]
- [How to reinforce positive dynamic]

**If Defecting (Retaliating):**

- [Specific response to their defection]
- [Clear signal that cooperation will resume if they cooperate]
- [Avoid over-punishment]

### Exit Conditions

| If They...            | Then I...                    |
| --------------------- | ---------------------------- |
| Return to cooperation | Immediately forgive          |
| Continue defecting    | Continue matching            |
| Escalate              | [Boundary for disengagement] |
```

## Real-World Applications

### Workplace Relationships

```
Scenario: Coworker missed deadline affecting your work

TFT Response:

Be Nice (initially):
├── Assume competence and good faith
├── Give benefit of doubt first time
└── Don't preemptively retaliate

Be Retaliatory (this incident):
├── Address directly: "The report wasn't sent as agreed"
├── Ask what happened
├── Set clear expectation for next time
└── Don't let it slide (prevents exploitation)

Be Forgiving (after):
├── Once addressed and they commit to improve
├── Drop the issue completely
├── Don't bring it up in future interactions
└── Don't hold a grudge

Be Clear:
├── Your response should be predictable
├── They should know: cooperate = good, defect = consequences
└── Make pattern obvious so they can adjust
```

### Business Negotiations

```
Scenario: Partnership negotiation

TFT Approach:

Opening (Nice):
├── Make first good-faith offer or concession
├── Signal you want win-win outcome
└── Don't start with extreme position

Response to Their Move:

If they make reasonable offer:
└── Match with reasonable counter

If they lowball aggressively:
├── Match their firmness
├── Don't concede further
└── Show you won't be exploited

Recovery Path:
├── Moment they move to reasonable position
├── You move to reasonable position too
└── Signal: cooperation = path to deal
```

### Personal Relationships

```
Scenario: Friend cancelled plans last minute

TFT Application:

Nice (default):
├── Assume good reason
├── Don't catastrophize
└── Be understanding this time

Retaliatory (if pattern emerges):
├── Set boundary: "When plans change last minute, it affects me"
├── Communicate clearly
├── Reduce investment in future plans with them

Forgiving (if they adjust):
├── When they make effort to be reliable
├── Immediately return to full engagement
├── Don't "echo" past cancellations

Handle Noise:
├── Clarify intent before retaliating
├── "When you cancelled, was something wrong?"
├── Miscommunication shouldn't start death spiral
```

## Known Weaknesses

### 1. Noise Problem

```
The Death Spiral:

Misunderstanding occurs:
├── You cooperated, they perceived defection
├── They defect in response
├── You defect in response
├── Alternating defections continue
└── Both lose, neither recovers

Solution: Generous Tit for Tat
├── Occasionally forgive defection (10% random)
├── Breaks accidental cycles
├── Better in "noisy" environments
└── Communicate to clarify perceived defections
```

### 2. Credibility Problem

```
The Punishment Paradox:

After they defect:
├── TFT says: retaliate
├── But: retaliation is costly to you too
├── Rational choice: forgive and return to cooperation
└── If they know this, threat isn't credible

Solution: Commit to retaliation
├── Make punishment automatic
├── Reputation for following through
├── Short-term cost for long-term credibility
```

## Variants

| Variant              | Modification                      | Best For             |
| -------------------- | --------------------------------- | -------------------- |
| **Generous TFT**     | Randomly forgive some defections  | Noisy environments   |
| **Tit for Two Tats** | Only retaliate after 2 defections | Cautious approach    |
| **Suspicious TFT**   | Start with defection              | Hostile environments |
| **Gradual TFT**      | Escalating punishment             | Repeat offenders     |

## Integration with Other Methods

| Method                  | Combined Use                |
| ----------------------- | --------------------------- |
| **Five Whys**           | Why did they defect?        |
| **Loss Aversion**       | Defection = loss framing    |
| **Trust Psychology**    | TFT builds/maintains trust  |
| **Negotiation**         | TFT as negotiation backbone |
| **Conflict Resolution** | Framework for de-escalation |

## Quick Reference

```
TIT FOR TAT DECISION TREE

New interaction?
└── COOPERATE (be nice)

They just cooperated?
└── COOPERATE (reward)

They just defected?
├── DEFECT once (retaliate)
└── Then if they cooperate → COOPERATE (forgive)

Unclear if defection was intentional?
├── COMMUNICATE first
└── "Was that intentional?" before retaliating

Stuck in defection cycle?
├── Unilaterally cooperate once
├── See if they break cycle
└── If not, reassess relationship
```

## Questions for Situational Analysis

When applying TFT, consider:

1. **What's your primary goal?**
   - Repair relationship (break death spiral)
   - Build new partnership
   - Navigate competitive environment

2. **How noisy is your environment?**
   - High noise → Use Generous TFT
   - Low noise → Standard TFT works

3. **Individual or group?**
   - 1:1 → TFT works well
   - Group → More complex dynamics

## Resources

- [The Evolution of Cooperation - Robert Axelrod](https://www.goodreads.com/book/show/366821.The_Evolution_of_Cooperation)
- [Veritasium: The Prisoner's Dilemma](https://www.youtube.com/watch?v=mScpHTIi-kM)
- [Game Theory 101](https://www.gametheory101.com/)
- [Behavioral Game Theory - Colin Camerer](https://www.goodreads.com/book/show/469689.Behavioral_Game_Theory)

Related Skills

what-not-to-do-as-product-manager

210
from flpbalada/my-opencode-config

Anti-patterns and mistakes to avoid as a product manager. Use when evaluating leadership behaviors, improving team dynamics, reflecting on management practices, or onboarding new product managers.

visual-cues-cta-psychology

210
from flpbalada/my-opencode-config

Design effective CTAs using visual attention and gaze psychology principles. Use when designing landing pages, button hierarchies, conversion elements, or optimizing user attention flow through interfaces.

vercel-sandbox

210
from flpbalada/my-opencode-config

Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include "Vercel Sandbox browser", "microVM Chrome", "agent-browser in sandbox", "browser automation on Vercel", or any task requiring Chrome in a Vercel Sandbox.

value-realization

210
from flpbalada/my-opencode-config

Analyze if end users discover clear value. Use when evaluating product concepts, analyzing adoption, or uncertain about direction.

user-story-fundamentals

210
from flpbalada/my-opencode-config

Capture requirements from user perspective with structured user stories. Use when writing backlog items, defining acceptance criteria, prioritizing features, or communicating requirements between product and development.

typescript-satisfies-operator

210
from flpbalada/my-opencode-config

Guides proper usage of TypeScript's satisfies operator vs type annotations. Use this skill when deciding between type annotations (colon) and satisfies, validating object shapes while preserving literal types, or troubleshooting type inference issues.

typescript-interface-vs-type

210
from flpbalada/my-opencode-config

Guides when to use interface vs type in TypeScript. Use this skill when defining object types, extending types, or choosing between interface and type aliases.

typescript-best-practices

210
from flpbalada/my-opencode-config

Guides TypeScript best practices for type safety, code organization, and maintainability. Use this skill when configuring TypeScript projects, deciding on typing strategies, writing async code, or reviewing TypeScript code quality.

typescript-advanced-types

210
from flpbalada/my-opencode-config

Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.

trust-psychology

210
from flpbalada/my-opencode-config

Build trust signals that reduce perceived risk and enable user action. Use when designing landing pages, checkout flows, onboarding experiences, or any conversion point where user hesitation is a barrier.

theme-epic-story

210
from flpbalada/my-opencode-config

Structure product work hierarchically using themes, epics, and stories. Use when organizing backlogs, planning releases, communicating with stakeholders, or breaking down large initiatives into manageable work.

tailwind-v4-configuration

210
from flpbalada/my-opencode-config

Configure Tailwind CSS v4 with CSS-first approach. Use when installing, migrating from v3, setting up build tools (Vite/PostCSS/CLI), customizing themes with @theme, or configuring plugins.