Skip to article frontmatterSkip to article content

Nash Equilibrium

Motivating Example

In the Coordination Game, in how many
situations do neither player have an incentive to independently change
their strategy?

Neither player having a reason to change their strategy implies that both
strategies are best responses to each other.

Recall that for the Coordination game is defined by:

Mr=(3102)Mc=(2103)M_r = \begin{pmatrix} 3 & 1 \\ 0 & 2 \end{pmatrix} \qquad M_c = \begin{pmatrix} 2 & 1 \\ 0 & 3 \end{pmatrix}

If we consider strategies that only play a single action, there are two options for each strategy:

σ1{(1,0),(0,1)}\sigma_1 \in \{(1, 0), (0, 1)\}

and:

σ2{(1,0),(0,1)}\sigma_2 \in \{(1, 0), (0, 1)\}

We will inspect all four combinations:

Is there another pair of strategies that are best responses to each other and will such a pair always exist for any game?

Theory

A pair of strategies that are best responses to each other is a Nash equilibrium.

Definition: Nash Equilibria


In an NN-player normal form game, a Nash equilibrium is a strategy profile
s~=(s~1,s~2,,s~N)\tilde{s} = (\tilde{s}_1, \tilde{s}_2, \dots, \tilde{s}_N) such that:

ui(s~)=maxsˉiΔ(Ai)ui(sˉi,s~i)for all iu_i(\tilde{s}) = \max_{\bar{s}_i \in \Delta(\mathcal{A}_i)} u_i(\bar{s}_i, \tilde{s}_{-i}) \quad \text{for all } i

The following algorithm gives an approach to use the best response condition to systematically find all Nash equilibrium.

Definition: Support Enumeration Algorithm

The algorithm proceeds as follows:

For a two-player game
(Mr,Mc)(Rm×n)2(M_r, M_c) \in \left(\mathbb{R}^{m \times n}\right)^2, the following algorithm
returns all pairs of best responses:

  1. For all pairs of supports (subsets of the action space) (I,J)(I, J):

  2. Solve the following equations (to ensure best responses):

    iIσriMcij=vfor all jJ\sum_{i \in I} {\sigma_{r}}_i {M_{c}}_{ij} = v \quad \text{for all } j \in J
    jJMrijσcj=ufor all iI\sum_{j \in J} {M_r}_{ij} {\sigma_{c}}_j = u \quad \text{for all } i \in I
  3. Solve the normalisation and non-negativity constraints:

    • i=1mσri=1\sum_{i=1}^m {\sigma_{r}}_i = 1 and σ1i0{\sigma_1}_i \geq 0 for all ii
    • j=1nσcj=1\sum_{j=1}^n {\sigma_{c}}_j = 1 and σ2j0{\sigma_2}_j \geq 0 for all jj
  4. Check the best response condition.

Repeat steps 2–4 for all potential pairs of actions.

Example: Support enumeration algorithm for the coordination game

Let us apply the support enumeration algorithm to the coordination game.

The following supports (subsets of the action space) need to be considered:

I{{r1},{r2},{r1,r2}}I \in \{\{r_1\}, \{r_2\}, \{r_1, r_2\}\}

and

J{{c1},{c2},{c1,c2}}J \in \{\{c_1\}, \{c_2\}, \{c_1, c_2\}\}

For the cases where I=J=1|I|=|J|=1 steps 2, 3 and 4 of the support enumeration algorithm correspond to finding best responses in the action space. This can be done by highlighting best responses:

Mr=(3102)Mc=(2103)M_r = \begin{pmatrix} \underline{3} & 1 \\ 0 & \underline{2} \end{pmatrix} \qquad M_c = \begin{pmatrix} \underline{2} & 1 \\ 0 & \underline{3} \end{pmatrix}

The support enumeration algorithm for I=J=1|I|=|J|=1 gives the two following Nash equilibria:

((1,0),(1,0))((0,1),(0,1))((1, 0), (1, 0)) \qquad ((0, 1), (0, 1))

