Algorithmic Game Theory · Lecture Notes
Chapter 3: Nash Equilibrium
In a game, each player's payoff depends not only on their own choice but also on the choices of the others. "What should I do?" therefore cannot be separated from "What will they do?" The Nash equilibrium is the concept that breaks this circle: when everyone correctly anticipates the others' choices, no one wants to change their own. These notes start from the definition and move on to methods of computation, the existence theorem, the problem of choosing among multiple equilibria, and zero-sum games. The last topic is how hard it is for a computer to find an equilibrium.
Learning outcomes
- Definition
- Define the Nash equilibrium formally and relate it to the notion of best response.
- Finding pure equilibria
- Mark best responses in a payoff matrix, apply iterated elimination of dominated strategies, and find the equilibrium of games with continuous strategies such as Cournot and Bertrand.
- Mixed equilibria
- Compute a mixed equilibrium by hand and in code with the indifference principle; find the minimax value in zero-sum games and security games.
- Existence and complexity
- Interpret Nash's existence theorem, the problem of multiple equilibria, and the PPAD-completeness of computing an equilibrium.
3.1Foundations
Every concept in this chapter revolves around a single question: when several decision makers' decisions are interdependent, what counts as a "reasonable" outcome? A small game and an everyday situation make the question concrete; the formal definition is built on top of them.
3.1.1A first game: the Prisoner's Dilemma
Two suspects, Sam and John, are interrogated in separate rooms. Without knowing what the other does, each chooses one of two options: stay Silent or Betray the other. If both stay silent, each serves one year for lack of evidence. If both betray, each serves two years. If one betrays and the other stays silent, the betrayer goes free and the silent one serves three years.
In game theory the outcomes of a game are written as payoffs, and each player wants to make their own payoff as large as possible. With prison time, however, less is better. To reconcile the two views, the payoff is taken to be the negative of the years in prison: 1 year is a payoff of −1, and 3 years is a payoff of −3. The rule "larger is better" then holds everywhere; −1 is larger than −3.
A game is usually written as a payoff matrix. The rows are the options of one player (here Sam), the columns those of the other (John). Each cell holds two numbers: first the row player's payoff, then the column player's. This order does not change anywhere in these notes.
| Sam \ John | Silent | Betray |
|---|---|---|
| Silent | (−1, −1) | (−3, 0) |
| Betray | (0, −3) | (−2, −2) |
Reading the table is the most basic skill of this chapter. For example, the upper-right cell (Silent, Betray) = (−3, 0) says: Sam stayed silent and John betrayed; Sam serves 3 years (payoff −3) and John goes free (payoff 0). Sam can choose only the row; John's column determines which cell the game lands in. This is exactly what separates a game from a single-person decision problem.
Put yourself in Sam's place. What John will do is unknown. If John stays silent, Sam's options are −1 (Silent) versus 0 (Betray); betraying is better. If John betrays, the options are −3 (Silent) versus −2 (Betray); again betraying is better. So whatever John does, betraying is better for Sam. The same reasoning applies to John, because the game is symmetric. The result is that both betray and each serves two years, although if both had stayed silent they would have served only one year each. This is where the "dilemma" in the name comes from: each player's individually sensible choice leads to a bad outcome for both.
When the game is repeated, the picture changes. In the version played against a computer, the computer can use the Tit-for-Tat strategy: it stays silent in the first round and in every later round copies the opponent's previous choice. Against such an opponent, what is the minimum number of years accumulated over ten rounds? The answer rests on the fact that betrayal is punished in the next round, and it is computed in Section 3.3.2.
3.1.2John Nash and the origin of the concept
The concept takes its name from the American mathematician John Forbes Nash Jr. (1928–2015). In 1950 Nash wrote a short doctoral thesis at Princeton, Non-Cooperative Games. In the same year he published a two-page note in PNAS proving that every finite game has an equilibrium point (Nash, 1950). An expanded version of the thesis appeared the following year in the Annals of Mathematics (Nash, 1951).
Before Nash, the strongest result in game theory was John von Neumann's minimax theory of 1928 for two-player zero-sum games (von Neumann, 1928). In a zero-sum game one player's gain is the other's loss, so interests are exactly opposed. Most real-life interactions are not like that. In the Prisoner's Dilemma both players prefer the outcome (Silent, Silent) to (Betray, Betray); their interests are partly shared. Nash carried the idea of equilibrium over to general n-player games that are not zero-sum.
For this work Nash shared the 1994 Nobel Prize in Economics with John Harsanyi and Reinhard Selten. In 2015 he was awarded the Abel Prize for his contributions to partial differential equations. His life was the subject of the film A Beautiful Mind (2001).
3.1.3Strategic behavior and applications
The basic assumption of game theory is that players try to maximize their own payoffs. Single-person decision theory works with the same assumption. What is new in game theory is that everyone's payoff also depends on the choices of the others. To make the best choice, a player must predict what the others will do, and the others in turn predict theirs. This is called strategic behavior.
Strategic dependence appears in many different areas. The table below summarizes examples that recur in this chapter and later ones, along with their structure.
| Situation | What happens? | Structure |
|---|---|---|
| Price competition | Two firms cut prices; both lose profit. | Prisoner's Dilemma structure |
| Advertising / arms race | Everyone spends; relative positions do not change. | Dominant strategy: spend |
| Penalty kick | Kicker and goalkeeper must be unpredictable. | Mixed strategy, zero-sum |
| Choosing a lane in traffic | If everyone moves into the fast lane, it slows down. | Congestion game |
| Choosing a standard | Everyone gains by choosing the same technology. | Coordination, multiple equilibria |
| Resource sharing | Shared bandwidth, servers, roads. | Price of Anarchy |
In none of these examples can the "best choice" be stated independently of the opponent. If the goalkeeper always dives left, the kicker shoots right; if the kicker always shoots right, the goalkeeper dives right. When choosing a standard, the right technology is the one the others choose. In computer networks, whether it pays for a device to send a packet at a given moment depends on whether the others are sending too. So what we look for is not each player's best choice in isolation but situations in which the choices are consistent with one another.
3.1.4The situation nobody regrets
Before the formal definition, let us think about the concept through an everyday example. A cafeteria has two checkout counters, and students are spread across the queues. Everyone wants a shorter wait, and switching queues is allowed. Figure 3.1 shows two situations.
If the queues have 7 and 3 people, the student at the end of the long queue moves to the other counter and goes from position 7 to position 4. Because switching pays, this situation is not lasting; someone is bound to move. If the queues have 5 and 5 people, a student who switches lands in position 6 of the other queue, that is, further back. Nobody has a reason to move; the situation sustains itself.
A test follows from this observation. Call it the regret test: "If I had seen what the others did, would I change my own choice?" If everyone's answer is "no", the situation is a Nash equilibrium. The test has two important features. First, each player considers changing only their own choice; the others' choices are held fixed. Second, the test is applied to each player separately; if even one person answers "yes", the situation is not an equilibrium.
An equilibrium is a self-sustaining situation: everyone correctly expects the others' behavior and does the best they can in response. But an equilibrium does not mean the "best outcome" or a "fair outcome". In the Prisoner's Dilemma, (Betray, Betray) passes the regret test, yet both players would prefer (Silent, Silent). Equilibrium is a concept of stability, not a concept of evaluation.
3.1.5The formal definition
To state the regret test precisely, the game itself must first be stated precisely. The notation below is used throughout the chapter.
A normal-form game (also called a strategic-form game) G = (N, (Si), (ui)) consists of three components:
- N = {1, …, n}: the set of players.
- Si: player i's strategy set, that is, the options available to that player.
- ui: player i's payoff function. It assigns a number to every situation in which each player has made a choice.
A list in which each player has chosen a strategy is called a strategy profile: s = (s1, …, sn). The strategies of everyone other than player i are written s−i; a profile can thus also be written s = (si, s−i). ui(s) is player i's payoff when profile s is played.
In the Prisoner's Dilemma, N = {Sam, John} and Si = {Silent, Betray} for both players. There are four strategy profiles, and each is a cell of the table. For example, for s = (Silent, Betray) we have uSam(s) = −3 and uJohn(s) = 0. From Sam's point of view, s−Sam is simply John's strategy.
The notation s−i may look odd at first. The idea is simple, though: when player i decides, they think of the others' choices as a single package. In a two-player game this package is a single strategy; in a three-player game it is a list of two strategies. The notation stays the same however many players there are.
A profile s* = (s1*, …, sn*) is a Nash equilibrium (NE) if and only if, for every player i and every si ∈ Si,
ui(si*, s−i*) ≥ ui(si, s−i*)
holds. In other words, while the others play s−i*, no player can increase their payoff by changing their strategy.
The left side of the inequality is the player's payoff at the equilibrium. The right side is the payoff they would receive if they switched their own strategy to si while the others stayed put. Such a change is called a unilateral deviation. The definition says that no unilateral deviation is profitable. Note the "≥" sign: a deviation may leave the payoff equal; it just cannot increase it.
The definition can be read in three ways:
- Unilateral deviation: With the others held fixed, no player can raise their payoff by changing their strategy.
- Self-enforcing agreement: If the players agreed in advance on a profile and everyone believes the others will keep to the agreement, each will keep to it too. No outside enforcement is needed to carry out the agreement.
- Stability is not efficiency: An equilibrium guarantees neither fairness nor efficiency. In particular, an equilibrium need not be Pareto optimal. An outcome is Pareto optimal if there is no other outcome that makes everyone at least as well off and at least one player strictly better off.
The four cells of the Prisoner's Dilemma are checked one by one against the definition. For each cell two questions are asked: does the row player (Sam) gain by changing the row, and does the column player (John) gain by changing the column?
- (Silent, Silent) = (−1, −1). If Sam switches to Betray, the cell becomes (Betray, Silent) and Sam gets 0. Since 0 > −1, the deviation is profitable. The cell is not an equilibrium; there is no need to look at John.
- (Silent, Betray) = (−3, 0). If Sam switches to Betray he gets −2; −2 > −3. Not an equilibrium.
- (Betray, Silent) = (0, −3). If John switches to Betray he gets −2; −2 > −3. Not an equilibrium.
- (Betray, Betray) = (−2, −2). If Sam switches to Silent he gets −3; −3 < −2, so the deviation is unprofitable. If John switches to Silent he also gets −3; again unprofitable. For neither player does any deviation increase the payoff. The cell is a Nash equilibrium.
Conclusion: the game's only pure Nash equilibrium is (Betray, Betray), with payoffs (−2, −2), that is, two years in prison each. (Silent, Silent), although better for both, is not an equilibrium. This is why the equilibrium is not Pareto optimal.
Checking four cells one by one is easy in a small game but becomes tiring as the game grows. The best-response marking in Section 3.2 carries out the same check systematically.
3.1.6Misconceptions about the definition
Because the definition of the Nash equilibrium is short, it is easy to misread. The most common misconceptions are listed below. In each case, the error can be seen from a single word in the definition.
- "An equilibrium is the best outcome." No. In the Prisoner's Dilemma the equilibrium (B, B) is worse for both players than (S, S). Equilibrium speaks of stability, not of efficiency.
- "If both would gain by changing together, it is not an equilibrium." The definition looks only at unilateral deviations. A joint deviation by two players (a coalition) does not destroy a Nash equilibrium. Moving together from (B, B) to (S, S) benefits both, but that lies outside the definition.
- "It is enough if one player is content." The test is applied to each player separately; if even a single player wants to deviate, the cell is not an equilibrium.
- "The row player also chooses the column." Each player changes only their own strategy. The row player moves up and down within the same column; the column player moves left and right within the same row.
- "Every game has exactly one pure equilibrium." Matching Pennies has no pure equilibrium; Stag Hunt has two pure equilibria and one mixed equilibrium. These are computed in Section 3.4 and Section 3.5.
- Penalty or payoff? For costs such as years in prison, the smaller number is better. To convert to a payoff, a minus sign is added: 2 years → −2. Choosing "the larger one" without the sign gives exactly the opposite answer.
3.2Best response
The definition of the Nash equilibrium asks, for every profile, "is a deviation profitable?" To answer this systematically, one first finds, for each player, the best answer to each possible choice of the others. This answer is called the best response. Finding an equilibrium then comes down to finding where the best responses coincide.
3.2.1Best response and mutual best response
The question behind the best response is simple: "If I knew what my opponent would do, what would I do?" The opponent's choice is fixed, the player looks only at their own payoffs, and picks the option that gives the largest one.
To write this down we use argmax notation. max gives the largest value in a list; argmax gives the option (or options) that attain this largest value. For example, if four options have payoffs A: 3, B: 7, C: 2, D: 7, then max = 7, but argmax = {B, D}. When the largest value occurs at more than one option, argmax is a set; this detail matters in games with ties.
Player i's best response to the others' choice s−i is the set of strategies that maximize their payoff:
BRi(s−i) = argmaxsi ∈ Si ui(si, s−i)
A best response is not a constant; it is a rule that depends on the opponent's choice. When the opponent changes, the best response may change too. It helps to think of BRi as "a table that tells me what to do against each choice of the opponent". This rule is also called the best-response correspondence. The word "correspondence" stresses that one input may be assigned several outputs (a set, in case of ties).
The inequality in the definition of the Nash equilibrium says that si* gives the largest payoff against s−i*. That means si* is a best response. The theorem below makes this observation precise.
A profile s* is a Nash equilibrium if and only if si* ∈ BRi(s−i*) for every player i. In short: an equilibrium is a mutual best response.
We show the two directions separately. (⇒) Let s* be a Nash equilibrium. By definition, ui(si*, s−i*) ≥ ui(si, s−i*) for every si. This means the payoff from si* is the largest payoff attainable against s−i*. A strategy that gives the largest payoff lies in the argmax set; hence si* ∈ BRi(s−i*).
(⇐) Suppose si* ∈ BRi(s−i*) for every i. A strategy in the argmax set gives the largest payoff, so no other si can give a larger one. This is exactly the inequality in the definition. Since it holds for every player, s* is a Nash equilibrium. □
The theorem gives a practical method for finding equilibria. In a two-player matrix game, three steps suffice:
- Row player: In each column, mark the row player's largest payoff (the first number in the cell, u1). Because the column is held fixed, this is the row player's best response to that choice of the column player.
- Column player: In each row, mark the column player's largest payoff (the second number, u2).
- Intersection: The cells in which both payoffs are marked are the pure-strategy Nash equilibria.
The cost of the method is small. In an m × n matrix, each cell is compared with one column maximum and one row maximum. If the column maxima and row maxima are computed once, the total work is O(mn), proportional to the number of cells in the matrix. When the matrix is already given, no faster method is possible, since every cell must be looked at at least once.
3.2.2The marking method: the Prisoner's Dilemma
Let us try the method first on the familiar game. The payoffs are the negatives of the years in prison (−1 = 1 year), and each player wants to make their own number larger. Label the cells a, b, c, d: a = (Silent, Silent), b = (Silent, Betray), c = (Betray, Silent), d = (Betray, Betray).
- If John stays Silent, Sam looks only at the first numbers in this column: Silent −1, Betray 0. Since 0 > −1, Sam's best response is Betray; the 0 in cell c is marked.
- If John Betrays: Silent −3, Betray −2. Since −2 > −3, the best response is again Betray; the first −2 in cell d is marked.
- In both columns the mark is in the same row. Whatever John does, Betray is better for Sam. Such a strategy is called a dominant strategy (Section 3.3.1).
- If Sam stays Silent, John looks at the second numbers: Silent −1, Betray 0; the best response is Betray, and the 0 in cell b is marked.
- If Sam Betrays: Silent −3, Betray −2; Betray for John as well. The second −2 in cell d is marked. Because the game is symmetric, this result is no surprise.
- The only cell where both marks meet is d = (Betray, Betray). Nobody wants to deviate alone: a Nash equilibrium with payoffs (−2, −2).
Yet a = (Silent, Silent) would have given each player only one year. The equilibrium is not Pareto optimal; that is the essence of the dilemma.
Figure 3.2 shows the final state of the marking. Both of each player's marks lie in the Betray row or column. This shows that Betray is a dominant strategy for both players. A player with a dominant strategy does not need to predict the opponent, which makes the game very easy to solve.
3.2.3A three-by-three example
Not every game has a dominant strategy. In the game below, the row player chooses among A, B, C and the column player among X, Y, Z. Each cell contains (u1, u2): first the row player's payoff, then the column player's.
| X | Y | Z | |
|---|---|---|---|
| A | (4, 3) | (0, 2) | (1, 1) |
| B | (2, 1) | (3, 3) | (0, 2) |
| C | (1, 4) | (2, 0) | (3, 2) |
The row player's best responses (compare the first numbers in each column):
- If the column player plays X: A: 4, B: 2, C: 1 → best is A (4).
- If the column player plays Y: A: 0, B: 3, C: 2 → best is B (3).
- If the column player plays Z: A: 1, B: 0, C: 3 → best is C (3).
The column player's best responses (compare the second numbers in each row):
- If the row player plays A: X: 3, Y: 2, Z: 1 → best is X (3).
- If the row player plays B: X: 1, Y: 3, Z: 2 → best is Y (3).
- If the row player plays C: X: 4, Y: 0, Z: 2 → best is X (4).
Intersection: The cells in which both payoffs are marked are (A, X) = (4, 3) and (B, Y) = (3, 3). The game has two pure Nash equilibria.
Deviation test (A, X): If the row player switches to B they get 2, and to C they get 1; both are less than 4. If the column player switches to Y they get 2, and to Z they get 1; both are less than 3. Nobody gains by deviating ✓. The same check works for (B, Y): the row player drops to 2 or 0, the column player to 1 or 2 ✓.
This example offers two important observations. First, in cell (C, Z) the row player's 3 is marked, but the column player can switch from Z to X and get 4 instead of 2. A single mark is not enough. Second, "large numbers" do not determine the equilibrium: the 4 in (C, X) is also one of the largest payoffs in the table for the column player, but the row player wants to switch to A there. An equilibrium is not a cell with large numbers; it is a cell that is a mutual best response.
It is also notable that the game has two equilibria. The theory alone does not say which equilibrium will be played. The row player prefers (A, X) (getting 4); the column player gets 3 in both equilibria and is therefore indifferent between them. Which one is chosen when there are several equilibria is the subject of Section 3.5.
3.2.4When there are ties: the language-choice game
The marking method needs some care when there are ties. Ayşe and Bora are choosing a programming language for a joint project: Python, Java, or C. Each cell holds the payoffs (Ayşe, Bora); Ayşe is the row player and Bora the column player. The rule is the same: for Ayşe, underline the largest first number in each column; for Bora, underline the largest second number in each row. This is why the method is also called the underlining method.
| Ayşe \ Bora | Python | Java | C |
|---|---|---|---|
| Python | (4, 2) | (1, 1) | (1, 0) |
| Java | (0, 1) | (2, 4) | (1, 2) |
| C | (1, 0) | (0, 2) | (1, 1) |
- If Bora chooses Python, Ayşe looks only at the first numbers: 4, 0, 1 → the largest, 4 (Python), is underlined.
- If Bora chooses Java: 1, 2, 0 → the largest, 2 (Java).
- If Bora chooses C: 1, 1, 1 → all three are equal and all three are underlined. With a tie, every option is a best response; the argmax set is {Python, Java, C}.
- If Ayşe chooses Python, Bora looks at the second numbers: 2, 1, 0 → 2 (Python).
- If Ayşe chooses Java: 1, 4, 2 → 4 (Java).
- If Ayşe chooses C: 0, 2, 1 → 2 (Java).
- The cells where both numbers are underlined are (Python, Python) = (4, 2) and (Java, Java) = (2, 4). In (C, C) only the first number is underlined: Bora can switch to Java and get 2 instead of 1, so (C, C) is not an equilibrium.
Marking only one option in a tie is a common mistake. In this example the mistake may look harmless. In another game, though, one of the tied cells may be exactly the cell where the equilibrium lies; a single mark would miss that equilibrium. The rule is clear: if the largest value occurs more than once, all of them are marked.
The same game can also be examined with the elimination of dominated strategies from Section 3.3. For Bora, Java strictly beats C in every row (1 > 0, 4 > 2, 2 > 1), so the C column can be deleted. In the two remaining columns, Python beats C for Ayşe (4 > 1, 1 > 0), and the C row is deleted too. In the remaining 2 × 2 game no strategy is dominated; both equilibria remain. So elimination shrinks the game but does not solve it, whereas underlining finds the two equilibria directly. The game also has a mixed equilibrium (Ayşe plays Python with probability 3/4, Bora plays Python with probability 1/5); equilibria of this kind are computed in Section 3.4.
3.2.5Common mistakes in marking
Marking is a mechanical method, but it is easy to mix up which numbers are compared in which direction. Figure 3.5 shows the correct directions: because the row player can change only their row, they compare their options within the same column; the column player compares within the same row.
- Wrong direction: Looking for the row player's best along a row. They can change only their row; look within the same column.
- Wrong number: Looking at the first numbers for the column player. The column player wants to make the second number larger.
- A single mark in a tie: If the largest value occurs twice, both are best responses and both are marked.
- Thinking one mark is enough: A cell marked for only one player is not an equilibrium; two marks are needed.
- Looking for the biggest cell: An equilibrium is not a cell with large numbers; it is a cell that is a mutual best response.
- Skipping the check: Run the deviation test on every candidate cell: does the player get more by switching to another option?
3.2.6Three players: the group-project game
The definition is not limited to two players. Three students each say Join or Skip for a group project, simultaneously. If at least two join, the project succeeds and everyone (those who joined and those who did not) gets 3 points. Joining has a personal cost of 1. With three players and two strategies each, there are 2 × 2 × 2 = 8 profiles. Because the game is symmetric, it is enough to group the profiles by the number of joiners (k).
| Joiners | Payoffs | Unilateral deviation | Equilibrium? |
|---|---|---|---|
| k = 3 (everyone) | 3 − 1 = 2 each | If one drops out, the project still succeeds (k = 2) and the one who dropped out gets 3: 3 > 2 | No |
| k = 2 | joiners 2, the one who skipped 3 | If a joiner drops out, the project fails: 0 < 2. If the one who skipped joins: 2 < 3 | Yes (3 profiles) |
| k = 1 | the joiner −1, the others 0 | If the joiner drops out: 0 > −1 | No |
| k = 0 (nobody) | 0 each | Someone who joins alone gets −1: −1 < 0 | Yes |
The game has four pure equilibria: the three profiles in which exactly two students join, and the profile in which nobody joins. The test is the same in an n-player game: with the others held fixed, each player is checked separately. With three players a single "matrix" cannot be drawn, but the definition does not change at all.
The "nobody joins" equilibrium is interesting. Everyone gets 0, although if two students joined, the joiners would get 2 and the one who skipped would get 3. Nobody can break this equilibrium alone, because a student who joins alone does not save the project and gets −1. This situation is called a coordination failure. If two students decided to join together, things would improve, but a joint deviation lies outside the Nash definition. In this way the Nash equilibrium also explains how a group can "get stuck" in a bad situation.
3.2.7Code trace: pure_nash()
The marking method can be written as a short Python function. The function takes the row player's payoff matrix U1 and the column player's payoff matrix U2 and returns the (row, column) indices of the pure equilibria.
def pure_nash(U1, U2):
m, n, eq = len(U1), len(U1[0]), []
for i in range(m):
for j in range(n):
br1 = max(U1[k][j] for k in range(m))
br2 = max(U2[i][l] for l in range(n))
if U1[i][j] == br1 and U2[i][j] == br2:
eq.append((i, j))
return eqThe code works line by line as follows:
mis the number of rows andnthe number of columns;eqis an empty list.- Two nested loops visit every cell:
iis the row index andjthe column index. br1is the largestU1value in columnj. It is the best payoff the row player can get against this column.br2is the largestU2value in rowi. It is the best payoff the column player can get against this row.- If both payoffs in the cell equal their maxima (that is, both marks are present), the cell is added to the list. Because equality (
==) is used, all tied maxima are accepted; the tie problem resolves itself.
For the game in Table 3.3, U1 = [[4, 0, 1], [2, 3, 0], [1, 2, 3]] and U2 = [[3, 2, 1], [1, 3, 2], [4, 0, 2]]; indices 0, 1, 2 stand for A, B, C (or X, Y, Z) respectively. The column maxima are X: 4, Y: 3, Z: 3; the row maxima are A: 3, B: 3, C: 4. The trace table shows the nine cells in order.
| (i, j) | Cell | U1[i][j] / br1 | U2[i][j] / br2 | Condition | eq |
|---|---|---|---|---|---|
| (0, 0) | (A, X) | 4 / 4 | 3 / 3 | true | [(0, 0)] |
| (0, 1) | (A, Y) | 0 / 3 | 2 / 3 | false | same |
| (0, 2) | (A, Z) | 1 / 3 | 1 / 3 | false | same |
| (1, 0) | (B, X) | 2 / 4 | 1 / 3 | false | same |
| (1, 1) | (B, Y) | 3 / 3 | 3 / 3 | true | [(0, 0), (1, 1)] |
| (1, 2) | (B, Z) | 0 / 3 | 2 / 3 | false | same |
| (2, 0) | (C, X) | 1 / 4 | 4 / 4 | false | same |
| (2, 1) | (C, Y) | 2 / 3 | 0 / 4 | false | same |
| (2, 2) | (C, Z) | 3 / 3 | 2 / 4 | false | same |
After the nine cells have been scanned, the function returns [(0, 0), (1, 1)], that is, (A, X) and (B, Y). Note that in (C, X) only the second condition holds and in (C, Z) only the first; since and demands both, these cells are eliminated. This is the code counterpart of the rule "one mark is not enough".
In terms of complexity, this version computes in every cell one column maximum (m comparisons) and one row maximum (n comparisons). The total work is O(mn · (m + n)). If the maxima are computed once before the loop and stored in a list, the work drops to O(mn). For small matrices the difference is negligible; for a 1000 × 1000 matrix it is a factor of about 2000.
3.2.8Continuous strategies: the Cournot duopoly
So far each player has had a handful of options. In some games a strategy is a number that can take infinitely many values. The oldest example is the two-firm market studied by Antoine Augustin Cournot in 1838; a market with two firms is called a duopoly.
Two firms produce the same good and choose their output quantities y1, y2 ≥ 0 simultaneously. The market price depends on total output: P = 12 − (y1 + y2). The more is produced, the lower the price. Production cost is zero. Firm 1's profit is quantity times price:
u1(y1, y2) = y1 · (12 − y1 − y2)
No matrix can be drawn here, because the number of rows is infinite. But the idea of best response applies unchanged: while firm 2's quantity y2 is held fixed, we look for the y1 that maximizes firm 1's profit. When the choice is continuous, the argmax is not read off a table; it is found with the derivative.
The derivative is the slope of a curve at each point. At the top of the profit curve the slope is zero: to the left of the peak the slope is positive (profit is rising), and to the right it is negative (profit is falling). Three rules are enough here: the derivative of y2 is 2y; the derivative of c · y is c; the derivative of a constant is 0. The derivative of a sum is the sum of the derivatives.
1. Write the profit explicitly. u1 = 12y1 − y12 − y1y2. For firm 1, y2 is a constant.
2. Take the derivative. The derivative of 12y1 is 12, that of y12 is 2y1, and that of y1y2 is y2. The result: 12 − 2y1 − y2.
3. Set it to zero. 12 − 2y1 − y2 = 0 ⇒ y1 = (12 − y2)/2.
4. Peak or valley? The derivative of the derivative (the second derivative) is −2, which is negative; the slope is decreasing, so the point is a peak. A numerical check works too: for y2 = 4, u1(4) = 4 · 4 = 16, and at the neighbors u1(3) = 3 · 5 = 15 and u1(5) = 5 · 3 = 15; both are less than 16 ✓.
5. Do not forget the boundary. Quantity cannot be negative. If y2 ≥ 12, the formula gives zero or a negative number; in that case the price is already zero and the best choice is not to produce. The full best response is:
BR1(y2) = max{0, (12 − y2)/2}
6. Find the equilibrium. Because the game is symmetric, BR2(y1) = max{0, (12 − y1)/2}. An equilibrium is a point where the two firms are simultaneously best-responding to each other: y1 = (12 − y2)/2 and y2 = (12 − y1)/2. Setting y1 = y2 = y by symmetry gives 2y = 12 − y, so y = 4. The price is 12 − 8 = 4, and each firm's profit is 4 · 4 = 16.
Figure 3.6 draws the two best-response lines. The horizontal axis is firm 1's quantity and the vertical axis is firm 2's. The BR1 line shows firm 1's best quantity for each quantity of firm 2; it starts at 6 for y2 = 0 and falls to 0 at y2 = 12. The equilibrium is the single point where the two lines cross. The slope of each line is negative: the more the rival produces, the less the firm's best quantity.
Why is the cartel not an equilibrium? If the two firms agreed to make total profit as large as possible, they would maximize Y(12 − Y) over total quantity Y. The derivative 12 − 2Y = 0 gives Y = 6; each firm produces 3, the price is 6, and each firm earns 3 · 6 = 18. That is more than the 16 at equilibrium. But the agreement is not self-enforcing. While the rival produces 3, firm 1's best response is BR1(3) = (12 − 3)/2 = 4.5. The deviating firm earns 4.5 · (12 − 4.5 − 3) = 4.5 · 4.5 = 20.25, while the firm that sticks to the agreement sees its profit fall to 3 · 4.5 = 13.5. Each firm has an incentive to deviate. This is a continuous-strategy version of the Prisoner's Dilemma.
How can the equilibrium be found? We do not have to assume that the firms compute the equilibrium. If the firms respond to each other with best responses in turn, the quantities approach the equilibrium. Suppose firm 1 starts alone with 6 (the best response when the rival produces 0). Firm 2 answers with (12 − 6)/2 = 3. Firm 1 answers 3 with 4.5, and the process continues in this way.
| Step | Updates | Computation | (y1, y2) |
|---|---|---|---|
| 0 | start | firm 1 alone | (6, 0) |
| 1 | firm 2 | (12 − 6)/2 = 3 | (6, 3) |
| 2 | firm 1 | (12 − 3)/2 = 4.5 | (4.5, 3) |
| 3 | firm 2 | (12 − 4.5)/2 = 3.75 | (4.5, 3.75) |
| 4 | firm 1 | (12 − 3.75)/2 = 4.125 | (4.125, 3.75) |
| 5 | firm 2 | (12 − 4.125)/2 = 3.9375 | (4.125, 3.9375) |
At each step, the distance of the updated quantity from the equilibrium is halved: 2 for 6, 1 for 3, 0.5 for 4.5, 0.25 for 3.75, 0.125 for 4.125. The reason is that the slope of the best-response line is −1/2. Such a "learning process" does not converge to the equilibrium in every game. Because it does here, the Cournot equilibrium is also a plausible prediction from a behavioral point of view.
3.2.9Bertrand: competing on price
If the firms choose prices instead of quantities, the outcome changes surprisingly. This model bears the name of Joseph Bertrand. Two firms sell the same good; the unit cost is c = 2 TL and the market is 100 units. The firms choose prices simultaneously. The cheaper firm takes the whole market; if prices are equal, the market is split in half. A firm's profit is (price − cost) × quantity sold.
- Is (5, 5) an equilibrium? Each firm sells 50 units and earns (5 − 2) · 50 = 150. If firm 1 cuts its price to 4.99, it takes the whole market: 2.99 · 100 ≈ 299. The deviation nearly doubles the profit; (5, 5) is not an equilibrium.
- Any common price above c: If the common price is p > 2, each firm earns (p − 2) · 50; a firm that undercuts slightly earns about (p − 2) · 100. None of these is an equilibrium.
- Different prices: If the cheaper firm's price is above c, it can raise its price to just below the rival's, still take the whole market, and earn more. If the cheaper firm's price is exactly c, its profit is 0; it can raise its price to somewhere between c and the rival's price and make a profit. No profile with different prices is an equilibrium.
- Below c: A firm that cuts its price below 2 loses money on every unit sold; this is never a best response.
- (2, 2): Both firms earn 0. A firm that goes lower makes a loss, and one that goes higher sells nothing and still gets 0. No deviation increases profit. The only Nash equilibrium is p1 = p2 = c = 2, with profit 0.
| Means of competition | Equilibrium | Firm profit |
|---|---|---|
| Cournot (quantity), P = 12 − Y, cost 0 | y = 4 each, price 4 | 16 each |
| Bertrand (price), cost c | p = c | 0 |
The difference between the two models comes from what a deviation yields. In Cournot, when a firm increases its quantity the price falls, and that fall also reduces its own profit; the deviation brakes itself. In Bertrand, a small price cut wins the entire market; the reward for deviating is very large. So even two firms push the price down to cost. This result is called the Bertrand paradox: the intuition that "with two firms profit stays high" is wrong under price competition. In real markets profit is protected only by factors such as product differentiation, capacity constraints, or repeated interaction.
The conclusion "Bertrand's only equilibrium is p = c" rests on the assumption that price is continuous: arbitrarily small cuts such as 4.99 are possible. If prices can be chosen in steps of 1 TL, prices just above c can also be equilibria. In this example, at (3, 3) each firm earns 1 · 50 = 50; a firm that goes down to 2 earns 0, and one that goes up sells nothing, so the deviation is unprofitable. At (4, 4) each firm earns 100; a firm that goes down to 3 earns 1 · 100 = 100, so the deviation does not increase profit. At (5, 5), however, a firm that goes down to 4 earns 200, so the deviation is profitable. Conclusion: with 1 TL steps the equilibria are (2, 2), (3, 3), and (4, 4).
3.3Elimination of dominated strategies
Best-response marking looks for the equilibrium directly. Elimination of dominated strategies works from the opposite direction: it finds the strategies that "no rational player would play" and removes them from the game, shrinking it. Sometimes a single cell remains, and the game is solved completely this way.
3.3.1Dominant and dominated strategies
The strongest way to compare two strategies is to compare them against every possible choice of the opponent. If one strategy is better than another whatever the opponent does, there is no reason ever to play the second.
Let si′ and si be two strategies of player i.
- Strict dominance: If ui(si′, s−i) > ui(si, s−i) for every s−i, then si′ strictly dominates si.
- Weak dominance: If ≥ holds for every s−i and > holds for at least one s−i, then si′ weakly dominates si.
A strategy that is dominated is called a dominated strategy. A strategy that strictly dominates all of the player's other strategies is called a dominant strategy.
The word "every" in the definition is critical. For strict dominance, the comparison is made separately for each choice of the opponent, and a strict inequality is needed in each. "Better on average" or "better in most cases" is not enough.
A rational player never plays a strictly dominated strategy. The reason is clear: whatever the player thinks about the opponent, the dominating strategy earns more. A strictly dominated strategy is not a best response to any choice of the opponent.
For a player with a dominant strategy the game is easy: there is no need to predict the opponent. If everyone has a dominant strategy, the profile in which everyone plays their dominant strategy is a Nash equilibrium; it is called a dominant-strategy equilibrium. In the Prisoner's Dilemma, Betray is a dominant strategy for both players, and (Betray, Betray) is a dominant-strategy equilibrium. But not every game has a dominant strategy. In Rock-Paper-Scissors (RPS) each move loses to another; no move beats the others in every case.
Even when there is no dominant strategy, there may be individual dominated strategies. Deleting them and searching again in the smaller game yields a method.
Iterated elimination of strictly dominated strategies (IESDS): a strictly dominated strategy of any player is deleted; in the smaller game, strictly dominated strategies are searched for again. The process stops when there is no strategy left to delete.
The method assumes more than that the players are rational. Everyone's rationality is known to everyone, that is known to everyone, and the chain continues forever. This assumption is called common knowledge. A strategy deleted in the first round follows only from the player's own rationality. A strategy deleted in the second round requires the player to know that the opponent is rational: "my opponent will not play that dominated strategy, so I do not need to consider that column". Each new round rests on one more level of knowledge.
In iterated elimination of strictly dominated strategies, (a) no Nash equilibrium is deleted, and (b) the result does not depend on the order of deletion. In particular, if a single cell remains, that cell is the game's only Nash equilibrium.
The idea of part (a) is as follows. In a Nash equilibrium, each player's strategy is a best response to the others' equilibrium strategies. A strictly dominated strategy cannot be a best response to any choice of the opponent, because the dominating strategy earns more against that choice too. So a strictly dominated strategy appears in no equilibrium, and deleting it destroys no equilibrium. In the smaller game after the deletion, the equilibrium strategies are still best responses, because no option that beats them has been added; the options have only been reduced. The same reasoning repeats in every round. The proof of part (b) is longer and is not given here (Osborne, 2004, Chapter 12). □
For weak dominance there is no such guarantee. A weakly dominated strategy yields the same payoff as the dominating one in some cases; in those cases it may be a best response and may appear in an equilibrium. When it is deleted, some equilibria may disappear, and the result may depend on the order of deletion (Section 3.3.7).
A familiar example shows the difference. In the 2/3-of-the-average game, everyone writes a number between 0 and 90; the number closest to 2/3 of the average wins. Because the average can be at most 90, the target is at most 60. A guess above 60 is never better than writing 60, but in some cases (for example, when both guesses are far from the target and both lose) it gives an equal result. So deleting the numbers above 60 relies on weak dominance, not strict dominance.
3.3.2Back to the Prisoner's Dilemma
Should Sam stay silent or betray? The theory's answer is clear: Betray is the dominant strategy, because 0 > −1 if John is silent and −2 > −3 if he betrays. The only Nash equilibrium is (Betray, Betray) = (−2, −2), that is, two years each (Figure 3.9).
Real behavior differs from the theory. In the one-shot game, people cooperate much more often than the theory predicts. According to a meta-analysis combining experiments from 1958 to 1992, roughly half of the participants cooperate, and allowing talk before the game markedly raises this rate (Sally, 1995). Feelings of trust, fairness, and reciprocity also influence the choice. This does not show that the theory is wrong. When the payoff is just years in prison, other things people care about (guilt, reputation) fall outside the table. The theory is a clear point of comparison that shows what would happen without these factors.
The repeated game. When the game is played repeatedly against the same opponent, the situation changes. Let the computer play Tit-for-Tat: it stays silent in the first round, then copies the opponent's previous choice. The total cost of Sam's different 10-round plans is as follows.
| Sam's plan | What happens round by round? | Sam's total years |
|---|---|---|
| Always Silent | John also stays silent throughout; 1 year per round. | 10 × 1 = 10 |
| Always Betray | Round 1: John is silent, so Sam gets 0. In the next 9 rounds John betrays too: 2 years each. | 0 + 9 × 2 = 18 |
| Silent for 9 rounds, Betray in the last | 1 year in each of the first 9 rounds; in round 10 John is silent, Sam gets 0, and no punishment can follow. | 9 × 1 + 0 = 9 (minimum) |
Betray, which dominates in the one-shot game, is expensive against Tit-for-Tat: every betrayal is punished in the next round. Only in the last round can no punishment follow, because there is no next round. So the best plan is to stay silent for nine rounds and betray in the last. Trying all 210 = 1024 plans by computer gives the same result: the minimum total is 9 years. This "last-round effect" is the subject of backward induction, which reasons from the end of a game tree back to the start.
3.3.3Iterated elimination: a three-by-three example
In the game below, neither player has a dominant strategy, but iterated elimination reduces the game to a single cell.
- Start. Rows are compared using the first numbers. No row strictly dominates another; for example, A and B are equal in column X (3 = 3). Since no progress can be made with rows, we look at the column player.
- X is eliminated. Columns are compared using the second numbers. Z beats X in every row: 4 > 2 in A, 3 > 2 in B, 6 > 1 in C. X is strictly dominated and is deleted.
- B is eliminated. Now only columns Y and Z remain. C beats B in these two columns: 2 > 0 in Y, 6 > 5 in Z. (While X was present, this comparison was invalid: in X, B gets 3 and C gets 2.)
- Y is eliminated. The remaining rows are A and C. Z beats Y in both rows: 4 > 3 in A, 6 > 0 in C.
- A is eliminated. Only column Z is left. C beats A: 6 > 1.
- Result. A single cell remains: (C, Z) = (6, 6). By Theorem 3.2, this cell is the game's only Nash equilibrium. Best-response marking gives the same result.
| Step | Remaining rows | Remaining columns | Deleted | Reason |
|---|---|---|---|---|
| 1 | A, B, C | X, Y, Z | X | Z > X: 4 > 2, 3 > 2, 6 > 1 |
| 2 | A, B, C | Y, Z | B | C > B: 2 > 0, 6 > 5 |
| 3 | A, C | Y, Z | Y | Z > Y: 4 > 3, 6 > 0 |
| 4 | A, C | Z | A | C > A: 6 > 1 |
| 5 | C | Z | — | (C, Z) = (6, 6) |
3.3.4One elimination opens the way for the next
The power of iterated elimination is that each deletion opens the door to new deletions. In the game below there is initially a single strict dominance; all the others appear after it. Rows are compared using only the first numbers, columns using only the second numbers.
| Left | Center | Right | |
|---|---|---|---|
| Top | (1, 5) | (5, 6) | (6, 2) |
| Middle | (3, 5) | (6, 0) | (2, 2) |
| Bottom | (2, 2) | (0, 2) | (1, 5) |
- Bottom is deleted. Middle beats Bottom in every column: 3 > 2, 6 > 0, 2 > 1. There is no other strict dominance: for example, Left cannot beat Right, because in the Bottom row Right gives 5 and Left gives 2.
- Right is deleted. Once Bottom is gone, Left beats Right in the two remaining rows: 5 > 2 in Top, 5 > 2 in Middle. This would not have happened while Bottom was present.
- Top is deleted. Once Right is gone, Middle beats Top in the two remaining columns: 3 > 1 in Left, 6 > 5 in Center. While Right was present, Top was saved there by 6 > 2.
- Center is deleted. Only the Middle row is left: Left gives 5, Center gives 0. Center is deleted.
- Result. The remaining (Middle, Left) = (3, 5) is the only Nash equilibrium.
Two lessons follow from the example. First, the order of deletion is a logical chain: deleting Top depends on deleting Right, and deleting Right depends on deleting Bottom. Each step adds one more level to the knowledge of rationality assumed by the previous one. Second, the equilibrium is not the best outcome for everyone. (Top, Center) = (5, 6) is better for both players than (3, 5). But it is not an equilibrium: while the column player plays Center, the row player can switch to Middle and get 6 instead of 5.
3.3.5Code trace: eliminate()
Iterated elimination is also written as a short function. The function keeps the remaining row indices in R and the remaining column indices in S.
def eliminate(U1, U2):
R, S = [0, 1, 2], [0, 1, 2] # remaining
while True:
x = [r for r in R for k in R if
all(U1[k][c] > U1[r][c] for c in S)]
y = [c for c in S for d in S if
all(U2[r][d] > U2[r][c] for r in R)]
if x: R.remove(x[0]) # drop a row
elif y: S.remove(y[0]) # drop a column
else: return R, SThe logic of the code is as follows:
xis the list of remaining rows that are strictly dominated by another remaining rowk.all(U1[k][c] > U1[r][c] for c in S)checks that rowkstrictly beats rowrin every remaining column. Deleted columns are not inS, so they do not enter the comparison.ymakes the same check for columns usingU2: does columndbeat columncin every remaining row?- Row deletion is tried first: if
xis not empty, the first dominated row is deleted. Otherwise columns are tried. If both are empty, the remaining sets are returned. - The
while Trueloop starts again from the top after every deletion; this way the new dominations opened by a deletion are found in the next round.
Called with the matrices of the three-by-three elimination example, the trace is as follows:
| Round | R | S | x | y | Action |
|---|---|---|---|---|---|
| 1 | [0, 1, 2] | [0, 1, 2] | [] | [0] | S.remove(0): X is deleted (Z dominates) |
| 2 | [0, 1, 2] | [1, 2] | [1] | [] | R.remove(1): B is deleted (C dominates) |
| 3 | [0, 2] | [1, 2] | [] | [1] | S.remove(1): Y is deleted (Z dominates) |
| 4 | [0, 2] | [2] | [0] | [] | R.remove(0): A is deleted (C dominates) |
| 5 | [2] | [2] | [] | [] | return [2], [2] |
The function returns ([2], [2]), that is, only (C, Z) remains. Four deletions removed X, B, Y, A in that order. It is important that y comes out empty in round 2: at that moment, with three rows remaining, Z cannot beat Y, because in row B, Y gives 4 and Z gives 3. After B is deleted (round 3), Z beats Y. This is the code counterpart of the observation in Section 3.3.4 that "one elimination opens the way for the next".
In each round x makes at most m2 · n comparisons and y at most n2 · m, and there are at most m + n rounds. The total work is polynomial; for small games the computation finishes instantly.
3.3.6Domination by a mixed strategy
There may be no single pure strategy that beats a given strategy, yet a mixture of two strategies may beat it. The table below gives only the row player's payoffs (u1), because rows are compared using these numbers alone.
| u1 | Left | Right |
|---|---|---|
| Top | 4 | 0 |
| Middle | 1 | 1 |
| Bottom | 0 | 4 |
No pure row dominates Middle: it is better than Top in the Right column (1 > 0) and better than Bottom in the Left column (1 > 0). But if the row player flips a coin and plays Top with probability one half and Bottom with probability one half, the expected payoff in each column is:
- Against Left: ½ · 4 + ½ · 0 = 2.
- Against Right: ½ · 0 + ½ · 4 = 2.
In both columns 2 > 1. So the ½–½ mixture strictly dominates Middle, and Middle can be deleted. Expected payoff is treated in detail in Section 3.4.1; here it is enough to read it as "the average payoff per round over many repetitions".
Figure 3.12 takes the result one step further. Suppose the row player believes the column player will play Left with probability q. The expected payoff of Top is 4q, that of Bottom 4(1 − q). The larger of these two lines (the upper envelope) is at least 2; its lowest point is the intersection at q = ½. The line for Middle is 1 everywhere and stays entirely below the upper envelope. Conclusion: Middle is a best response to no belief about the column player. In two-player games, being strictly dominated by a mixed strategy and "being a best response to no belief" are the same thing.
"No single pure strategy beats it, so it cannot be deleted." Mixtures also enter the comparison. When eliminating, try pure strategies first, then simple mixtures such as ½–½. In particular, strategies that lie "in the middle" of two extreme strategies and are never best are deleted this way.
3.3.7The trap of weak domination
A small game shows why deleting weakly dominated strategies is dangerous.
- For the row player, Bottom weakly dominates Top: 1 = 1 in Left, 1 > 0 in Right. Because of the tie in Left, the domination is not strict.
- Since the column player gets 1 in every cell, they are indifferent in every case; every column is a best response to every row.
- Pure equilibria: (Top, Left), (Bottom, Left), (Bottom, Right). (Top, Right) is not an equilibrium, because the row player can switch to Bottom and get 1 instead of 0. Three equilibria in all.
- If Top is deleted, only the Bottom row remains and two equilibria remain: (Bottom, Left) and (Bottom, Right). The equilibrium (Top, Left) has disappeared.
Strict domination is safe; weak domination can cost equilibria. When there are several weak dominations, different cells may remain depending on which is deleted first. For this reason only strictly dominated strategies are deleted when searching for equilibria.
Strict elimination does not reduce every game to a single cell either. In the Battle of the Sexes, two people decide separately whether to go to the Opera or to Football in the evening. One likes the Opera more, the other prefers Football; but both would rather be together than go to different places. In this game no strategy is dominated and elimination deletes nothing. The equilibria are found by best-response marking and with mixed strategies.
3.3.8Common mistakes in elimination
- Wrong numbers: Comparing two rows using the column player's payoffs. Row ↔ first number, column ↔ second number.
- Thinking "mostly larger" is enough: For strict domination it must be larger in every remaining column; a single tie or smaller value stops the elimination.
- Counting what has been deleted: A deleted column no longer enters the comparison. In an elimination chain, a strategy (for example Top) can be eliminated only after another strategy (Right) has been deleted.
- Mistaking weak for strict: If there is a tie, the domination is weak; deleting may lose equilibria and the result may depend on the order.
- Confusing dominant with dominated: A dominant strategy beats all the others; a dominated strategy loses to at least one. Elimination also works without a dominant strategy.
- Assuming everything left over is an equilibrium: If elimination leaves several cells (for example 2 × 2 remains in the language-choice game), the equilibria are found in the remaining small game by underlining.
3.4Mixed strategies
In some games no cell is a mutual best response. In Matching Pennies, two players simultaneously choose a side of a coin; if the sides match, the row player wins, and if they differ, the column player wins. If the row player says Heads, the column player wants to say Tails; if the column player says Tails, the row player wants to switch to Tails, and the cycle goes on. In such games players want to be unpredictable. The idea of "being unpredictable" is made precise with probability.
3.4.1Mixed strategies and the indifference principle
Two basic probability concepts are needed. A probability distribution assigns to each possible outcome a number between 0 and 1, and these numbers sum to 1. On a fair die each face has probability 1/6. The expected value of a random number X is found by multiplying each possible value by its probability and adding:
E[X] = Σx x · P(X = x)
For a fair die, E[X] = (1 + 2 + 3 + 4 + 5 + 6) · 1/6 = 21/6 = 3.5. The expected value is not "the most likely outcome"; a die never shows 3.5. The expected value says what the average per round would be if the same experiment were repeated many times.
A mixed strategy σi of player i is a probability distribution over their pure strategies: each pure strategy is given a nonnegative probability, and the probabilities sum to 1. A mixed strategy that gives probability 1 to a single pure strategy is that pure strategy itself.
The support of a mixed strategy is the set of pure strategies that are given positive probability.
When players play mixed strategies, the payoff is the expected payoff: the payoff of each cell is multiplied by the probability of that cell occurring, and the products are added. The players' dice are independent of each other; hence the probability of cell (row r, column c) is σ1(r) · σ2(c).
For example, in Rock-Paper-Scissors, (1/3, 1/3, 1/3) means "roll a die; play Rock on 1–2, Paper on 3–4, Scissors on 5–6". In 2 × 2 games the notation gets shorter: p is the probability that the row player plays the first row, and q the probability that the column player plays the first column; the probabilities of the other options are 1 − p and 1 − q.
The expected payoff of a pure strategy against a mixing opponent is the payoffs of that row weighted by the opponent's probabilities. Let the opponent play (1/2 Rock, 1/4 Paper, 1/4 Scissors) in Rock-Paper-Scissors. Let a win be +1, a loss −1, and a draw 0:
- Rock: ½ · 0 + ¼ · (−1) + ¼ · (+1) = 0.
- Paper: ½ · (+1) + ¼ · 0 + ¼ · (−1) = ¼.
- Scissors: ½ · (−1) + ¼ · (+1) + ¼ · 0 = −¼.
The best response to this opponent is Paper, which earns an average of ¼ point per round. Expected value and argmax together give the best response to a mixing opponent. If the opponent played (1/3, 1/3, 1/3), every move would earn 0 and no move would be better than another. This is exactly the equilibrium of RPS: both players play (1/3, 1/3, 1/3) and every action earns 0. Any mixture other than 1/3–1/3–1/3 can be exploited by the opponent; the computation just above shows how a player with a slight bias toward Rock is exploited with Paper.
A profile σ* = (σ1*, …, σn*) of mixed strategies is a mixed Nash equilibrium if and only if ui(σi*, σ−i*) ≥ ui(σi, σ−i*) for every player i and every mixed strategy σi. Here ui is the expected payoff.
The definition is the same as in the pure case; only the strategies and payoffs have been extended. The key to computing a mixed equilibrium is the following principle.
In a mixed Nash equilibrium, each player gets the same expected payoff from every pure strategy in their support, against the others' equilibrium mixtures. Pure strategies outside the support do not give more than this.
The expected payoff of player i's mixed strategy is the probability-weighted average of the expected payoffs of the pure strategies in the support. Let a and b be two strategies in the support, and let a give strictly more than b. Then if the probability of b is shifted to a, the average rises, because the weight of a smaller value falls and that of a larger value rises. This means there is a profitable deviation at the equilibrium, which contradicts the definition of equilibrium. So all strategies in the support give equal payoffs. If a strategy outside the support gave more than this common value, the player could again increase their payoff by shifting all the probability to it; this is a contradiction as well. □
The principle has a surprising consequence. For the row player to be willing to play their mixed strategy, they must be indifferent between their two options; this indifference depends on the column player's q. So the row player's indifference equation determines the column player's q. Conversely, the column player's indifference equation determines the row player's p. The rule is: the row player's mixture is computed from the column player's payoffs (and vice versa).
A mixed strategy has two interpretations. The first is literally rolling a die: in a penalty kick the kicker picks a side at random in their head. The second is the population interpretation: in a large population the probabilities are behavior frequencies, for example the share of penalties kicked to the left. Even if a player does not roll a die, their move is uncertain in the opponent's eyes; probability measures this uncertainty.
3.4.2The inspection game step by step
The inspection game is a typical example of a game with no pure equilibrium. The row player is a worker and chooses Work or Shirk. The column player is a manager and chooses Inspect or Don't inspect. The numbers are: wage 4, the worker's cost of effort 2, the output of a working worker 6, the manager's cost of inspection 1. A shirking worker who is caught during an inspection gets no wage.
Each cell is derived from these numbers. In the Work–Inspect cell the worker subtracts the cost of effort from the wage: 4 − 2 = 2. The manager subtracts the wage and the inspection cost from the output: 6 − 4 − 1 = 1. In Work–Don't inspect the worker again gets 2 and the manager gets 6 − 4 = 2. In Shirk–Inspect the worker is caught: no wage, no effort, so 0; the manager gets no output, pays no wage, and pays only the inspection cost: −1. In Shirk–Don't inspect the worker gets the wage without working: 4; the manager pays the wage without getting output: −4.
Let us follow the arrows in Figure 3.14. If the worker works, the manager stops inspecting (2 > 1). If the manager does not inspect, the worker shirks (4 > 2). If the worker shirks, the manager inspects (−1 > −4). If the manager inspects, the worker works (2 > 0). In every cell someone wants to deviate; the best responses form a cycle. So we look for a mixed equilibrium.
Let the worker play Work with probability p and the manager play Inspect with probability q.
- The worker's two options. The expected payoff of Work is E[Work] = 2q + 2(1 − q) = 2; it is 2 whatever the manager does. The expected payoff of Shirk is E[Shirk] = 0 · q + 4(1 − q) = 4 − 4q.
- The worker must be indifferent. 2 = 4 − 4q ⇒ 4q = 2 ⇒ q* = 1/2. The manager must inspect half the time. If they inspect less, the worker always shirks; if they inspect more, the worker always works and the inspection is wasted money.
- The manager's two options. E[Inspect] = 1 · p + (−1)(1 − p) = 2p − 1; E[Don't inspect] = 2p + (−4)(1 − p) = 6p − 4.
- The manager must be indifferent. 2p − 1 = 6p − 4 ⇒ 3 = 4p ⇒ p* = 3/4.
- Check. Both probabilities lie between 0 and 1 ✓. Expected payoffs: the worker gets 2 (both options give 2), the manager gets 2 · ¾ − 1 = ½.
The equilibrium is (p*, q*) = (3/4, 1/2). The worker works three quarters of the time, and the manager inspects half the time.
Figure 3.15 shows the manager's situation. When p < 3/4, the blue line is on top: if the worker shirks often, it pays to inspect. When p > 3/4, the red line is on top: if the worker mostly works, inspection is unnecessary. Only at p = 3/4 is the manager indifferent between the two options and willing to mix.
3.4.3When the penalty changes, whose probability changes?
Suppose a shirking worker who is caught is punished more harshly: the payoff of a caught shirker is −2 instead of 0. Which probability changes? The intuitive answer is "the worker works more". The indifference principle says something else.
The penalty changes only the worker's payoff. And the worker's payoffs determine the manager's q. In the new version, the worker's indifference is 2 = −2q + 4(1 − q) = 4 − 6q, which gives q* = 1/3. Since the manager's payoffs have not changed, the manager's indifference equation stays the same and p* = 3/4 does not change. A harsher penalty does not make the worker work harder; it lets the manager inspect less.
In general, if the payoff of a caught shirker is c, the worker's indifference is 2 = c · q + 4(1 − q). This equation can be put into the form (4 − c) q = 2, and we get
q* = 2/(4 − c), p* = 3/4
At c = 0, q* = 1/2; at c = −2, q* = 1/3; at c = −6, q* = 1/5.
This result is a concrete instance of the principle that "each player's equilibrium probability is determined by the opponent's payoffs". The result also has a policy meaning. When the penalty rises, the probability of inspection falls and the cost of inspection is saved, but the rate of rule-breaking does not change. To change that rate, the inspector's (the manager's) payoffs would have to change.
3.4.4Hide and seek: repeating the method
Let us apply the indifference method once more, writing out each step. Ayşe hides (row) and Bora seeks (column). The options are Garden and House. Each cell shows the enjoyment points (Ayşe, Bora). If Bora finds Ayşe in the garden, he gets 3 points; in the house, 1 point. If Ayşe is not found in the garden she gets 2 points; if she is not found in the house, 1 point. A found Ayşe gets 0, and a Bora who fails to find her gets 0.
- Is there a pure equilibrium? After underlining, no cell has two underlines. At (Garden, Garden) Ayşe switches to House; at (House, Garden) Bora switches to House; at (House, House) Ayşe switches to Garden; at (Garden, House) Bora switches to Garden. There is no pure equilibrium.
- Variables. Ayşe chooses Garden with probability p and Bora chooses Garden with probability q. If Ayşe mixes, her two options must give her equal payoffs; this equality yields q.
- Ayşe in the Garden. With probability q Bora looks in the garden and Ayşe gets 0; with probability 1 − q he looks in the house and Ayşe gets 2. E[Garden] = 0 · q + 2(1 − q) = 2 − 2q.
- Ayşe in the House. If Bora looks in the garden (q), Ayşe gets 1; if he looks in the house, 0. E[House] = 1 · q + 0 · (1 − q) = q.
- Equate and solve. 2 − 2q = q ⇒ 3q = 2 ⇒ q* = 2/3. Bora must look in the garden with probability 2/3 so that Ayşe stays indifferent.
- The same for Bora. If Bora looks in the Garden, he gets 3 when Ayşe is there (p) and 0 when she is not: E[Garden] = 3p. If he looks in the House: E[House] = 0 · p + 1 · (1 − p) = 1 − p.
- Equate. 3p = 1 − p ⇒ 4p = 1 ⇒ p* = 1/4. p* came out of Bora's numbers, not Ayşe's.
- Check. 0 < 1/4 < 1 and 0 < 2/3 < 1 ✓. Expected payoffs: Ayşe 2 − 2 · (2/3) = 2/3, Bora 3 · (1/4) = 3/4.
At first sight the result looks contradictory: Ayşe, who likes the garden more (2 points if she is not found there), hides there with probability only 25%. The reason is that Bora also likes finding her in the garden more (3 points). Bora's wish to look in the garden drives Ayşe away from it. Ayşe's liking for the garden, in turn, determines Bora's behavior: Bora looks in the garden with probability 2/3.
3.4.5Code trace: mixed_2x2()
The indifference equations can be solved in general for every 2 × 2 game. Let the row player's payoffs be A and the column player's B (index 0 is the first option, 1 the second). The row player's indifference is the equality
A00 q + A01(1 − q) = A10 q + A11(1 − q)
Collecting the terms in q on one side gives q (A00 − A01 − A10 + A11) = A11 − A01. Calling the number in parentheses da, we get q = (A11 − A01) / da. Doing the same for the column player's indifference B00 p + B10(1 − p) = B01 p + B11(1 − p) gives p = (B11 − B10) / db, with db = B00 − B01 − B10 + B11. The function below evaluates these formulas with fractions (Fraction), so results such as 2/5 come out without decimal rounding error.
from fractions import Fraction as F
def mixed_2x2(A, B):
da = A[0][0] - A[0][1] - A[1][0] + A[1][1]
if da == 0: return None # degenerate
q = F(A[1][1] - A[0][1], da) # row indifferent
db = B[0][0] - B[0][1] - B[1][0] + B[1][1]
if db == 0: return None
p = F(B[1][1] - B[1][0], db) # column indifferent
if not (0 < p < 1 and 0 < q < 1):
return None # no interior eq.
u1 = A[0][0] * q + A[0][1] * (1 - q)
return p, q, u1The function returns None in three cases: if da = 0, q drops out of the row player's indifference equation (the difference between the two options does not depend on q; either no q makes the row player indifferent or every q does, so None does not mean "no equilibrium"); if db = 0, the same happens for the column player; and if one of the probabilities is not between 0 and 1, there is no interior mixed equilibrium. In the last line, u1 is the row player's expected payoff when playing the first row. By the indifference principle the second row gives the same value, so this number is the row player's equilibrium payoff.
Let us run the function on the Battle of the Sexes. Let 0 = Opera and 1 = Football; A = [[3, 0], [0, 2]] holds the row player's payoffs and B = [[2, 0], [0, 3]] the column player's. The row player likes the Opera more and the column player likes Football more; both want to avoid ending up apart (0).
| Line | Computation | Value | Meaning |
|---|---|---|---|
da | 3 − 0 − 0 + 2 | 5 | ≠ 0, the equation exists |
q | (2 − 0) / 5 | 2/5 | 3q = 2(1 − q): the column player plays Opera with probability 2/5 |
db | 2 − 0 − 0 + 3 | 5 | ≠ 0 |
p | (3 − 0) / 5 | 3/5 | 2p = 3(1 − p): the row player plays Opera with probability 3/5 |
| check | 0 < 3/5 < 1, 0 < 2/5 < 1 | true | an interior mixed equilibrium exists |
u1 | 3 · 2/5 + 0 · 3/5 | 6/5 | the row player's expected payoff |
| return | (3/5, 2/5, 6/5) |
The column player's expected payoff is also u2 = 2 · (3/5) = 6/5. This number is striking: at the two pure equilibria (Opera, Opera) and (Football, Football) the players get 2 or 3. At the mixed equilibrium both get only 6/5, because they often end up apart. Failing to meet happens when the row player goes to the Opera and the column player to Football, or the reverse. Since the column player's probability of Football is 1 − 2/5 = 3/5 and the row player's is 1 − 3/5 = 2/5, the probability of failing to meet is (3/5)(3/5) + (2/5)(2/5) = 9/25 + 4/25 = 13/25 = 52%.
The None branches of the function are best understood through examples. In the Free Money game only the (Heads, Heads) cell is (1, 1) and the other cells are 0. For A = [[1, 0], [0, 0]] we get da = 1 and q = (0 − 0)/1 = 0; since q is not strictly between 0 and 1, the function returns None. In the Prisoner's Dilemma, for A = [[-1, -3], [0, -2]] we get da = −1 + 3 − 0 − 2 = 0, and the first check returns None: because Betray gives exactly 1 more than Silent in every case, the row player is indifferent at no q.
3.4.6Mixed equilibria of six classic games
The table below compares the equilibria of six classic 2 × 2 games. p* and q* are the probabilities of playing the first strategy (Heads, Swerve, Opera, Stag, Party, Heads).
| Game | Pure NE | Mixed NE (p*, q*) | (u1, u2) | What happens at the mixed equilibrium? |
|---|---|---|---|---|
| Matching Pennies | 0 | 1/2, 1/2 | (0, 0) | Each of the four outcomes has probability 25%; this is the only equilibrium, and nobody can be exploited. |
| Chicken (intersection) | 2 | 9/10, 9/10 | (−1/10, −1/10) | Collision (1/10)² = 1%; if a crash cost −k, the probability of swerving would be (k − 1)/k. |
| Battle of the Sexes | 2 | 3/5, 2/5 | (6/5, 6/5) | Failing to meet: 0.36 + 0.16 = 52%. |
| Stag Hunt (stag 4, hare 3) | 2 | 3/4, 3/4 | (3, 3) | Ending up apart 3/8 = 37.5%; stag together 9/16 ≈ 56%. |
| Pure Coordination | 2 | 1/3, 1/3 | (10/3, 10/3) | Different decisions 4/9 ≈ 44%; the more attractive the party, the less often it is chosen. |
| Free Money | 2 | none (only the boundary: 0, 0) | — | If q > 0, Heads is strictly better; indifference only at q = 0. |
Let us derive two of the numbers in the table in detail.
Chicken (intersection). Two drivers arrive at an intersection without traffic lights at the same time. Each chooses Swerve (give way) or Straight. Suppose the other driver swerves with probability x.
- E[Swerve] = 0 · x + (−1)(1 − x) = x − 1.
- E[Straight] = 1 · x + (−10)(1 − x) = 11x − 10.
- Indifference: x − 1 = 11x − 10 ⇒ 9 = 10x ⇒ x = 9/10.
Because the game is symmetric, both drivers swerve with probability 9/10. The expected payoff is 9/10 − 1 = −1/10. The probability that both drivers go straight (a collision) is (1/10)2 = 1/100. If a crash cost −k, indifference would give x − 1 = x − k(1 − x), that is, x = (k − 1)/k. As the cost grows, drivers swerve more often, but the collision probability (1/k)2 never becomes zero.
Pure Coordination. If the other side chooses Party with probability q, the expected payoff of Party is 10q and that of Home is 5(1 − q). 10q = 5 − 5q ⇒ q = 1/3. Although Party is more attractive, it is chosen with probability 1/3. The reason is the indifference principle: the larger the payoff of Party, the more rarely Party must be chosen in order to leave the other side indifferent. The probability of different decisions is 2 · (1/3)(2/3) = 4/9.
The last row of the table is a warning. In Free Money, as long as the column player chooses Heads with probability q > 0, Heads (payoff q) is strictly better for the row player than Tails (payoff 0). Indifference occurs only at q = 0, which is not a "mixture" but the pure (Tails, Tails) equilibrium. In games like this, with ties in the payoffs, there may be no interior mixed equilibrium.
3.4.7Common mistakes with mixed equilibria
- Finding p from one's own numbers: The row player's p makes the column player indifferent; so it is computed from the column player's payoffs.
- Forgetting (1 − q): E = 0 · q + 2 · (1 − q) = 2 − 2q, not "2q". Each term is multiplied by its own probability.
- Not checking the result: If p or q does not come out between 0 and 1, there is no interior mixed equilibrium (usually a strategy is dominated).
- Skipping pure equilibria: A mixed computation does not replace the pure equilibria; underline first, then look for the mixed equilibrium.
- "If indifferent, any p will do": A player is indifferent among their own options, but in equilibrium they play the one p that makes the opponent indifferent. If they played another p, the opponent would move to a pure best response and the equilibrium would break.
- Setting up the equality wrongly: What is equated is the expected payoffs of the same player's two options; the payoffs of the two players are not equated.
3.5Existence and equilibrium selection
Some of the games examined so far had a single equilibrium and some had several; in games with no pure equilibrium, a mixed equilibrium was found. Two questions arise. Does every game have an equilibrium? And if there are several, which one is played?
3.5.1Nash's existence theorem
Every game with a finite number of players, each with a finite strategy set, has at least one Nash equilibrium (in mixed strategies).
The full proof of the theorem is beyond the scope of this course, but the idea can be understood. It rests on the notion of a fixed point. A fixed point of a function is a point the function leaves unchanged: f(x) = x. In its simplest form: every continuous function (one whose graph can be drawn without lifting the pen) that maps the interval [0, 1] into [0, 1] has a fixed point. The graph starts on or above the diagonal at x = 0 and ends on or below it at x = 1; since it is drawn without lifting the pen, it must cross the diagonal somewhere. That crossing point is the fixed point. This is the one-dimensional case of Brouwer's fixed-point theorem.
In Nash's proof the "point" is a mixed-strategy profile. In place of the function there is the best-response correspondence: it assigns to each profile the profiles in which everyone best-responds to the others. A fixed point of the correspondence is a profile in which everyone is already best-responding to the others; by Theorem 3.1, this is a Nash equilibrium. Kakutani's fixed-point theorem (the generalization of Brouwer's to correspondences that return sets instead of single values) guarantees that this correspondence has a fixed point.
This idea also shows why mixed strategies are needed here. Fixed-point theorems require "continuity": probabilities can change continuously (from 0.30 to 0.31), whereas pure strategies change by jumps (from Heads to Tails). Restricted to pure strategies, there are gaps, and the equilibrium can disappear. Indeed, Matching Pennies has no pure equilibrium. So the theorem's guarantee is for mixed strategies.
The finiteness condition is also necessary. If a strategy set is infinite, there may be no equilibrium. For example, let two players simultaneously name a natural number, and let the one who names the larger number win. There is always a larger number than any given one; whichever profile is chosen, the loser can win by naming a larger number. No profile is an equilibrium. In the Cournot game the strategy set was infinite, yet an equilibrium existed, because there the payoffs were smooth and the best responses stayed in a bounded interval. For infinite sets, existence depends on additional conditions.
Figure 3.18 makes this idea concrete in the inspection game. The horizontal axis is the worker's probability p of Working, and the vertical axis is the manager's probability q of Inspecting. The worker's best response is as follows: Shirk (p = 0) when q < 1/2, Work (p = 1) when q > 1/2, and at q = 1/2 the worker is indifferent and every p is a best response. So the blue curve has a "step" shape and contains a horizontal segment at q = 1/2. The manager's best response is a similar step: Inspect (q = 1) when p < 3/4, Don't inspect (q = 0) when p > 3/4. The two steps cross at a single point. At the crossing point both players best-respond to each other; this point is the equilibrium. That the curves must cross is the fixed-point theorem showing up in this simple game.
3.5.2Three equilibria in channel sharing
Two wireless devices want to send packets on the same channel. If both send at the same time, the packets collide and each gets −2. If only one sends, the sender gets 3 and the one that waits gets 1 (the waiting device also benefits from the channel working properly). If both wait, the channel goes unused and both get 0. This structure is the same as the Chicken game: each player wants to do the opposite of the other.
- Device 1's best responses (first numbers). If the other device Sends: Send −2, Wait 1; since −2 < 1, the best response is Wait. If the other Waits: Send 3, Wait 0; the best response is Send.
- The same for device 2 (second numbers). The cells with two underlines are (Send, Wait) = (3, 1) and (Wait, Send) = (1, 3): two pure equilibria.
- Mixed equilibrium. Let q = P(device 2 Sends). Device 1's expected payoff from Send is −2q + 3(1 − q) = 3 − 5q.
- Its expected payoff from Wait: 1 if the other sends, 0 if it waits, that is, 1 · q + 0 · (1 − q) = q.
- Indifference: 3 − 5q = q ⇒ 6q = 3 ⇒ q* = 1/2. Because the game is symmetric, device 2's indifference also gives p* = 1/2.
- Results. At the mixed equilibrium each of the four cells has probability 1/4. The expected payoff is ¼ · (−2) + ¼ · 3 + ¼ · 1 + ¼ · 0 = ½.
The best-response curves (Figure 3.19) intersect at three points: the two corners are the pure equilibria, and the middle point is the mixed equilibrium. Because it is symmetric, the mixed equilibrium is "fair", but it is inefficient. In a quarter of the time the packets collide, in a quarter the channel sits idle, and each device earns only ½ on average. At the pure equilibria each device gets 3 or 1. Random backoff in network protocols is the practical counterpart of this randomization: colliding devices wait a random time and try again, so the question "who sends first" is settled without coordination.
3.5.3How many equilibria? The odd-number rule
There is an interesting pattern in the numbers of equilibria of the games in this chapter.
| Game | Pure equilibria | Mixed equilibria | Total |
|---|---|---|---|
| Prisoner's Dilemma | 1 | 0 | 1 |
| Hide and Seek, Inspection, Matching Pennies | 0 | 1 | 1 |
| Channel sharing, Chicken, Battle of the Sexes, Stag Hunt, Pure Coordination | 2 | 1 | 3 |
| Language choice (3 × 3) | 2 | 1 (Ayşe plays Python with probability 3/4, Bora with probability 1/5) | 3 |
| The trap of weak domination (with ties) | 3 | infinitely many | — |
| Free Money (with ties) | 2 | 0 | 2 (even) |
In almost all finite games, that is, games whose payoffs are in general position (nondegenerate games), the number of Nash equilibria is finite and odd (1, 3, 5, …). Special ties among payoffs are the best-known way this condition fails.
The proof of the theorem is advanced (Wilson, 1971), but it gives a practical rule: if two pure equilibria have been found, there is probably one more, mixed, equilibrium, and it should be searched for with the indifference method. The language-choice game is a nice example. Besides the two pure equilibria, there is a mixed equilibrium in which the C options are never played. Ayşe plays Python with probability 3/4 and Bora plays Python with probability 1/5. Against this mixture, Ayşe's Python and Java rows give 8/5 and her C row gives only 1/5; Bora's Python and Java columns give 7/4 and his C column gives 1/2. Switching to C gains nobody anything, so the mixture found in the 2 × 2 game is also an equilibrium of the 3 × 3 game.
In games with ties the rule can fail. In the trap of weak domination, the column player gets 1 in every cell and so accepts any mixture; for example, while the row player plays Bottom, every mixture of the column player is an equilibrium. There are infinitely many equilibria. In Free Money the number of equilibria is 2, which is even. These games are "degenerate": the ties among payoffs violate the assumption of the rule. If the payoffs are changed slightly (for example, one tie is made 1.01 instead of 1), the odd-number rule returns.
3.5.4Multiple equilibria: Stag Hunt
The Stag Hunt, based on a story told by the philosopher Jean-Jacques Rousseau, is the best-known example of multiple equilibria. Two hunters decide simultaneously whether to hunt Stag or Hare. The stag is caught only if both hunt it together, and each gets 4. A hare can be caught alone, and guarantees 3 whatever the partner does. A hunter who goes for the stag alone comes home empty-handed (0).
| Stag | Hare | |
|---|---|---|
| Stag | (4, 4) | (0, 3) |
| Hare | (3, 0) | (3, 3) |
The best responses coincide in two cells: (Stag, Stag) and (Hare, Hare). If the partner goes for the stag, going for the stag is best (4 > 3); if the partner goes for the hare, going for the hare is best (3 > 0). The third equilibrium is mixed: if the other side chooses Stag with probability q, the expected payoff of Stag is 4q and that of Hare is 3 in every case. 4q = 3 ⇒ q = 3/4. Stag is a best response only if one believes the partner will come with probability at least 75%. Which equilibrium will be played?
Two criteria give different answers.
Pareto dominance: One equilibrium Pareto dominates another if it gives everyone at least as much and at least one player more. (Stag, Stag) gives both hunters more (4 > 3). The efficiency criterion selects (Stag, Stag).
Risk dominance: This criterion, proposed by Harsanyi and Selten (1988), asks which equilibrium is "safer" when one is unsure what the partner will do. At each equilibrium, the loss from a unilateral deviation is computed for every player and these losses are multiplied. The equilibrium with the larger product is risk dominant.
- At (S, S), a hunter who deviates to Hare gets 3 instead of 4: the loss is 4 − 3 = 1. For the two hunters the product is 1 · 1 = 1.
- At (H, H), a hunter who deviates to Stag gets 0 instead of 3: the loss is 3 − 0 = 3. The product is 3 · 3 = 9.
Since 9 > 1, (Hare, Hare) is risk dominant. The intuition is this: at (H, H) the cost of being wrong is low (the hare is guaranteed anyway), whereas at (S, S) misplaced trust in the partner is costly (coming home empty-handed). In 2 × 2 symmetric games, the risk-dominant equilibrium is the one that is a best response to a 50–50 belief about what the partner will do: if the partner comes for the stag with probability ½, Stag gives 4 · ½ = 2 and Hare gives 3.
3.5.5Criteria for equilibrium selection
The theory alone does not say which of several equilibria will be played. This question is called the problem of equilibrium selection. The criteria that stand out in the literature are the following:
| Criterion | What it says | Example |
|---|---|---|
| Pareto dominance | Choose the equilibrium that makes everyone better off. Requires trust. | (S, S) in Stag Hunt. |
| Risk dominance | If you are not sure what the other side will do, choose the one with the lower risk of loss. | (H, H) in Stag Hunt. |
| Focal point (Schelling, 1960) | Culture, habit, or salience makes one equilibrium stand out. | "If we are to meet in Istanbul: Taksim at noon." |
| Correlated equilibrium (Aumann, 1974) | A common signal steers the players to one of the equilibria. | A traffic light resolves Chicken at an intersection. |
| Learning and evolution | In repeated play, players learn by trial; the equilibrium reached depends on initial behavior. | If everyone starts out hunting hare, the stag equilibrium may never be reached. |
The focal point is especially interesting. Two friends are to meet in Istanbul but have not been able to discuss the place and time. Every common place and time is an equilibrium; the payoffs are equal, so neither the Pareto nor the risk criterion helps. Even so, many people answer "Taksim at noon". What determines the choice is not the numbers but shared culture and salience. Thomas Schelling put forward this observation in 1960.
Equilibrium selection also raises a problem of fairness. In the Battle of the Sexes, one pure equilibrium favors one player (Opera: 3 to 2) and the other favors the other (Football: 2 to 3). The symmetric mixed equilibrium, which looks "fair", gives each only 6/5; for both players it is worse than either pure equilibrium. Fairness and efficiency conflict here. In real life such conflicts are resolved by taking turns (opera one week, football the next) or by an outside signal such as a coin flip. The idea of an outside signal is the core of the correlated equilibrium in Section 3.5.7.
3.5.6An opponent who makes mistakes
The equilibrium concept assumes that everyone correctly knows the others' behavior. Let us relax this assumption a little: suppose the opponent, with a small probability ε, makes a move they did not intend (a slip of the hand, a wrong key). Does the best response change?
Prisoner's Dilemma: no change. Let the opponent stay Silent with probability p. The expected payoff of Sam staying Silent is −1 · p − 3 · (1 − p) = 2p − 3, and that of Betray is 0 · p − 2 · (1 − p) = 2p − 2. The difference is (2p − 2) − (2p − 3) = 1 for every p. Betray is exactly 1 year better for every p; the decision does not change whatever the opponent's error rate.
Stag Hunt: depends on the error rate. Let the opponent slip to Hare with probability q. The expected payoff of Stag is 4 · (1 − q), and that of Hare is 3 in every case. Stag is a best response only when 4(1 − q) ≥ 3, that is, q ≤ 1/4. If the partner's probability of slipping to hare exceeds 25%, the safe choice, the risk-dominant Hare, is the better one.
The general lesson is this: a dominant-strategy equilibrium is robust to mistakes; coordination equilibria are not. A dominant strategy does not depend at all on what the opponent does, so the opponent's mistakes do not affect it. A coordination equilibrium, on the other hand, rests on trust that the other side will play correctly; as trust declines, the equilibrium is shaken.
3.5.7Correlated equilibrium
Two drivers arrive at an intersection without traffic lights at the same time. Each either gives way (Swerve) or goes through (Straight). This is a Chicken game: (Swerve, Swerve) = (0, 0), (Swerve, Straight) = (−1, 1), (Straight, Swerve) = (1, −1), (Straight, Straight) = (−10, −10). Each of the two pure equilibria favors one driver; without coordination, in the symmetric mixed equilibrium each driver swerves with probability 9/10, a collision occurs with probability 1%, and the expected payoff is −1/10 (the Chicken example).
Now put a traffic light at the intersection. The light works like a mediator: it draws a cell from a publicly announced probability distribution μ and whispers to each driver only their own recommendation. Here μ gives probability 1/3 each to the cells (Swerve, Swerve), (Swerve, Straight), and (Straight, Swerve), and probability 0 to (Straight, Straight).
A probability distribution μ over profiles is a correlated equilibrium (CE) if it satisfies the following condition: for every player and every strategy that may be recommended to them, when the player knows only their own recommendation, the expected payoff from obeying the recommendation is no less than the expected payoff from deviating from it. These conditions are called obedience constraints.
Checking the obedience constraints requires conditional probability. The probability of an event given that another event has occurred is P(A | B) = P(A and B) / P(B). Bayes' rule rests on this definition; when a driver sees their own recommendation, they update their belief about the opponent's recommendation in this way.
- If the recommendation is "Swerve". The cells in which driver 1 is told Swerve are (Swerve, Swerve) and (Swerve, Straight); each has probability 1/3, for a total of 2/3. The conditional probabilities are (1/3)/(2/3) = 1/2 each: the opponent has received the recommendation Swerve with probability ½ and Straight with probability ½.
- If the driver obeys (Swerve): ½ · 0 + ½ · (−1) = −½. If the driver deviates (Straight): ½ · 1 + ½ · (−10) = −4.5. −½ > −4.5; obeying is better.
- If the recommendation is "Straight". The only cell in which driver 1 is told Straight is (Straight, Swerve); the opponent has certainly been told "Swerve". Obeying gives 1, deviating (Swerve) gives 0. Obeying is better.
- Because the game is symmetric, driver 2's constraints are satisfied in the same way. Deviating from a recommendation is never profitable;μ is a correlated equilibrium.
- Payoff. Each driver's expected payoff is ⅓ · 0 + ⅓ · (−1) + ⅓ · 1 = 0. This is better than the −1/10 of the mixed equilibrium, and there is never a collision.
The light's power comes from the fact that drivers know nothing beyond their own recommendations. A driver who is told to Swerve knows that the opponent may also have been told to Swerve; this uncertainty makes deviation costly. The mediator enforces nothing; obeying is in everyone's own interest.
The correlated equilibrium matters for two reasons. First, its scope is broad: every Nash equilibrium is a correlated equilibrium (if the mediator recommends exactly the players' independent mixtures, the obedience constraints reduce to the Nash condition), but the converse is false. The light in this example corresponds to no Nash equilibrium. Second, it is easy to compute: all the obedience constraints are linear in the probabilities of μ. A correlated equilibrium can therefore be found in polynomial time by linear programming (LP); no such method is known for the Nash equilibrium (Section 3.6.6). Tuning the light's timing to traffic density is a separate design decision: which correlated equilibrium is selected is up to whoever sets the rules.
3.6Minimax and complexity
Two topics are treated together: zero-sum games, in which interests are exactly opposed, and how hard it is for a computer to find an equilibrium in general games. In zero-sum games the equilibrium concept is especially strong and can be computed efficiently.
3.6.1Zero-sum games and the saddle point
In a zero-sum game the payoffs of the two players in each cell sum to zero: u2 = −u1. So only the row player's payoff is written in the cell; the column player loses the same amount. The row player wants to make this number larger and the column player wants to make it smaller.
A natural line of reasoning in such a game is pessimistic thinking. The row player says: "Whichever row I choose, my opponent will do the worst to me. So let me look at the worst value of each row and pick the best of those." The column player thinks similarly.
In a two-player zero-sum game with row-player payoff matrix A:
- Maximin: maxr minc A[r][c]. The largest payoff the row player can guarantee with pure strategies.
- Minimax: minc maxr A[r][c]. The smallest loss the column player can guarantee with pure strategies.
- If maximin and minimax are equal, the cell that attains this value is called a saddle point. A saddle point is a cell that is the smallest in its row and the largest in its column.
The matrix: A = (4, 3, 5), B = (2, 1, 6), C = (5, 2, 0); the columns are X, Y, Z.
- The row player thinks pessimistically. In each row, the worst value the opponent can leave them: 3 in A, 1 in B, 0 in C.
- Maximin = max(3, 1, 0) = 3 (row A). By choosing A, the row player guarantees at least 3.
- The column player is pessimistic too. In each column, the highest value the row player can get: 5 in X, 3 in Y, 6 in Z.
- Minimax = min(5, 3, 6) = 3 (column Y). By choosing Y, the column player guarantees losing at most 3.
- Result. Maximin = minimax = 3. The 3 in cell (A, Y) is the smallest in row A and the largest in column Y: a saddle point. This cell is a pure Nash equilibrium, and the value of the game is v = 3.
It is easy to see that a saddle point is a Nash equilibrium. If the row player switches to another row in column Y, they cannot get more than 3, because 3 is the largest in that column. If the column player switches to another column in row A, they cannot give less than 3, because 3 is the smallest in that row. The name comes from this: a horse's saddle is a peak in one direction (along the column) and a trough in the other (along the row).
Maximin and minimax are not always equal, but maximin can never exceed minimax. The reason is this: let the maximin row be r* and the minimax column c*. The minimum of row r* cannot be larger than A[r*][c*], the entry in that row; the maximum of column c* cannot be smaller than A[r*][c*], the entry in that column. Hence maximin ≤ A[r*][c*] ≤ minimax. If equality fails, there is no saddle point and a gap remains between the players' guarantees.
3.6.2No saddle point: the penalty kick
In a penalty kick, the kicker and the goalkeeper simultaneously choose Left or Right (Left and Right are from the kicker's point of view). Each cell shows the percentage of goals; the kicker wants to make this number larger and the goalkeeper smaller. The numbers are illustrative; the structure in real data is similar (Palacios-Huerta, 2003).
- Pure guarantee. The row minima are 60 (Left) and 70 (Right): maximin is 70. The column maxima are 90 (goalkeeper Left) and 95 (goalkeeper Right): minimax is 90. 70 < 90: there is no saddle point.
- The kicker mixes. Let the kicker shoot Left with probability p. If the goalkeeper dives Left, the goal percentage is 60p + 90(1 − p) = 90 − 30p; if the goalkeeper dives Right, it is 95p + 70(1 − p) = 70 + 25p.
- The kicker's guarantee. The goalkeeper tries to minimize the goal percentage; so for each p, the kicker's guarantee is the smaller of the two lines. The curve formed by these smaller values is called the lower envelope.
- The peak of the envelope. The lower envelope is highest where the two lines cross: 90 − 30p = 70 + 25p ⇒ 20 = 55p ⇒ p* = 4/11 ≈ 0.36. The value is v = 90 − 30 · 4/11 = 870/11 ≈ 79.1.
- The goalkeeper's side. Let the goalkeeper dive Left with probability q. They must leave the kicker indifferent: 60q + 95(1 − q) = 90q + 70(1 − q) ⇒ 95 − 35q = 70 + 20q ⇒ q* = 5/11. The goal percentage is then 95 − 35 · 5/11 = 870/11.
The goalkeeper's guarantee is also 79.1%. With mixed strategies, max-min = min-max. The kicker guarantees 79.1% on every shot, and the goalkeeper guarantees conceding no more than that.
An interesting detail: the kicker's strong side is Left (95% if the goalkeeper dives the wrong way), yet at equilibrium they shoot Left only with probability 4/11. The goalkeeper dives Left with probability 5/11, that is, less than half the time. By the indifference principle, each player's probability is determined by the opponent's numbers; so the intuition "shoot to the strong side more often" does not hold at equilibrium.
3.6.3Security games
Security games model situations in which limited resources protect many targets: airports, ports, forest patrols. The defender can protect k of n targets. Which k targets are chosen is a pure strategy, and there are C(n, k) of them. C(n, k) = n! / (k! (n − k)!) is the number of ways to choose k items out of n without regard to order. For n = 20, k = 5 there are 15,504 pure strategies.
The attacker can observe the patrol pattern. An attacker easily gets around a fixed pattern; so the defender randomizes. The ARMOR system (2007), used at Los Angeles International Airport, planned checkpoints and canine patrols with this model (Tambe, 2011).
One guard, two targets. The airport H has value 4 and the port L has value 2. The guard protects H with probability p and L with probability 1 − p. An attacker who hits the unprotected target gains its value; one who hits the protected target gets 0.
- If the attacker hits H, their expected payoff is 4 · (1 − p) (4 if H is unprotected).
- If they hit L it is 2 · p (L is unprotected if the guard is at H).
- The guard leaves the attacker indifferent: 4(1 − p) = 2p ⇒ 4 = 6p ⇒ p = 2/3.
- The attacker's payoff is 4 · (1/3) = 4/3.
If the guard always protected H, the attacker would hit L and get 2. Randomization lowers the attacker's payoff from 2 to 4/3. The valuable target is protected more often, but no target is left completely unprotected.
3.6.4von Neumann's minimax theorem
In the penalty-kick and security examples, the two players' guarantees came out equal under mixed strategies. This is no coincidence. To state the theorem we need the matrix notation for expected payoff. Let the row player's mixed strategy be a probability vector x = (x1, …, xm) and the column player's be y. Each entry of the vector Ay is a row's expected payoff against y; and xTAy is the sum of these row expectations weighted by the probabilities in x, that is, the row player's expected payoff. (xT denotes x written as a row vector.)
In every finite two-player zero-sum game,
maxx miny xTAy = miny maxx xTAy = v
holds. v is the value of the game.
The left side is the largest payoff the row player can guarantee with mixed strategies; the right side is the smallest loss the column player can guarantee. With pure strategies there could be a gap between them (70 and 90 in the penalty kick); with mixed strategies the gap always closes. The consequences of the theorem are as follows:
- Equilibrium = minimax strategies. (x*, y*) is a Nash equilibrium if and only if x* is a maximin strategy and y* is a minimax strategy. At every equilibrium the row player's payoff is the same: v.
- Interchangeability. If (x, y) and (x′, y′) are two equilibria, then (x, y′) is also an equilibrium. This is because x is a maximin strategy and y′ is a minimax strategy, and by the first consequence every such pair is an equilibrium. The players need not coordinate on which equilibrium to play; in zero-sum games there is no equilibrium selection problem.
- Linear programming. The row player looks for a mixture x that earns at least v against every column, and for the largest possible v: maximize v; subject to Σi xi A[i][j] ≥ v for each column j, Σi xi = 1, and every xi ≥ 0. Because all the constraints are linear, this is a linear program, and a computer solves it in polynomial time.
- Link to learning. If the players play the game repeatedly and learn by increasing the weight of strategies that did well in the past, their average strategies approach the minimax strategies.
Nash's theorem can be seen as a generalization of the minimax theorem to non-zero-sum n-player games. But the generalization does not come free. In a general game the "value" is not unique (in the Battle of the Sexes the equilibria give different payoffs), interchangeability fails (if one player plays a strategy from one equilibrium and the other from another, the outcome need not be an equilibrium), and an equilibrium cannot be found by linear programming.
3.6.5Code trace: maximin()
If the row player has only two rows (a 2 × n game), the maximin strategy is easily found by the graphical method. Let the row player play the first row with probability p. Each column j gives a line depending on p: p · A[0][j] + (1 − p) · A[1][j]. The column player answers each p with the worst column for the row player; so the row player's guarantee is the lower envelope of these lines: g(p) = minj [p · A[0][j] + (1 − p) · A[1][j]]. Because the lower envelope is piecewise linear, its highest point is found either at the endpoints (p = 0, p = 1) or at an intersection of two lines. The function collects these candidates and picks the best.
from fractions import Fraction as F
def maximin(A): # A: 2 x n
n, cand = len(A[0]), [F(0), F(1)]
for j in range(n):
for k in range(j + 1, n):
d = A[0][j] - A[1][j] - A[0][k] + A[1][k]
if d != 0:
cand.append(F(A[1][k] - A[1][j], d))
g = lambda p: min(p*a+(1-p)*b for a, b in zip(*A))
p = max((c for c in cand if 0 <= c <= 1), key=g)
return p, g(p)The intersection of two lines is found as follows. Equate the lines of columns j and k: p A[0][j] + (1 − p) A[1][j] = p A[0][k] + (1 − p) A[1][k]. Rearranging gives p · d = A[1][k] − A[1][j], where d = A[0][j] − A[1][j] − A[0][k] + A[1][k]. If d = 0 the lines are parallel and do not intersect. The expression zip(*A) yields the columns of the matrix as pairs (a, b): a is the entry in the first row and b the entry in the second row.
Let the example matrix be A = [[4, 1, 3], [0, 3, 2]]; the columns are X, Y, Z. The lines are X: 4p, Y: p + 3(1 − p) = 3 − 2p, Z: 3p + 2(1 − p) = 2 + p. The pure maximin is 1 and the minimax is 3; there is no saddle point.
| Step | Computation | Result |
|---|---|---|
| Start | n = 3, endpoints | cand = [0, 1] |
| X and Y | d = 4 − 0 − 1 + 3 = 6; p = (3 − 0)/6 | 1/2 is added |
| X and Z | d = 4 − 0 − 3 + 2 = 3; p = (2 − 0)/3 | 2/3 is added |
| Y and Z | d = 1 − 3 − 3 + 2 = −3; p = (2 − 3)/(−3) | 1/3 is added |
| g(0) | min(0, 3, 2) | 0 |
| g(1) | min(4, 1, 3) | 1 |
| g(1/2) | min(2, 2, 5/2) | 2 (best) |
| g(2/3) | min(8/3, 5/3, 8/3) | 5/3 |
| g(1/3) | min(4/3, 7/3, 7/3) | 4/3 |
| return | max(..., key=g) | (1/2, 2) |
maximin() trace. The thick red line is the lower envelope g(p); the candidate points are marked. The largest guarantee is v = 2 at p = 1/2. The line of Z (green, dashed) stays above the envelope.The largest guarantee is v = 2 at p = 1/2. The line of column Z gives 2.5 at this point and stays above the envelope; the column player never plays Z. The minimax side can be checked too: if the column player plays X with probability 1/3 and Y with probability 2/3, the row player's first row gives 4/3 + 2/3 = 2 and the second row gives 0 + 2 = 2. The row player can get at most 2. Max-min = min-max = 2.
3.6.6How hard is it to compute an equilibrium?
In computer science, a problem counts as "efficiently solvable" if, as the input grows, the running time grows like a polynomial in the input size (for example n2 or n3). If the time grows exponentially, like 2n, even a small increase in size makes the computation infeasible. For the Nash equilibrium the picture is as follows:
| Problem | Complexity | Method / source |
|---|---|---|
| Pure Nash equilibrium (matrix given) | Polynomial | Best-response marking, O(mn) |
| Two-player zero-sum, mixed | Polynomial | Linear programming (minimax) |
| Two-player general game, mixed | PPAD-complete | Chen–Deng (2006) |
| Three or more players, exact equilibrium | FIXP-complete | Etessami–Yannakakis (2007) |
| Three or more players, ε-approximate equilibrium (ε small enough) | PPAD-complete | Daskalakis–Goldberg–Papadimitriou (2006) |
| Highest-welfare equilibrium / is it the only one? | NP-hard | Gilboa–Zemel (1989); Conitzer–Sandholm (2008) |
The first two rows of the table are the methods we have seen in this chapter, and they are efficient. In practice two methods are used to find mixed equilibria in general games. Support enumeration guesses a possible support set for each player and solves the indifference equations; this is the method of Section 3.4.5 tried over all pairs of supports. The Lemke–Howson algorithm follows a path from a starting point to an equilibrium. Both methods often work well in practice, but in the worst case they take exponential time: the number of supports grows exponentially with the number of strategies.
In games with three or more players there is one more problem: the equilibrium probabilities may be irrational numbers (for example, numbers involving √2) and cannot be written exactly on a computer. In two-player games the indifference equations are linear; if the payoffs are rational, there is always at least one equilibrium with rational probabilities (writable as fractions); with three players, products of probabilities appear in the equations and the roots may turn out irrational. So in games with many players one looks for an ε-approximate equilibrium, that is, a profile in which no deviation gains more than ε.
The last row of the table is the difficulty of searching for a "particular" equilibrium instead of "any" equilibrium: finding the equilibrium with the highest social welfare, or deciding whether the game has only one equilibrium, is NP-hard. For further reading: for a fixed ε (for example 0.1) there is a quasi-polynomial-time algorithm for two-player games (Lipton, Markakis and Mehta, 2003); for games with many players, the problem remains PPAD-hard even for constant ε (Rubinstein, 2015).
3.6.7PPAD
When we speak of hard problems, NP-completeness usually comes to mind. NP-complete problems are questions of the form "does a solution exist?" (for example, "is there a path in this graph that visits every vertex exactly once?"). For the Nash equilibrium this question is trivial: Nash's theorem says an equilibrium always exists, so the answer is always "yes". NP-completeness is therefore not a suitable measure for problems like this, whose solution is guaranteed.
The class PPAD (Papadimitriou, 1994) is defined for exactly this situation. PPAD is the class of problems for which a solution is known to exist, but for which it may be necessary to follow a very long path step by step to find it. The name comes from this structure: Polynomial Parity Arguments on Directed graphs.
We can read the analogy in Figure 3.26 as follows. The start of a path is known. How to get from each vertex to the next is easy to compute. The path cannot be infinite, because the number of vertices is finite; so the path certainly has an end. But the path may be exponentially long, and walking to its end may take astronomical time. The Lemke–Howson algorithm follows exactly such a path. Finding a Nash equilibrium is complete for this class, that is, it is among the hardest problems in it. This is why it is believed that equilibria in general games may not be efficiently findable. The situation also raises a conceptual question: if even a computer cannot find an equilibrium quickly, do real players "find" it? The power of the equilibrium concept as a predictive tool is tested by this question.
3.6.8Approximate equilibria and computational tools
Let the payoffs be scaled to the interval [0, 1]. A profile is an ε-Nash equilibrium if and only if no player can increase their payoff by more than ε through a unilateral deviation.
The scaling matters: if payoffs are multiplied by 1000, every deviation gain is multiplied by 1000 too, and ε becomes meaningless for the same profile. On the interval [0, 1], ε = 0.01 means "no player can gain more than 1% of the largest possible payoff difference by deviating". Real-time systems (ad auctions, markets) often settle for this much.
Finding an exact equilibrium may be hard, but a profile in which "almost nobody wants to deviate" is often found quickly. Even simple profiles that mix a few strategies with equal probabilities give good approximations (Lipton, Markakis and Mehta, 2003). In two-player games a very simple profile is a ½-approximate equilibrium (Daskalakis, Mehta and Papadimitriou, 2006): pick a random row i of the row player; the column player plays the column j that is a best response to i; k is the row that is a best response to j; the row player mixes i and k half and half.
In practice, ready-made tools are used to compute equilibria. The Python library Nashpy offers support enumeration and the Lemke–Howson algorithm for two-player games. The inspection game is solved with Nashpy as follows:
import nashpy as nash
A = [[2, 2], [0, 4]] # worker: Work / Shirk
B = [[1, 2], [-1, -4]] # manager: Inspect / Don't
game = nash.Game(A, B)
for x, y in game.support_enumeration():
print(x, y) # [0.75 0.25] [0.5 0.5]A is the worker's and B the manager's payoff matrix; the rows are Work/Shirk and the columns Inspect/Don't inspect. nash.Game(A, B) builds the game. support_enumeration() tries all pairs of supports and returns each equilibrium it finds as an (x, y) pair. In the output, [0.75 0.25] is the worker's probabilities (Work, Shirk), that is, p* = 3/4; [0.5 0.5] is the manager's probabilities (Inspect, Don't inspect), that is, q* = 1/2. Since the game has no pure equilibrium, there is no other output. The result is the same as the hand computation. A tool called Gambit does the same job (support enumeration, Lemke–Howson, linear programming) through an interface, and for games with many players.
There are also generalizations and refinements of the Nash equilibrium. The correlated equilibrium (Section 3.5.7) is a generalization. In games where moves are made in sequence, a narrower concept, the subgame perfect equilibrium, is used: it is found by backward induction in the game tree and rules out non-credible threats. Every subgame perfect equilibrium is a Nash equilibrium; the converse is false.
3.7Discussion and checklist
The limits of the concept and the steps to follow in solving a game are gathered below.
Is an equilibrium fair? It need not be. An equilibrium is only a mutual best response. In the Battle of the Sexes the pure equilibria give unequal payoffs; in the Prisoner's Dilemma there is an outcome better for everyone. Fairness and equilibrium are different concepts. That an outcome is an equilibrium does not show that it is good or desirable; it shows only that it is self-sustaining.
Are people rational? Real decisions are affected by lack of information, time pressure, emotions, and social norms. Herbert Simon called this bounded rationality. That about half of the participants in one-shot Prisoner's Dilemma experiments cooperate is an indication of this. The model is still valuable, however: it offers a clear, precise point of comparison for studying strategic dependence. When real behavior departs from the model, the reason for the departure (trust, reputation, a sense of fairness) can be studied separately.
Ethical limits. Deception, manipulation, unfair advantage... Game theory does not answer the question "is every way of winning allowed?" The limits of strategic behavior are drawn by rules and institutions. Designing the rules so that the desired outcome is an equilibrium is the subject of mechanism design. The examples in this chapter carry the first traces of this idea: in the inspection game, raising the penalty changed the probability of inspection, and the traffic light created a correlated equilibrium without collisions.
Checklist. To solve a game step by step, follow the order below (Figure 3.27).
- Read first. Who is the row player and who is the column player? Whose number comes first in a cell? Are the numbers payoffs or costs (years, minutes)? If costs, convert to payoffs with a minus sign.
- Eliminate. Iteratively delete strictly dominated strategies. Try mixtures as well.
- Underline. In the remaining game, mark the best responses; cells with two marks are pure equilibria.
- Indifference. Look for a mixed equilibrium with the indifference equations; check that the probabilities lie between 0 and 1.
- Verify. Run the deviation test on every candidate.
- Count. In games without ties the number of equilibria is usually odd; if an even number was found, an equilibrium may have been missed.
- Then write. Write each equilibrium as a profile: for example (Middle, Left) = (3, 5). For a mixed equilibrium, give both players' probabilities and expected payoffs.
3.8Summary
- A Nash equilibrium is a strategy profile in which no player, with the others held fixed, can raise their payoff by deviating alone: ui(si*, s−i*) ≥ ui(si, s−i*). Equilibrium speaks of stability, not of efficiency or fairness (the Prisoner's Dilemma).
- A best response is the set of strategies that maximize the payoff against the others' choice. An equilibrium is a mutual best response. In matrix games, pure equilibria are found in O(mn) time by marking the row player's largest payoff in each column and the column player's largest payoff in each row; in a tie, all the largest are marked.
- With continuous strategies, the best response is found with the derivative. The Cournot (P = 12 − Y) equilibrium is 4 units and a profit of 16 each; the cartel (3 each, 18 each) is not an equilibrium. In Bertrand, the price falls to cost and profit is zero.
- A strictly dominated strategy is a best response to no belief. Iterated strict elimination deletes no equilibrium and is independent of order; deleting weakly dominated strategies can lose equilibria. Mixtures can dominate too.
- In a mixed equilibrium, every pure strategy in the support gives the same expected payoff (the indifference principle). Hence a player's equilibrium probability is computed from the opponent's payoffs. In the inspection game (p*, q*) = (3/4, 1/2), and when the penalty changes only q* changes.
- Nash's existence theorem: every finite game has at least one mixed equilibrium (Kakutani / Brouwer fixed point). In nondegenerate games the number of equilibria is odd (Wilson).
- With multiple equilibria, the theory may not select a single outcome. Pareto dominance, risk dominance, focal points, and learning may suggest different choices (in Stag Hunt, (S, S) is Pareto dominant and (H, H) is risk dominant). Dominant-strategy equilibria are robust to mistakes; coordination equilibria are not.
- In a correlated equilibrium, obeying a mediator's recommendation is in everyone's interest. Because the obedience constraints are linear, it is found by linear programming; in the traffic-light example the payoff is 0, versus −1/10 at the mixed Nash equilibrium.
- In zero-sum games, max-min = min-max = v (von Neumann). If there is no saddle point, mixed strategies are needed (in the penalty kick p* = 4/11, v ≈ 79.1%); the equilibrium is found by linear programming, and equilibria are interchangeable.
- Complexity: finding a mixed equilibrium in a general two-player game is PPAD-complete; in practice, support enumeration, Lemke–Howson, and ε-approximate equilibria are used.
| Concept | What it says | How to find it |
|---|---|---|
| Nash equilibrium | Nobody wants to deviate alone | Mutual best response |
| Elimination of dominated strategies | A rational player does not play a dominated strategy | Iteratively delete strictly dominated strategies |
| Mixed equilibrium | Strategies in the support pay equally | Indifference equations |
| Existence (Nash 1950) | A finite game always has a mixed equilibrium | Kakutani / Brouwer fixed point |
| Multiple equilibria | The theory may not select a single outcome | Pareto / risk dominance, focal point |
| Correlated equilibrium | Obeying the mediator's recommendation is in everyone's interest | Obedience constraints + linear programming |
| Minimax | In zero-sum games max-min = min-max = v | Saddle point or LP |
| Complexity | Exact equilibrium for two players, approximate equilibrium for many players, is PPAD-complete | Lemke–Howson, support enumeration |
3.9Key terms
- Nash equilibrium
- pure Nash equilibrium
- strategy profile
- strategy set
- payoff function
- normal form
- unilateral deviation
- Pareto optimal
- best response
- best-response correspondence
- Cournot duopoly
- cartel
- Bertrand paradox
- strict dominance
- weak dominance
- dominant strategy
- dominant-strategy equilibrium
- IESDS
- common knowledge
- mixed strategy
- support
- expected payoff
- indifference principle
- inspection game
- Nash's existence theorem
- fixed-point theorem
- oddness theorem
- degenerate game
- multiple equilibria
- equilibrium selection
- Pareto dominance
- risk dominance
- focal point
- correlated equilibrium
- zero-sum game
- maximin
- minimax
- saddle point
- value of the game
- minimax theorem
- interchangeability
- security game
- linear programming
- support enumeration
- Lemke–Howson algorithm
- PPAD-complete
- ε-approximate equilibrium
3.10Test Yourself
In the cells, (u1, u2): (Top, Left) = (3, 2), (Top, Right) = (1, 1), (Bottom, Left) = (0, 0), (Bottom, Right) = (2, 3). What are all the Nash equilibria of the game? What is the two players' expected payoff at the mixed equilibrium?
Answer
Row best responses: Left → Top (3 > 0), Right → Bottom (2 > 1). Column best responses: Top → Left (2 > 1), Bottom → Right (3 > 0). The pure equilibria are (Top, Left) and (Bottom, Right). Mixed equilibrium: the row player's indifference is 3q + 1(1 − q) = 0 · q + 2(1 − q), that is, 1 + 2q = 2 − 2q and q = P(Left) = 1/4. The column player's indifference is 2p + 0 = 1 · p + 3(1 − p), that is, p = P(Top) = 3/4. Expected payoffs: row 3 · ¼ + 1 · ¾ = 3/2, column 2 · ¾ = 3/2. There are three equilibria in all (consistent with the odd-number rule).
The rows are Top, Middle, Bottom; the columns are Left, Right. (Top, Left) = (2, 1), (Top, Right) = (1, 3), (Middle, Left) = (3, 0), (Middle, Right) = (2, 1), (Bottom, Left) = (1, 2), (Bottom, Right) = (0, 0). What remains when strictly dominated strategies are deleted iteratively?
Cevap
Middle beats Top in every column (3 > 2, 2 > 1): Top is deleted. Middle also beats Bottom (3 > 1, 2 > 0): Bottom is deleted. With only the Middle row left, the column player gets 0 in Left and 1 in Right: Left is deleted. The remaining (Middle, Right) = (2, 1) is the game's only Nash equilibrium. Note: at the start there is no domination among the columns (in the Top row Right is 3 > 1, but in the Bottom row Left is 2 > 0).
The row player's payoffs: Top (Left 5, Right 0), Middle (2, 2), Bottom (0, 5). Does a pure strategy dominate Middle? For which values of p does the strategy that mixes Top with probability p and Bottom with probability 1 − p strictly dominate Middle?
Cevap
No pure strategy dominates it: Middle is better than Bottom in Left (2 > 0) and better than Top in Right (2 > 0). The mixture gives 5p against Left and 5(1 − p) against Right. Strict domination requires 5p > 2 and 5(1 − p) > 2, that is, 2/5 < p < 3/5. For example, the ½–½ mixture gives 2.5 in every column.
In a Cournot duopoly the price is P = 18 − (y1 + y2) and the cost is 0. What are the quantities, price, and profits at the Nash equilibrium? If the firms form a cartel that splits production equally, what does each earn, and what does a firm that deviates from the cartel earn?
Cevap
Profit y1(18 − y1 − y2); derivative 18 − 2y1 − y2 = 0 ⇒ BR1(y2) = (18 − y2)/2. Symmetric equilibrium: 2y = 18 − y ⇒ y* = 6, price 6, profit 36 each. The cartel maximizes total Y(18 − Y) at Y = 9: 4.5 each, price 9, profit 40.5 each. While the rival produces 4.5, the best response is (18 − 4.5)/2 = 6.75, and the deviating firm earns 6.75 · 6.75 = 45.5625. The cartel is not an equilibrium.
In a zero-sum game the row player's payoff matrix is A = [[5, 1], [2, 4]]. What are the pure maximin and minimax? If there is no saddle point, what are the two players' minimax strategies and the value of the game?
Cevap
Row minima 1, 2 ⇒ maximin 2; column maxima 5, 4 ⇒ minimax 4. 2 < 4, so there is no saddle point. If the row player plays the first row with probability p, they get 5p + 2(1 − p) = 2 + 3p and p + 4(1 − p) = 4 − 3p against the columns; equality gives p = 1/3, v = 3. If the column player plays the first column with probability q, 5q + 1(1 − q) = 2q + 4(1 − q) ⇒ q = 1/2, which again gives 3.
A single guard protects one of two targets. Target H has value 5 and target L has value 3; an attacker who hits the unprotected target gains its value, and one who hits the protected target gets 0. With what probability should the guard protect H, and what does the attacker gain? What would happen if the guard always protected H?
Cevap
To leave the attacker indifferent: 5(1 − p) = 3p ⇒ p = 5/8. The attacker's payoff is 3 · 5/8 = 15/8 ≈ 1.9. If the guard always protected H, the attacker would hit L and get 3.
In a version of Stag Hunt, hunting stag together pays 5 each, hare pays 2 in every case, and going for the stag alone pays 0. What is the stag probability at the mixed equilibrium? Which equilibrium is Pareto dominant and which is risk dominant?
Cevap
If the partner chooses Stag with probability q, Stag gives 5q and Hare gives 2: q = 2/5. (S, S) is Pareto dominant (5 > 2). The product of deviation losses is (5 − 2)2 = 9 at (S, S) and (2 − 0)2 = 4 at (H, H); (S, S) is risk dominant too. In this version the two criteria select the same equilibrium; a partner who shows up with only 40% probability is enough to make stag worth choosing.
In the Chicken game at the intersection ((Swerve, Swerve) = (0, 0), (Swerve, Straight) = (−1, 1), (Straight, Swerve) = (1, −1), (Straight, Straight) = (−10, −10)), a light recommends (Swerve, Straight) or (Straight, Swerve) with probability one half each. Is this a correlated equilibrium? What would happen if the light recommended (Swerve, Swerve) or (Straight, Straight) with probability one half each?
Cevap
The first light is a correlated equilibrium. A driver who is recommended "Swerve" knows the opponent has certainly been told "Straight": obeying gives −1, deviating gives −10. A driver who is recommended "Straight" knows the opponent has certainly been told "Swerve": obeying gives 1, deviating gives 0. The expected payoff is 0. The second light is not a correlated equilibrium: a driver who is recommended "Straight" knows the opponent will also go straight; obeying gives −10, deviating to Swerve gives −1, and the driver deviates.
3.11Further reading
- M. J. Osborne, An Introduction to Game Theory (2004), Chapters 2–4: covers the Nash equilibrium, mixed strategies, and dominance with many worked examples and little mathematics.
- T. Roughgarden, Twenty Lectures on Algorithmic Game Theory (2016), Lectures 13, 18, and 20: presents the hierarchy of equilibrium concepts, the proof of the minimax theorem via learning, and PPAD from a computer-science viewpoint.
- A. R. Karlin and Y. Peres, Game Theory, Alive (2017): gives zero-sum games and the fixed-point proof of Nash's theorem in detail at the student level.
- C. Daskalakis, P. Goldberg, and C. Papadimitriou, "The complexity of computing a Nash equilibrium" (2009): the journal version of the paper that shows the PPAD-completeness of finding a Nash equilibrium; its introduction can be read without technical detail.
3.12References
- R. J. Aumann, “Subjectivity and correlation in randomized strategies”, Journal of Mathematical Economics 1(1), 67–96, 1974.
- X. Chen, X. Deng, “Settling the complexity of two-player Nash equilibrium”, IEEE FOCS, 2006.
- V. Conitzer, T. Sandholm, “New complexity results about Nash equilibria”, Games and Economic Behavior 63(2), 621–641, 2008.
- C. Daskalakis, P. Goldberg, C. Papadimitriou, “The complexity of computing a Nash equilibrium”, SIAM J. Computing 39(1), 2009 (conference version ACM STOC, 2006).
- C. Daskalakis, A. Mehta, C. Papadimitriou, “A note on approximate Nash equilibria”, WINE, LNCS 4286, 297–306, 2006.
- D. Easley, J. Kleinberg, Networks, Crowds, and Markets, Cambridge, 2010 (Chapter 6: Games).
- K. Etessami, M. Yannakakis, “On the complexity of Nash equilibria and other fixed points”, SIAM J. Computing 39(6), 2010 (conference version IEEE FOCS, 2007).
- I. Gilboa, E. Zemel, “Nash and correlated equilibria: Some complexity considerations”, Games and Economic Behavior 1(1), 80–93, 1989.
- J. C. Harsanyi, R. Selten, A General Theory of Equilibrium Selection in Games, MIT Press, 1988.
- A. R. Karlin, Y. Peres, Game Theory, Alive, AMS, 2017.
- R. J. Lipton, E. Markakis, A. Mehta, “Playing large games using simple strategies”, ACM EC, 2003.
- J. F. Nash, “Equilibrium points in n-person games”, PNAS 36(1), 1950.
- J. F. Nash, “Non-cooperative games”, Annals of Mathematics 54(2), 1951.
- N. Nisan, T. Roughgarden, É. Tardos, V. Vazirani (ed.), Algorithmic Game Theory, Cambridge, 2007 (Chapters 1–3).
- M. J. Osborne, An Introduction to Game Theory, Oxford University Press, 2004 (Chapters 2–4).
- I. Palacios-Huerta, “Professionals play minimax”, Review of Economic Studies 70(2), 395–415, 2003.
- C. H. Papadimitriou, “On the complexity of the parity argument and other inefficient proofs of existence”, Journal of Computer and System Sciences 48(3), 498–532, 1994.
- T. Roughgarden, Twenty Lectures on Algorithmic Game Theory, Cambridge, 2016 (Lectures 13, 18, and 20).
- A. Rubinstein, “Inapproximability of Nash equilibrium”, ACM STOC, 2015.
- D. Sally, “Conversation and cooperation in social dilemmas: a meta-analysis of experiments from 1958 to 1992”, Rationality and Society 7(1), 1995.
- T. C. Schelling, The Strategy of Conflict, Harvard University Press, 1960.
- M. Tambe, Security and Game Theory, Cambridge University Press, 2011.
- J. von Neumann, “Zur Theorie der Gesellschaftsspiele”, Mathematische Annalen 100, 1928.
- R. Wilson, “Computing equilibria of n-person games”, SIAM J. Applied Mathematics 21, 1971.
Related pages: Chapter 3 slides · Course pages: Roughgarden CS364A · Shah CSC304 · Tools: Gambit, Nashpy · © Sercan Külcü. All rights reserved.