Game Theory
calculator.
Find every Nash equilibrium of a two-player game, pure and mixed, from its payoffs.
| C1 | C2 | |
|---|---|---|
| R1 | ||
| R2 |
- Row maximin
- 0
- Row minimax
- 1
- Left after dominance
- 2 × 2
There are 2 pure equilibria, so the players need some way to agree on one. The mixed one pays less, 0.6667 and 0.6667, because they miss each other part of the time.
Every equilibrium found
| Equilibrium | Row plays | Column plays | Payoffs |
|---|---|---|---|
| E1Purepays 2 and 1 | R1 always | C1 always | 2,1 |
| E2Purepays 1 and 2 | R2 always | C2 always | 1,2 |
| E3Mixedpays 0.6667 and 0.6667 | R123R213 | C113C223 | 23,23 |
Where the best responses cross
p is the chance the row player picks R1 and q the chance the column player picks C1. The lines cross at E1 (p 1, q 1), E2 (p 0, q 0), E3 (p 0.6667, q 0.3333).
Working
- 1Best responses: each player's top payoff against each choice of the otherCells marked twice: (R1, C1), (R2, C2)
- 2Dominated strategiesNo strategy dominates another
- 3Remove strictly dominated strategies, again and againRows left: R1, R2. Columns left: C1, C2
- 4Mixed: p makes the column player indifferent between C1 and C2p =2 − 01 − 0 − 0 + 2=23
- 5Mixed: q makes the row player indifferent between R1 and R2q =1 − 02 − 0 − 0 + 1=13
- 6Security levels for the row playerMaximin = 0, minimax = 1
- 7Check: no player gains by switching alone at any equilibriumE1: rows pay2,0; columns pay1,0E2: rows pay0,1; columns pay0,2E3: rows pay23,23; columns pay23,23
How it's worked out
A game here has two players who choose at the same time. The row player picks a row and the column player picks a column, and each cell holds two payoffs: the first for the row player, the second for the column player. In a zero-sum game you type only the row payoff, and the column player gets the same amount with the sign flipped.
Von Stengel's survey defines a best response as a strategy that gives the highest expected payoff against what the other player does. A Nash equilibrium is a pair of strategies that are best responses to each other, so neither player gains by changing alone. The tool first marks every cell where both payoffs are best responses: those are the pure equilibria.
A mixed strategy picks each option with some chance. The key rule, Theorem 2.1 in that survey, is that a player only mixes options that pay equally well against the other player's mix. So each player's chances are set by the other player's payoffs. In a 2 by 2 game, with the column player's payoffs e and g in row 1 and h and k in row 2, the row player plays R1 with chance p.
The second line uses the row player's payoffs a and b in row 1 and c and d in row 2, and gives the chance q that the column player plays C1. For larger games the tool tries every pair of strategy sets of the same size, solves the matching equations, and keeps the answers whose chances are all at least 0 and where no unused strategy pays more.
It also removes dominated strategies. A strategy is strictly dominated when another one pays more against everything the other player might do, so a player who wants the most payoff never uses it. Removing it can make another strategy dominated, so the step repeats until nothing more goes.
Worked examples
Two friends pick a concert in Battle of the Sexes
Both would rather go together than alone, but the row player prefers the first show (2 against 1) and the column player the second. Going to different shows pays 0 to both. There are 2 pure equilibria, (R1, C1) and (R2, C2), plus one mixed.
So the row player goes to the first show with chance , and the column player with chance . Each expects a payoff of , less than either pure equilibrium, because they end up at different shows much of the time.
Two suspects face the Prisoner's Dilemma
Payoffs are years lost, so higher is better. Staying quiet (R1, C1) costs each 1 year if both do it, but a suspect who talks while the other stays quiet goes free. R2 strictly dominates R1 for the row player, and C2 strictly dominates C1 for the column player.
Removing the dominated strategies leaves 1 by 1, so the only equilibrium is (R2, C2), paying −2 each. Both would be better off at (R1, C1), but neither can trust the other to stay there.
Rock-Paper-Scissors as a zero-sum game
A win pays 1 and a loss pays −1. Every pure choice can be beaten, so no cell is a best response for both players and there is no pure equilibrium.
The only equilibrium has each player choose each option with chance . Against that mix every reply pays the same, 0, so neither player can do better by leaning one way.
Reading your result
An equilibrium is stable, not best. It only says no player gains by switching alone. The Prisoner's Dilemma shows a stable outcome that both players would happily swap for another one.
Several equilibria raise a new question. In the Stag Hunt both (R1, C1) and (R2, C2) are equilibria, and the mixed one has each player choose R1 with chance . The calculator cannot say which one the players will reach. That depends on trust, habit or talk before the game.
Maximin is what you can guarantee. The row player's maximin is the best of the worst cases over rows. In a zero-sum game, a mixed equilibrium closes the gap between maximin and minimax. In Matching Pennies maximin is −1 and minimax is 1, while the mixed equilibrium pays 0. That is Theorem 2.3 in the survey.
Only the order and gaps of payoffs matter. Adding the same amount to all of one player's payoffs, or multiplying them by the same positive number, leaves every equilibrium where it was.
Common mistakes
- Using your own payoffs to set your own mix. Your chances are chosen to make the other player indifferent, so they come from the other player's payoffs.
- Mixing up the two numbers in a cell. The first is the row player's, the second the column player's. Swapping them swaps whose problem you solve.
- Removing a weakly dominated strategy as if it were strict. A weakly dominated strategy can still be part of an equilibrium, so only strict dominance is removed here.
- Expecting real players to mix exactly. The mixed chances describe a balance point. People in a single round may not randomize at all.