◂ ALL REPLAYS
SCENARIOS / SC-017 / PRISONER'S DILEMMA
SC-017 Game Theory

Prisoner's Dilemma

Iterated Prisoner's Dilemma with truly simultaneous, synchronous moves.

Sync Tick FSM
P1 P2 opponent PAYOFF C D C D R,R S,T T,S P,P
SC-017 / SCHEMATICGame Theory
Clock 90 Hz tick
Update Synchronous
Strategies 4
Payoff T > R > P > S
Pairing Mutual reference
OVERVIEW

The iterated Prisoner's Dilemma with genuinely simultaneous moves. Players are paired by a mutual opponent reference and act each round under a strategy — tit-for-tat, always-cooperate, always-defect or random. Because the update is synchronous, every player's move is computed against a frozen snapshot of the previous round, so one player's choice cannot leak into the other's decision within the same round. Payoffs accumulate under the canonical ordering T > R > P > S.

A precise demonstration of synchronous update semantics, where simultaneity is a correctness property rather than an approximation. The strategy mix and resulting score trajectories are reproducible from the event log, making it a clean substrate for studying cooperation dynamics.

LIVE DATA

A live sample of the dataset this scenario generates.

Tournament replay — heatmap, score race and match cards FULLSCREEN ⤢
TRAITS
Sync
Advances on a single global clock
Tick
Discrete fixed-step time
FSM
Entities are finite-state machines
SCHEMA

Linked tables with guaranteed referential integrity.

TABLECOLUMNSDESCRIPTION
player ID, strategy, score, rounds_played, move, opp_move, opponent_id, current_state One row per player: strategy, cumulative score, rounds played, this round's move and the opponent's last move, plus the mutual opponent reference.
LIVE API

Generated REST endpoints. Also exposed as MCP tools.

POST /scenarios/prisoners-dilemma/experiments Seed a new tournament
POST /scenarios/prisoners-dilemma/experiments/{eid}/run Advance N rounds
GET /scenarios/prisoners-dilemma/experiments/{eid}/entities/player Read player scores and strategies
GET /scenarios/prisoners-dilemma/experiments/{eid}/events Append-only event log
GET /scenarios/prisoners-dilemma/experiments/{eid}/dataset Download the exported dataset
SEMANTIC LAYER

OSI-compatible definition, emitted with the dataset.

# prisoners-dilemma.osi.yaml — emitted automatically
semantic_model:
  name: "prisoners-dilemma"
  source: "duckdb://prisoners-dilemma.db"
  entities:
    - name: player
      primary_key: id
  dimensions:
    - name: state
      type: categorical
    - name: t
      type: time
  measures:
    - name: row_count
      agg: count
    - name: active
      agg: sum
      filter: "state = 'ACTIVE'"