Skip to content
Tutorials Center
My learning

Topics

Lesson 16 of 37 ยท Mixed Strategies

The Indifference Principle

Find mixed-strategy Nash equilibria of 2x2 games by making the opponent indifferent. Derive the formulas with sympy, check them numerically, and apply them to chicken, battle of the sexes and penalties.

How do you find the right probabilities for a mixed equilibrium? The previous lesson ended with a clue: in a mixed equilibrium, every action in a player's support must give the same expected payoff, otherwise the player would put all their weight on the better action. This sounds like a property of your strategy, but it gives a recipe for finding your opponent's. To have the other player willing to mix, you must choose your own probabilities so that they are indifferent between their actions. This is the indifference principle, and it is the fastest way to solve 2x2 games by hand.

You will derive the formulas, implement them, verify them with the best-response test from Best Responses, and meet a famous consequence: in some games, changing your own payoffs does not change your own equilibrium probabilities.

The recipe for a 2x2 game

Take a game with Ann choosing Top or Bottom and Bob choosing Left or Right. Let A and B be their payoff matrices. Suppose Ann plays Top with probability p and Bob plays Left with probability q.

Step 1: Make Bob indifferent. Bob's expected payoff from Left is p * B[0,0] + (1 - p) * B[1,0], from Right it is p * B[0,1] + (1 - p) * B[1,1]. Setting them equal and solving gives Ann's p:

p = (B[1,1] - B[1,0]) / (B[0,0] - B[1,0] - B[0,1] + B[1,1]).

Step 2: Make Ann indifferent. Ann's expected payoff from Top is q * A[0,0] + (1 - q) * A[0,1], from Bottom q * A[1,0] + (1 - q) * A[1,1]. Setting them equal gives Bob's q:

q = (A[1,1] - A[0,1]) / (A[0,0] - A[0,1] - A[1,0] + A[1,1]).

Step 3: Check that the probabilities lie strictly between 0 and 1. If they do, (p, 1 - p) and (q, 1 - q) form a fully mixed equilibrium. If p or q falls outside (0, 1), no fully mixed equilibrium exists.

flowchart LR
    B["Bob's payoffs B"] --> P["Choose Ann's p so that<br/>Bob is indifferent"]
    A["Ann's payoffs A"] --> Q["Choose Bob's q so that<br/>Ann is indifferent"]
    P --> E["Mixed equilibrium (p, q)"]
    Q --> E

Each player's probabilities come from the other player's payoffs.

Deriving the formula with sympy

Let sympy do the algebra so you can see where the formula comes from.

Python Derive the indifference formulas

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The solver

Now a function that returns the mixed equilibrium of any 2x2 game (or tells you none exists), using the two formulas. We also compute the equilibrium payoffs, using x @ A @ y.

Python Mixed equilibrium of a 2x2 game

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Read the results:

  • Matching pennies: 50-50 for both and payoff 0.
  • Battle of the sexes: Ann plays Opera with probability 3/5 and Bob plays Opera with probability 2/5. Each player's payoff is 1.2, which is lower than the 2 or 3 they would get from coordinating on their favorite outcome (each equilibrium in pure strategies). Mixing makes miscoordination happen sometimes.
  • Chicken: each player swerves with probability 1/2. Both players' expected payoff is 2.5, which is below the 3 of mutual swerving and below the 4 of the driver who wins.
  • Prisoner's dilemma: none, because Defect is dominant, so the formulas fall outside (0, 1).

Check the answer: no profitable deviation

A solution is only believable if it passes the best-response test. For a mixed profile, each of a player's pure actions must give at most the equilibrium payoff, and every action used must give exactly that payoff.

Python Verify an equilibrium by checking pure deviations

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

At the correct mixture, both of Ann's actions give her exactly 2.5, so she has no reason to move away from mixing. With the wrong x, Bob's two actions differ and Bob would deviate.

Surprising consequences

1. Your own payoffs do not set your own mix. Ann's probability p depends only on Bob's payoffs. Suppose a striker (row player) gets a bigger reward for scoring with a left shot against a right-diving keeper, perhaps because the shot is more spectacular, while the keeper's payoffs stay as they were. You might expect the striker to shoot left more often. In equilibrium his own probability of shooting left stays the same, and it is the keeper who changes his diving mix. The striker must keep the keeper indifferent, and the keeper's payoffs did not change.

Python Raising your own payoff changes the opponent's mix

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The striker's probability p is 0.5 in every row, while the keeper's diving probability q moves. If you ever need to guess how someone will react to a change in their own incentives, remember that it is the opponent who adjusts.

2. Mixed equilibria can be bad. In battle of the sexes, the mixed equilibrium gives both players less than either pure equilibrium, because mixing risks miscoordination. It is "stable" but fragile and inefficient.

3. Three equilibria. Coordination and anti-coordination games typically have two pure equilibria and one mixed equilibrium. The mixed one is unstable under learning, like a pencil balanced on its tip, which is why it is rarely observed in practice.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. To find Ann's equilibrium mixing probability in a 2x2 game, which payoffs do you use?

    Ann must choose p so that Bob is indifferent between his actions; that is what makes Bob willing to mix. So p depends on Bob's payoffs.
  2. 2. In a mixed equilibrium, a player's pure actions in their support give...

    If one action paid more, the player would play it with probability 1 and the mixture would not be a best response.
  3. 3. For the prisoner's dilemma, the indifference formulas return probabilities outside (0, 1). What does this tell you?

    With a dominant strategy, the pure equilibrium (Defect, Defect) is the only one; no mix can make the opponent indifferent.
  4. 4. In the 2x2 battle of the sexes mixed equilibrium, how do the equilibrium payoffs compare with the pure equilibria?

    Each player earns 1.2 in the mixed equilibrium, compared with at least 2 in each pure equilibrium.

Summary

  • In a mixed equilibrium every action in a player's support must give the same expected payoff, so each player's probabilities make the other player indifferent.
  • For a 2x2 game, p = (B11 - B10) / (B00 - B10 - B01 + B11) and q = (A11 - A01) / (A00 - A01 - A10 + A11); a fully mixed equilibrium needs both in (0, 1).
  • Verify any candidate with the pure-deviation test.
  • Your own mix depends on the opponent's payoffs, not yours.
  • Mixed equilibria in coordination games exist but are inefficient and unstable.

Next: Mixed Equilibria in Larger Games: Support Enumeration