Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Game theory lab

Find Nash equilibria of any two-player game, run a repeated prisoner's dilemma tournament with evolution, and explore hawk-dove and public goods games.

Each box: row player's payoff, then column player's payoff.

How to use

  1. Payoff matrix: pick a classic game or set the number of rows and columns, rename the strategies and type the two payoffs in each box (row player first). Press Find the equilibria. Bold numbers are best responses; a box where both are bold is a pure Nash equilibrium.
  2. Below the table you get every equilibrium, including mixed ones (players choosing at random with the shown chances), the dominated strategies removed step by step, and the outcomes nobody can improve on without hurting the other player.
  3. Dilemma tournament: tick the strategies, set the payoffs, rounds and a chance of mistakes, and run a round-robin tournament. The chart shows how a population of these strategies changes when the better-scoring ones grow.
  4. Hawk & dove finds the stable mix of fighters and sharers; Public goods shows why free riding tempts each player while hurting the group.

Keyboard and touch

TabMove between tabs, boxes and buttons
Enter in a boxWork out the current tab
Space on a strategyTick or untick it for the tournament
Wide tablesSwipe or scroll sideways on a phone

Tips

  • In the prisoner's dilemma, defecting is best whatever the other player does, so both defect and both end up worse off than if they had cooperated. That gap is what makes it a dilemma.
  • Games such as matching pennies and rock, paper, scissors have no pure equilibrium; the only stable plan is to be unpredictable, choosing each option with the right chance.
  • In repeated games, nice strategies that hit back and forgive (like tit for tat) tend to do well, as Robert Axelrod's tournaments found in 1980. Add mistakes and watch generous or win-stay strategies pull ahead.
  • The same seed always gives the same tournament, so you can share a result with someone else.
  • In hawk and dove, when fights cost more than the prize, a population settles at V ÷ C hawks: too many hawks and doves do better, too few and hawks do better.

About this lab

A Nash equilibrium is a pair of plans where neither player gains by changing alone. Mixed equilibria are found by support enumeration: for every pair of equally sized sets of strategies, the other player's chances are solved so that each strategy in the set pays the same, then checked for no better strategy outside it. This finds every equilibrium of a non-degenerate game; games with ties can have whole families of equilibria, of which this shows the corner points it finds. Strictly dominated strategies (worse against everything) are removed one at a time, rows first.

The tournament scores T, R, P and S per round as in Axelrod's tournaments; mistakes flip a chosen move with the given chance, drawn from a seeded random number generator. The evolution chart uses discrete replicator dynamics: each strategy's share is multiplied by its average score against the current population and divided by the population's average. The hawk-dove game (Maynard Smith and Price, 1973) adds a constant to every payoff for its chart so scores stay positive, which does not move the stable mix. The public goods game multiplies the pot and shares it equally among all players. These are models for learning, not predictions about real people.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product