Skip to content

Main content

Random Payoff Matrix Game Generator

Generate bounded two-player integer payoff matrices and a random initial profile, delegate all pure Nash equilibria and fixed-count row-then-column best responses with lowest-index tie breaking, and annotate repeated profiles; no mixed-equilibrium solver or convergence guarantee.

Loading tool…

Description

Generate bounded two-player integer payoff matrices and a random initial profile, delegate all pure Nash equilibria and fixed-count row-then-column best responses with lowest-index tie breaking, and annotate repeated profiles; no mixed-equilibrium solver or convergence guarantee.

An optimization instance defines choices, constraints, and an objective. A feasible witness demonstrates that its stated constraints can be met; it establishes optimality only when the tool actually computes and verifies an optimum.

Generate bounded two-player integer payoff matrices and a random initial profile, delegate all pure Nash equilibria and fixed-count row-then-column best responses with lowest-index tie breaking, and annotate repeated profiles; no mixed-equilibrium solver or convergence guarantee.

When to use this tool

Use this generator to create reproducible payoff matrix game cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply rowStrategies, columnStrategies, minimumPayoff, maximumPayoff, iterations in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read rowPayoffs, columnPayoffs, initial, equilibria, trace, summary. Use the conventions below and keep answer-bearing fields separate when presenting an exercise.

Draw independent row and column payoff matrices and a starting action profile. Delegate pure Nash equilibria and best-response dynamics, annotate each trace profile's equilibrium membership, and record the first repeated profile step.1

Delegated operations used for this result: pure nash equilibria; best response dynamics. Their calculation or parsing conventions apply to the corresponding result fields.2, 3

Input fieldMeaning and unitsAccepted input
rowStrategiesRow StrategiesRequired. Safe integer; minimum 1; maximum 16.
columnStrategiesColumn StrategiesRequired. Safe integer; minimum 1; maximum 16.
minimumPayoffMinimum PayoffRequired. Safe integer.
maximumPayoffMaximum PayoffRequired. Safe integer.
iterationsIterationsRequired. Safe integer; minimum 1; maximum 128.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
rowPayoffsRow PayoffsRequired. Array of Array of Safe integer.; minimum items 1; maximum items 16.; minimum items 1; maximum items 16.
columnPayoffsColumn PayoffsRequired. Array of Array of Safe integer.; minimum items 1; maximum items 16.; minimum items 1; maximum items 16.
initialInitialRequired. Object; no unknown keys.
initial.rowActionRow ActionRequired. Safe integer; minimum 0; maximum 15.
initial.columnActionColumn ActionRequired. Safe integer; minimum 0; maximum 15.
equilibriaEquilibriaRequired. Array of Object; no unknown keys.; maximum items 256.
equilibria[].rowStrategyRow StrategyRequired. Safe integer; minimum 0; maximum 15.
equilibria[].columnStrategyColumn StrategyRequired. Safe integer; minimum 0; maximum 15.
equilibria[].rowPayoffRow PayoffRequired. Safe integer.
equilibria[].columnPayoffColumn PayoffRequired. Safe integer.
traceTraceRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 128.
trace[].rowActionRow ActionRequired. Safe integer; minimum 0; maximum 15.
trace[].columnActionColumn ActionRequired. Safe integer; minimum 0; maximum 15.
trace[].stepStepRequired. Safe integer; minimum 1; maximum 128.
trace[].isPureEquilibriumIs Pure EquilibriumRequired. Boolean.
summarySummaryRequired. Object; no unknown keys.
summary.equilibriumCountEquilibrium CountRequired. Safe integer; minimum 0; maximum 256.
summary.firstRepeatedProfileStepFirst Repeated Profile StepRequired. Safe integer; minimum 1; maximum 128. or Null.
randomnessReplay metadata: source is seed or context; seed is the normalized 32-bit seed or null for a context source.Required. Object; no unknown keys.
randomness.seedOptional numeric replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "rowStrategies": 2,
    "columnStrategies": 2,
    "minimumPayoff": 0,
    "maximumPayoff": 4,
    "iterations": 3,
    "seed": 42
  },
  "output": {
    "rowPayoffs": [
      [
        3,
        2
      ],
      [
        4,
        3
      ]
    ],
    "columnPayoffs": [
      [
        0,
        2
      ],
      [
        1,
        3
      ]
    ],
    "initial": {
      "rowAction": 1,
      "columnAction": 0
    },
    "equilibria": [
      {
        "columnPayoff": 3,
        "columnStrategy": 1,
        "rowPayoff": 3,
        "rowStrategy": 1
      }
    ],
    "trace": [
      {
        "columnAction": 1,
        "rowAction": 1,
        "step": 1,
        "isPureEquilibrium": true
      },
      {
        "columnAction": 1,
        "rowAction": 1,
        "step": 2,
        "isPureEquilibrium": true
      },
      {
        "columnAction": 1,
        "rowAction": 1,
        "step": 3,
        "isPureEquilibrium": true
      }
    ],
    "summary": {
      "equilibriumCount": 1,
      "firstRepeatedProfileStep": 2
    },
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • A game can have no pure equilibrium and dynamics can cycle. This does not solve mixed equilibria, guarantee convergence, or represent real actors; strategy indexes are zero-based.
  • A replay requires the same complete input and implementation. Randomized construction does not guarantee uniform coverage of every feasible output; finite samples can repeat unless a distinct-selection rule is explicitly stated.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random Payoff Matrix Game Generator — tool.io

  2. Calculation or validation: game-theory/pure-nash-equilibria — tool.io

  3. Calculation or validation: game-theory/best-response-dynamics — tool.io

Similar or alternative tools

  • Random Interval Scheduling Challenge Generator

    Generate synthetic positive-duration half-open jobs and solve the declared count or weight objective exactly with finish-time dynamic programming, retaining one optimum with exclusion on objective ties.

  • Random Job-Shop Scheduling Instance Generator

    Generate positive integer processing times and a per-job random machine permutation with a feasible job-priority schedule witness; no makespan optimality claim.