The final pair of actions to consider is when I=(r1,r2)I=(r_1, r_2) and J=(c1,c2J=(c_1, c_2. In this case let:

σ1=(x,1x)σ2=(y,1y)\sigma_1=(x, 1 - x)\qquad \sigma_2=(y,1-y)

for 0<x<10 < x < 1 and 0<y<10 < y < 1.

Step 2 corresponds to setting:

iIσriMci1=2x+0(1x)=viIσriMci2=1x+3(1x)=v\begin{align*} \sum_{i \in I} {\sigma_{r}}_i {M_{c}}_{i1} = 2 x + 0 (1-x) &= v\\ \sum_{i \in I} {\sigma_{r}}_i {M_{c}}_{i2} = 1 x + 3 (1 -x) &= v \end{align*}

and

jJMr1jσcj=3y+1(1y)=ujJMr2jσcj=0y+2(1y)=u\begin{align*} \sum_{j \in J} {M_r}_{1j} {\sigma_{c}}_j = 3y + 1(1-y) &= u \\ \sum_{j \in J} {M_r}_{2j} {\sigma_{c}}_j = 0y + 2(1-y) &= u \\ \end{align*}

The particular values of uu or vv are not required so we can equate these pairs of expressions:

2x=x+33x    x=343y+1y=22y    y=14\begin{align*} 2x = x + 3-3x &\implies x =\frac{3}{4}\\ 3y + 1-y = 2 - 2y &\implies y =\frac{1}{4}\\ \end{align*}

Giving: σ1=(3/4,1/4)\sigma_1 = (3/4, 1/4) and σ2=(1/4,3/4)\sigma_2=(1/4, 3/4).

Step 3 already holds as we enforced σ1=(x,1x)\sigma_1 = (x, 1 - x) and σ2=(y,1y)\sigma_2 = (y, 1 - y) at the start of our calculations. This is not necessarily the case for larger games.

The final step, step 4, requires us to check the best response condition. This is to check that there exists no better choice of action outside of the chosen set of II and JJ. This is more relevant for games with larger action spaces but let us nonetheless carry out the calculations:

Mrσ2T=(3/23/2)M_r \sigma_2^\mathsf{T}= \begin{pmatrix}3/2 \\ 3/2\end{pmatrix}

and

σ1Mc=(3/23/2)\sigma_1 M_c = \begin{pmatrix}3/2 & 3/2\end{pmatrix}

as required by the best response condition. The support enumeration algorithm has given 3 Nash equilibria:

{((1,0),(1,0)),((0,1),(0,1)),((34,14),(14,34)),}\left\{ ((1, 0), (1, 0)), ((0, 1), (0, 1)), ((\frac{3}{4}, \frac{1}{4}), (\frac{1}{4}, \frac{3}{4})), \right\}

The support enumeration algorithm is one of many algorithms that can be used to compute Nash equilibrium. Like most of the algorithms it works well for “most” games. When games are “degenerate” it may need more calculations and fail to give all equilibria.

Definition: Degenerate Games


A two player game is called non degenerate if no strategy of support size kk has more than kk best response actions.


Example: Support Enumeration for a degenerate game

Let us use support enumeration for the following game.

Mr=(2505)Mc=(2101)M_r = \begin{pmatrix} 2 & 5 \\ 0 & 5\\ \end{pmatrix} \qquad M_c = \begin{pmatrix} 2 & 1 \\ 0 & 1\\ \end{pmatrix}

First, we note that this game is degenerate, there are two best responses in action space to the first column:

Mr=(2505)Mc=(2101)M_r = \begin{pmatrix} \underline{2} & \underline{5} \\ 0 & \underline{5}\\ \end{pmatrix} \qquad M_c = \begin{pmatrix} \underline{2} & 1 \\ 0 & \underline{1}\\ \end{pmatrix}

Evaluating best responses in action space gives Nash equilibria:

((1,0),(1,0))((0,1),(0,1))((1, 0), (1, 0)) \qquad ((0, 1), (0, 1))

We need to consider new pairs of supports:

Exercises

Exercise: Support Enumeration

Use support enumeration to find Nash equilibria for the following games:

A=(332213)B=(213232)A = \begin{pmatrix} 3 & 3 & 2 \\ 2 & 1 & 3 \end{pmatrix} \qquad B = \begin{pmatrix} 2 & 1 & 3 \\ 2 & 3 & 2 \end{pmatrix}
A=(3127)B=(3116)A = \begin{pmatrix} 3 & -1 \\ 2 & 7 \end{pmatrix} \qquad B = \begin{pmatrix} -3 & 1 \\ 1 & -6 \end{pmatrix}

Exercise: Penalty kick strategies and Nash equilibrium

A soccer player (Player 1) is taking a penalty kick and can shoot either left or
right: S1={SL,SR}S_1 = \{\text{SL}, \text{SR}\}. The goalie (Player 2) can dive left or
right: S2={DL,DR}S_2 = \{\text{DL}, \text{DR}\}. The probabilities of scoring a goal
(depending on the chosen strategies) are shown in the matrix below:

(0.80.150.20.95)\begin{pmatrix} 0.8 & 0.15 \\ 0.2 & 0.95 \end{pmatrix}

Assume the utility to Player 1 is the probability of scoring, and the utility
to Player 2 is the probability of preventing a goal. What is the Nash
equilibrium of this game?

Now suppose Player 1 has a third strategy: shooting in the middle. The new
action set becomes S1={SL,SM,SR}S_1 = \{\text{SL}, \text{SM}, \text{SR}\}. The updated
probability matrix is:

(0.80.150.50.50.20.95)\begin{pmatrix} 0.8 & 0.15 \\ 0.5 & 0.5 \\ 0.2 & 0.95 \end{pmatrix}

Determine the new Nash equilibrium for the extended game.

Programming

The Nashpy library has an implementation of the support enumeration algorithm. First let us create the payoff matrices and the game:

import numpy as np
import nashpy as nash

A = np.array(
    (
        (3, 1),
        (0, 2),
    )
)
B = np.array(
    (
        (2, 1),
        (0, 3),
    )
)

coordination_game = nash.Game(A, B)
coordination_game

Now to use the support enumeration algorithm:

list(coordination_game.support_enumeration())

Notable Research

Support enumeration is as close to a “from first principles” algorithm for computing Nash equilibria. Thus there is no specific paper to point to as per its formulation. Or indeed there is no specific set of papers that use it for their findings although a lot of papers that consider small games are in essence using support enumeration.

For example in Chiappori et al., 2002 theoretical results are given regarding penalty kicks that rely on the indifference ensured by the best response condition which is in turn essentially an application of the support enumeration algorithm.

A similar paper applied to another animal conservation is Lee & Roberts, 2016 in which the authors build a theoretical model of the effectiveness of Rhino horn devaluation. Once again the calculation presented are essentially an application of the support enumeration algorithm.

In Knight et al., 2017 whilst a different algorithm is used to identify Nash equilibrium for strategic hospital interactions it is somewhat similar to the support enumeration algorithm except that it takes advantage of the specific structure of the game considered.

Conclusion

This chapter introduced the concept of Nash equilibrium and demonstrated a
systematic method for identifying all equilibria in a two-player game using the
support enumeration algorithm. This method is rooted directly in the best
response condition and provides a computational approach that works well for
many games, particularly when the number of actions is small.

It is important to recognise that the support enumeration algorithm is
conceptually simple but can become computationally expensive as the action
spaces grow. Nevertheless, it serves as a useful tool both in theory and in
practice, particularly for small-scale empirical models.

Table 1 summarises the core concepts introduced in this chapter.

Table 1:The main concepts of Nash equilibrium

ConceptDescription
Nash equilibriumA strategy profile where each player’s strategy is a best response to the others’
Support of a strategyThe set of actions played with positive probability
Support enumeration algorithmEnumerates possible supports and checks conditions for equilibrium
Degenerate gameA game in which some strategy of support size kk has more than kk best responses

References
  1. Chiappori, P.-A., Levitt, S., & Groseclose, T. (2002). Testing mixed-strategy equilibria when players are heterogeneous: The case of penalty kicks in soccer. American Economic Review, 92(4), 1138–1151.
  2. Lee, T. E., & Roberts, D. L. (2016). Devaluing rhino horns as a theoretical game. Ecological Modelling, 337, 73–78.
  3. Knight, V., Komenda, I., & Griffiths, J. (2017). Measuring the price of anarchy in critical care unit interactions. Journal of the Operational Research Society, 68(6), 630–642.