Math paradoxes

Glossary / Nash equilibrium

Glossary · Nash equilibrium

Why do two smart players choose what is worse for both?

A game is any situation where your result depends on more than just you: competitors' prices, negotiations, penalty kicks, choosing a lane in a traffic jam. In 1950 the mathematician John Nash proposed a simple way to predict how such a game ends: look for a state that nobody wants to leave on their own. Such a state is stable. But, as it turns out, it doesn't have to be good at all.

In plain wordspictures, analogies, small numbers

“In plain words” is hidden on all puzzles.

The prisoner's dilemma

Two accomplices are held in separate rooms and can't talk to each other. The investigator offers each of them the same deal: testify against your partner. The sentences are:

Both stay silentlittle evidence: 1 year each
Both betray5 years each
One betrays, the other is silentthe traitor walks free, the silent one gets 10 years
Each cares only about himselfand knows all these rules, as does his partner

What will two smart prisoners do?

Arrows of temptation

An equilibrium is easy to spot by eye. Stand in a cell of the table and ask each player: "Do you want to change your choice if the other one keeps theirs?" If they do, draw an arrow to where they are pulled. A cell with no arrows leading out of it is an equilibrium. Switch between the games and tap the cells.

The penalty paradox: the best kick is a random one

In a penalty there is no cell without arrows: wherever the kicker shoots, the keeper wants to dive the same way, and then the kicker wants to shoot the other way. It seems the cleverer one wins. Check it. You take the kicks, a bot keeps goal. It dives where it expects you to shoot, and it learns from every kick you take. Try to beat it: alternate, bluff, cover your tracks.

Your goals–
The bot read your side–
The coin's goals–

A simplification: if the keeper picks the right side he saves, if not it's a goal. The bot looks for patterns in your last few kicks (up to four in a row) and in which side you favour. It studies the coin's kicks separately.

People are bad at making up randomness: we alternate too often, avoid three of the same in a row, have a favourite side. The bot catches that. A coin has no habits, so even the cleverest keeper reads it only half the time. That is the equilibrium of the penalty: shoot left and right at random, 50% each. Here the equilibrium is not a particular kick but unpredictability.

Rigoroustables, charts, formulas

“Rigorous” is hidden on all puzzles.

What a Nash equilibrium is

A Nash equilibrium is a set of choices, one per player, in which nobody gains by changing their own choice while the others keep theirs. Each one plays the best they can in reply to what the others do. The test is always the same: freeze everyone but one player and ask whether that player can do better alone. If no one can, it is an equilibrium.

  • Stability, not benefitAn equilibrium says where a game comes to rest, not where everyone is well off. In the prisoner's dilemma both are better off silent, but that state is unstable.
  • Only one at a timeEach player is checked separately. If only two players moving together could gain, the equilibrium still stands. That's why agreements are so valuable and so fragile.
  • There may be severalThe stag hunt has two equilibria, and so does chicken. Mathematics doesn't say which one will happen: trust, custom and history decide.
  • Sometimes only with a coinIn a penalty or in rock, paper, scissors there is no stable single choice. An equilibrium appears once players are allowed to mix their moves at random.

A village of hunters: how much trust it takes

Every day the hunters go out in pairs. A stag can only be caught by two, and then each gets 4 baskets of meat. Anyone can catch a hare alone, and it is always 3 baskets. Whoever goes for the stag while the partner chases a hare comes home empty. The stag is better for everyone. So if most hunters are willing to go for the stag at the start, the village will get there sooner or later, right? Set what share of hunters trust their partners at the start. Each day a few people look at how the village hunted yesterday and pick whatever pays more.

Stag hunters · start–
Stag hunters · today–
Trust threshold–

200 hunters. A dark dot goes for the stag, a light one for a hare. Each day each hunter reconsiders with probability 15%, comparing 4 × (share going for the stag) with a sure 3 baskets.

Both ends are stable: when everyone goes for the stag, defecting means 3 instead of 4; when everyone chases hares, going for the stag alone means 0 instead of 3. There are two equilibria here, and the better one needs more than three quarters of the village to trust already. Otherwise every cautious step drags the rest towards the worse one.

