AlexDunstan's picture
Add complete 2x2 normal-form game datasets (Parquet, zstd)
9ba0717 verified
|
Raw
History Blame Contribute Delete
4.38 kB
metadata
license: cc-by-4.0
pretty_name: Nash Equilibria of 2x2 Normal-Form Games
tags:
  - game-theory
  - nash-equilibrium
  - normal-form-games
  - combinatorics
  - synthetic
size_categories:
  - 100M<n<1B
configs:
  - config_name: default
    data_files:
      - split: payoffs_0_10
        path: matrices_2x2_0_to_10.parquet
      - split: payoffs_0_5
        path: matrices_2x2_0_to_5.parquet
      - split: payoffs_0_3
        path: matrices_2x2_0_to_3.parquet
      - split: payoffs_0_2
        path: matrices_2x2_0_to_2.parquet

Nash Equilibria of 2×2 Normal-Form Games

An exhaustive enumeration of every two-player 2×2 normal-form (bimatrix) game with non-negative integer payoffs in a fixed range, each annotated with its pure- and mixed-strategy Nash equilibria and a set of game-theoretic classifications.

Because the payoff space is enumerated completely, the largest split contains all 11^8 = 214,358,881 games with payoffs in 0..10 — not a sample.

Splits

Each split is the complete enumeration for a payoff range. Payoffs 0..k is a strict subset of payoffs 0..10 (identical rows), so the smaller splits are convenience subsets of payoffs_0_10.

split payoff range games (rows)
payoffs_0_10 0–10 214,358,881
payoffs_0_5 0–5 1,679,616
payoffs_0_3 0–3 65,536
payoffs_0_2 0–2 6,561
from datasets import load_dataset
ds = load_dataset("AlexDunstan/nash-equilibria-matrices", split="payoffs_0_10")

Game encoding

A 2×2 game has two players (p1, p2) choosing a row / column. Each of the 4 cells holds a payoff pair. The 8 payoff columns are named r{row}c{col}_p{player} (row-major, 0-indexed):

col 0 col 1
row 0 r0c0_p1, r0c0_p2 r0c1_p1, r0c1_p2
row 1 r1c0_p1, r1c0_p2 r1c1_p1, r1c1_p2

Columns (32)

Payoffs (8)r0c0_p1 … r1c1_p2: int8, the integer payoff to each player in each cell.

Equilibria

  • num_equilibria (int8): number of pure-strategy Nash equilibria.
  • equilibrium_positions (string): list of (row, col) pure-NE cells, e.g. "[(0, 0), (1, 1)]".
  • category (string): Solved if ≥1 pure NE, else Unsolved.

Structural flags (bool)

  • p1_has_dominant, p2_has_dominant, both_dominant: dominant-strategy existence.
  • is_zero_sum, is_symmetric: structural properties of the payoff matrix.
  • has_pareto_dom_ne, all_ne_pareto_eff: Pareto properties of the equilibria.

Welfare

  • max_welfare (int16): maximum total payoff (p1+p2) over all cells.
  • ne_welfare (string): total welfare at each NE, e.g. "[0, 2]".
  • welfare_loss (int16): efficiency gap between max_welfare and the equilibria.

Mixed-strategy equilibrium (populated for 2×2 games with no pure NE; null/empty otherwise)

  • mixed_exists (bool).
  • mixed_p, mixed_q (double): equilibrium mixing probabilities.
  • mixed_payoff_p1, mixed_payoff_p2 (double): expected payoffs under the mixed NE.

Payoff asymmetry at equilibria

  • ne_p1_payoffs, ne_p2_payoffs, ne_payoff_diffs (string): per-NE payoff lists and differences.
  • ne_has_equal_payoffs (bool).
  • ne_mean_abs_diff (double): mean absolute payoff difference across the equilibria.

Classification

  • game_type (string): a categorical label. Distribution over payoffs_0_10:
game_type rows
Harmony 56,150,160
Dominant (P1 only) 51,967,234
Dominant (P2 only) 51,967,234
Other 18,295,200
No Equilibrium 18,283,848
Deadlock 11,809,512
Prisoner's Dilemma 5,814,336
Zero-Sum 65,307
Coordination 6,050

List columns are stored as strings (Python repr of a list), for exact round-trip fidelity. Parse them with ast.literal_eval:

import ast
positions = ast.literal_eval(row["equilibrium_positions"])

Provenance

Games were generated by exhaustive Cartesian enumeration of the payoff space, then enriched with equilibrium detection and classification computed deterministically from the payoff matrix (no sampling, no randomness). Payoffs are compact integer types and repetitive categorical/list columns are dictionary-encoded, so the full 214M-row split is ~172 MB of Parquet.

License

CC-BY-4.0 — free to use with attribution.