GenerateRandomSearch

Nash Equilibrium Generator

An equilibrium is a cell neither player can improve on by changing their own choice alone. That is the whole definition, and it says less than people expect: an equilibrium need not be good for either player, nor the best total. The prisoner's dilemma is famous precisely because its only equilibrium is worse for both than an outcome they could reach by cooperating.

What this generator does

Builds a payoff grid where each cell gives both players a score, then finds every cell that is a pure Nash equilibrium: one where the row player cannot score higher by picking a different row, and the column player cannot score higher by picking a different column.

How to use this tool

  1. Choose how many strategies each player has and generate a grid.
  2. For each cell, ask whether either player would rather have chosen differently.
  3. Compare your answer with the marked cells.
  4. Generate several — some games have one equilibrium, some several, some none at all.

Understanding the controls

Row strategies
Between 2 and 4 choices for the first player. More strategies make equilibria harder to spot by eye and more interesting to hunt for.
Column strategies
Between 2 and 4 choices for the second player. The grid need not be square.
Seed
Any word reproduces exactly the same payoff grid and the same equilibria.

Common use cases

  • Game theory practice with answers found by definition rather than inspection
  • Teaching what an equilibrium is and, more usefully, what it is not
  • Generating payoff grids for a lesson or a problem set
  • Showing that a game can have no equilibrium in pure strategies
  • Setting the same game twice from a seed

How this generator works

The definition is applied directly, with no shortcuts: for every cell, each of the row player's alternatives is checked against that same column, and each of the column player's alternatives against that same row. A cell survives only if neither player has anything better. Because that is exactly what an equilibrium means, the check and the search agree by construction — and the checker runs it a second time independently before display.

Randomness and fairness

The payoffs are random; the equilibria are then found deterministically. A seed reproduces the same game exactly and is therefore explicitly not cryptographically secure. Without a seed the browser's cryptographically secure generator is used.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Pure strategies only. A game with no pure equilibrium still has one in mixed strategies — playing randomly in the right proportions — and that is not computed here.
  • Two players, one simultaneous move each. Sequential games need a game tree instead.
  • Payoffs are arbitrary whole numbers rather than modelling any particular situation.
  • Complete information is assumed: both players see the whole grid.
  • A generated game is not kept, so note the seed if the payoffs matter.

Privacy and your data

The grid and the search are computed entirely in your browser. Nothing about the game or your seed is transmitted or kept.