Where equilibria live

  • Prices and cartelsTwo shops gain by keeping prices high together, but each alone is tempted to cut a little and grab the customers. That's why producers' cartels so often fall apart even without the state stepping in.
  • Arms races and dopingThe same prisoner's dilemma: if the rival arms or dopes you can't fall behind, and if not, it's an easy win. Everyone pays, no one gets ahead.
  • Which side of the road"Everyone drives on the right" is an equilibrium: nobody wants to drive on the left alone. So is "everyone drives on the left". Countries live in different equilibria, and both are equally good.
  • Rock, paper, scissorsThe only equilibrium is each sign at random, a third each. Any habit, such as "after a loss I switch", hands the opponent an edge, just like the goalkeeper bot above.
  • AnimalsIn 1973 John Maynard Smith and George Price applied the same logic to animal contests: a behaviour that no "mutant" can push out looks like a Nash equilibrium. That is how they explained why fights between animals of one species so often look like a ritual rather than a fight to the death.

A few more strange consequences

  • The bar scene in "A Beautiful Mind" is not an equilibriumIn the film Nash suggests to his friends that nobody approaches the most attractive woman and each goes for one of her friends, so nobody gets in anyone's way. But if everyone does that, each of them alone gains by going to her: there's no competition. A state that everyone is tempted to leave is not an equilibrium. Many economists have pointed this out, and Simon Anderson and Maxim Engers analysed the game in its own paper.
  • Throw away the wheel to winIn chicken two cars race towards each other. Both equilibria are unfair: one swerves, the other doesn't. Whoever first ostentatiously throws the steering wheel out of the window forces the other to swerve. Losing your options becomes an advantage.
  • A smarter opponent costs you nothingIf you kick penalties 50-50 at random, it doesn't matter how clever the keeper is: he reads half. An equilibrium strategy protects you against the best opponent, but it doesn't punish a bad one either. To beat a weak player you have to leave the equilibrium.
Deepergeneralisations, theory, history

“Deeper” is hidden on all puzzles.

The formula and Nash's theorem

ui(si*, s−i*) ≥ ui(si, s−i*)  for every player i and every strategy si of theirs

Here ui is player i's payoff, si* their equilibrium strategy and s−i* everyone else's strategies. The inequality is exactly "changing alone doesn't pay". A strategy may be mixed, that is, a set of probabilities: "left with probability 1/2, right with 1/2". Then ui is the expected payoff.

Nash's theorem (1950). Every game with finitely many players and moves has at least one equilibrium, if mixed strategies are allowed. The proof rests on a fixed-point theorem: the map "everyone switches to their best reply" has a point it doesn't move. That's why penalties and rock, paper, scissors have an equilibrium even though they have no cell without arrows.

The indifference principle

How do you find a mixed equilibrium? Each player mixes so as to make the opponent indifferent between choices: if one reply were better, the opponent would only play that one, and mixing would make no sense. Take a kicker with a strong and a weak side. If the keeper guesses wrong, it is always a goal. If he guesses right, the strong side still scores 70% of the time, the weak side 50%.

q · 0,3 = (1 − q) · 0,5  ⇒  q = 0,5 / 0,8 = 5/8 = 62,5%

You should shoot to the strong side 62.5% of the time, and in equilibrium the keeper dives there with the same frequency of 62.5%. Then 81.25% of kicks score, and it is the same for both sides: 0.625 · 0.7 + 0.375 · 1 = 0.625 · 1 + 0.375 · 0.5 = 0.8125. It might seem best to always shoot to the strong side. But then the keeper would always dive there, and only 70% would go in.

Hence a testable prediction: in equilibrium the share of goals is the same whichever way you shoot, and kicks don't depend on earlier ones. Ignacio Palacios-Huerta tested it on 1,417 penalties from European leagues in 1995–2000 ("Professionals Play Minimax", 2003). Both signs held: the scoring shares by side are statistically the same, and the sequences of kicks are unpredictable.

Take some penalties above, and your scoring shares by side will appear here.

Where the idea came from

  • One page by a 21-year-old studentJohn Nash, a Princeton graduate student, submitted a short paper, "Equilibrium Points in n-Person Games", to PNAS in November 1949; it appeared in January 1950. 44 years later, in 1994, the idea won him the Nobel memorial prize in economics, shared with John Harsanyi and Reinhard Selten.
  • Before NashAntoine Cournot found such an equilibrium as early as 1838 for two producers choosing quantities. John von Neumann proved the minimax theorem in 1928 for games where one player's gain is the other's loss. Nash extended the idea to any game and any number of players.
  • The prisoner's dilemma was born as an objectionIn January 1950 Merrill Flood and Melvin Dresher at the RAND Corporation ran an experiment: two colleagues played a game with this structure many times in a row. They often cooperated, though the equilibrium says to betray. The story of the two prisoners was made up for the game by the mathematician Albert Tucker to explain it to an audience.

Where it shows up

More on “Games and logic”

All terms →