Nash Equilibrium

Christopher Makler

Stanford University Department of Economics

Econ 51: Lecture 4

  • Part I: Pure strategies with discrete actions

  • Part II: Pure strategies with continuous actions

  • Part III: Mixed strategies

Today's Agenda

Best Response: From Last Time

\text{Let }\theta_{-i}\text{ be player }i\text{'s beliefs about the strategies}
\text{We say }s_{i}\text{ is a \textbf{best response} given }\theta_{-i}\text{ if}
u_i(s_i,\theta_{-i}) \ge u_i(s'_i,\theta_{-i})
\text{ for every available strategy }s'_i \in S_i

In plain English: given my beliefs about what the other player(s) are doing, a strategy is my "best response"
if there is no other strategy available to me
that would give me a higher payoff.

\text{ player }i\text{'s payoff from }s_i
\text{ player }i\text{'s payoff from }s'_i
\text{being played by all players other than player }i

Best Response under Strategic Certainty

\text{Let }s_{-i}\text{ be the strategies being played by all players other than player }i
\text{We say }s_{i}^*\text{ is a \textbf{best response} to }s_{-i}\text{ if}
u_i(s_i^*,s_{-i}) \ge u_i(s'_i,s_{-i})
\text{ for every available strategy }s'_i \in S_i

In plain English: given the strategies chosen by the other player(s),
a strategy is my "best response"
if there is no other strategy available to me
that would give me a higher payoff.

\text{ player }i\text{'s payoff from }s_i^*
\text{ player }i\text{'s payoff from }s'_i

Possible rationales for strategic certainty:

  • People play this game all the time, and reasonably expect
    the other player to play according to the equilibrium.
  • The players have agreed on a strategy before the game is played;
    as long as no one has an incentive to deviate, it's OK.
  • An outside mediator (society, the law) recommends a strategy profile

Stag Hunt Game

1

2

Stag

Hare

Stag

Hare

5

5

,

4

0

,

4

4

,

0

4

,

Equilibrium

Definition: Best Response (Nash) Equilibrium

\text{A strategy profile }s^* = s_1^*,s_2^*,...,s^*_n\text{ is a \textbf{Nash Equilibrium} if}
u_i(s^*) \ge u_i(s'_i,s^*_{-i})
\text{ for every available strategy }s'_i \in S_i \text{, for all players } i=1,2,...,n

In plain English: in a Nash Equilibrium, every player is playing a best response to the strategies played by the other players.

\text{ player }i\text{'s equilibrium payoff}
\text{ player }i\text{'s payoff from some deviation }s'_i

In other words: there is no profitable unilateral deviation 
given the other players' equilibrium strategies.

I. Discrete Pure Strategies

1

2

1

2

,

4

3

,

1

4

,

1

1

,

Top

Middle

Left

Center

Bottom

Right

3

0

,

2

1

,

3

2

,

8

0

,

8

0

,

Nash equilibrium occurs when every player is choosing strategy which is a
best response to the strategies chosen by the other player(s)

Coordination Game

1

2

Opera

Movie

Opera

Movie

2

1

,

0

0

,

1

2

,

0

0

,

pollev.com/chrismakler

Pareto Coordination

1

2

A

B

A

B

2

2

,

0

0

,

1

1

,

0

0

,

pollev.com/chrismakler

II. Continuous Strategies

When the benefits of a good accrue to everyone,
everyone has an incentive to shirk their contribution 

Free Rider Problem

Two people, 1 and 2, can contribute to a public good. Each has income \(m = 12\).

g_i = \text{Player i's contribution}, i \in \{1,2\}
G = g_1 + g_2 = \text{total contribution}
u_i(G,x_i) = Gx_i = \text{Player i's utility}
x_i = 12 - g_i = \text{Player i's private consumption}
u_1(g_1,g_2) = (g_1 + g_2)(12 - g_1)

Write payoffs in terms of strategies:

u_2(g_1,g_2) = (g_1 + g_2)(12 - g_2)
u_1(g_1,g_2) = (g_1 + g_2)(12 - g_1)

Write payoffs in terms of strategies:

u_2(g_1,g_2) = (g_1 + g_2)(12 - g_2)

1

2

0

1

0

1

0

0

,

11

12

,

22

22

,

12

11

,

We could start to write out a payoff matrix...

u_1(g_1,g_2) = (g_1 + g_2)(12 - g_1)

Write payoffs in terms of strategies:

u_2(g_1,g_2) = (g_1 + g_2)(12 - g_2)

We could start to write out a payoff matrix...

but the strategy space is continuous so we could never list out every possible (real number) contribution.

Instead, let's think about a best response function

What is player 1's best response to player 2 choosing to contribute some amount \(g_2\)?

u_1(g_1,g_2) = (g_1 + g_2)(12 - g_1)

Write payoffs in terms of strategies:

u_2(g_1,g_2) = (g_1 + g_2)(12 - g_2)

Solve for each player's best response function

What is player 1's best response to player 2 choosing to contribute some amount \(g_2\)?

u_1(g_1 | g_2) = 12g_1 + 12g_2 - g_1^2 - g_1g_2
u_2(g_2|g_1) = 12g_1 + 12g_2 - g_1g_2 -g_2^2
u_1^\prime(g_1 | g_2) = 12 - 2g_1 - g_2 = 0
12 - g_2 = 2g_1

To maximize give the other's strategy, take the derivative of your payoff function
with respect to your own strategy and set it equal to zero:

g_1^*(g_2) = 6 - {1 \over 2}g_2
u_2^\prime(g_2 | g_1) = 12 - g_1 - 2g_2 = 0
12 - g_1 = 2g_2
g_2^*(g_1) = 6 - {1 \over 2}g_1

BEST RESPONSE FUNCTIONS

g_1^*(g_2) = 6 - {1 \over 2}g_2
g_2^*(g_1) = 6 - {1 \over 2}g_1

BEST RESPONSE FUNCTIONS

In a Nash equilibrium, each player is choosing a strategy which is a best response to the other's strategy.

To solve, plug one's BR into the other:

g_1 = 6 - {1 \over 2}
(6 - {1 \over 2}g_1)
g_1 = 6 - 3 + {1 \over 4}g_1
{3 \over 4}g_1 = 3
g_1 = 4
g_2^*(4) = 6 - {1 \over 2}\times 4 = 4
g_1^*(g_2) = 6 - {1 \over 2}g_2
g_2^*(g_1) = 6 - {1 \over 2}g_1

BEST RESPONSE FUNCTIONS

In a Nash equilibrium, each player is choosing a strategy which is a best response to the other's strategy.

g_1
g_2
g_1^*(g_2) = 6 - {1 \over 2}g_2
g_2^*(g_1) = 6 - {1 \over 2}g_1

To solve, plug one's BR into the other:

g_1 = 6 - {1 \over 2}
(6 - {1 \over 2}g_1)
g_1 = 6 - 3 + {1 \over 4}g_1
{3 \over 4}g_1 = 3
g_1 = 4
g_2^*(4) = 6 - {1 \over 2}\times 4 = 4
u_1(g_1,g_2) = (g_1 + g_2)(12 - g_1)
u_2(g_1,g_2) = (g_1 + g_2)(12 - g_2)

Could they both do better?

 

What would a social planner do?

U(g) = 2(g+g)(12-g) = 2*2g*(12-g) = 48g - 4g^2
U'(g) = 48 - 8g
g^* = 8
\text{In Nash Equilibrium: }u(4,4) = (4 + 4)(12 - 4) = 8 \times 8 = 64
\text{Social Optimum: }u(6,6) = (6 + 6)(12 - 6) = 12 \times 6 = 72

III. Mixed Strategies

Matching Pennies I: Coordination Game

1

2

Heads

Tails

Heads

Tails

1

1

,

-1

-1

,

1

1

,

-1

-1

,

Each player chooses Heads or Tails.

If they choose the same thing,
they both "win" (get a payoff of 1).

If they choose differently,
they both "lose" (get a payoff of -1).

Circle best responses.
What are the Nash equilibria of this game?

Matching Pennies II: Zero-Sum Game

1

2

Heads

Tails

Heads

Tails

1

-1

,

-1

1

,

1

-1

,

-1

1

,

Each player chooses Heads or Tails.

If they choose the same thing,
player 1 "wins" (gets a payoff of 1)
and player 2 "loses" (gets a payoff of -1).

If they choose differently,
they player 1 "loses" (gets a payoff of -1)
and player 1 "wins" (gets a payoff of 1).

Circle best responses.
What are the Nash equilibria of this game?

Best Response

If two or more pure strategies are best responses given what the other player is doing, then any mixed strategy which puts probability on those strategies (and no others) is also a best response.

2

\({1 \over 6}\)

\({1 \over 3}\)

\({1 \over 2}\)

\(0\)

Player 2's strategy

\({1 \over 6} \times 6 + {1 \over 3} \times 3 + {1 \over 2} \times 2 + 0 \times 7\)

\(=3\)

\({1 \over 6} \times 12 + {1 \over 3} \times 6 + {1 \over 2} \times 0 + 0 \times 5\)

\(=4\)

\({1 \over 6} \times 6 + {1 \over 3} \times 0 + {1 \over 2} \times 6 + 0 \times 11\)

\(=4\)

Player 1's expected payoffs from each of their strategies

\(X\)

\(A\)

1

\(B\)

\(C\)

\(D\)

\(Y\)

\(Z\)

6

6

,

3

6

,

2

8

,

7

0

,

12

6

,

6

3

,

0

2

,

5

0

,

6

0

,

0

9

,

6

8

,

11

4

,

If player 2 is choosing this strategy, player 1's best response is to play either Y or Z.

Therefore, player 1 could also choose to play any mixed strategy \((0, p, 1-p)\).

When is a mixed strategy a best response?

1

2

Heads

Tails

Heads

Tails

1

-1

,

-1

1

,

1

-1

,

-1

1

,

Let's return to our zero-sum game.

\((p)\)

\((1-p)\)

What is player 1's expected payoff from Heads?

Suppose player 2 is playing a mixed strategy: Heads with probability \(p\),
and tails with probability \(1-p\).

What is player 1's expected payoff from Tails?

1 \times p + -1 \times (1-p)
= 2p - 1
-1 \times p + 1 \times (1-p)
= 1 - 2p

For what value of \(p\) would player 1 be willing to mix?

2p - 1 = 1 - 2p
\Rightarrow p = {1 \over 2}

When is a mixed strategy a best response?

1

2

Heads

Tails

Heads

Tails

1

-1

,

-1

1

,

1

-1

,

-1

1

,

\((p)\)

\((1-p)\)

For what value of \(p\) would player 1 be willing to mix?

p = {1 \over 2}

Now suppose player 1 does mix, and plays Heads with probability \(q\) and Tails with probability \(1 - q\).

\((q)\)

\((1-q)\)

For what value of \(q\) would player 2 be willing to mix?

\text{By the same logic, }q = {1 \over 2}

Equilibrium in Mixed Strategies

A mixed strategy profile is a Nash equilibrium if,
given all players' strategies, each player is mixing among strategies which are their best responses
(i.e. between which they are indifferent)

Important: nobody is trying to make the other player(s) indifferent; it's just that in equilibrium they are indifferent.

Econ 51 | 10 | Nash Equilibrium

By Chris Makler

Econ 51 | 10 | Nash Equilibrium

Nash equilibrium in pure and mixed strategies

  • 258