Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 37 ยท Mixed Strategies

Mixed Strategies

Learn why players randomize, what a mixed strategy is, how to compute expected payoffs, and how unpredictability protects you in matching pennies, penalty kicks and rock-paper-scissors.

Some games have no stable pure strategy. In matching pennies, whatever you do, the opponent wants to do the opposite of what makes you happy; in rock-paper-scissors, any move you always make can be beaten by a smart opponent. The solution is unpredictable behavior: randomize. A mixed strategy is a way of choosing among your pure strategies at random with fixed probabilities.

This chapter is where game theory becomes a little surprising. You will see that randomizing can be perfectly rational, that the right probabilities are determined by the opponent's payoffs (not your own), and that Nash proved that every finite game has an equilibrium once mixing is allowed. This first lesson introduces the object itself and its basic calculations. The next lessons show how to find equilibrium mixtures.

Definition

A pure strategy is a single action. A mixed strategy for a player with actions 1, ..., m is a probability vector x = (x_1, ..., x_m) with x_i >= 0 and x_1 + ... + x_m = 1. Playing it means: before the game, roll a die weighted by x, and play the action that comes up. A pure strategy is the special case where one probability is 1.

The set of all mixed strategies for a player with m actions is called the simplex. With two actions it is a line segment (one number p between 0 and 1); with three it is a triangle; and so on. The support of a mixed strategy is the set of actions played with positive probability.

flowchart LR
    A["Pure strategy<br/>x = [1, 0, 0]"] --> M["Mixed strategies<br/>x = [0.5, 0.3, 0.2]<br/>any point of the simplex"]
    B["Pure strategy<br/>x = [0, 1, 0]"] --> M
    C["Pure strategy<br/>x = [0, 0, 1]"] --> M

Pure strategies are the corners; mixed strategies fill in everything between.

Two important facts:

  1. When both players mix, they randomize independently: the chance of the cell (i, j) is x_i * y_j.
  2. The payoff of a mixed profile is the expected payoff x @ A @ y (see Payoff Matrices in NumPy).

Why randomize?

Randomizing is a way of being unpredictable. In conflict games, being predictable means being exploited.

  • A goalkeeper who always dives left will have penalties placed to the right.
  • A tennis server who always serves to the forehand will be answered by a prepared forehand return.
  • A tax authority that audits at fixed intervals teaches evaders when to cheat. A random audit probability keeps them honest.

Professionals are known to mix: studies of soccer penalty kicks and tennis serves find that observed frequencies are surprisingly close to what the theory predicts. Mixed strategies are not just a mathematical trick.

A first look in code

We represent a mixed strategy as a NumPy vector and sample actions with rng.choice. Because the strategy is a probability, the long-run average payoff of the sampled play should match x @ A @ y. This is the law of large numbers at work.

Python Sampling a mixed strategy

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.

With a fair-coin opponent, any strategy of yours has expected payoff 0, so the averages drift to 0. The first rows are noisy: with few plays, luck dominates. Note this randomness is in the strategy, not in the game: the payoff matrix itself is fixed.

Mixing in rock-paper-scissors

In rock-paper-scissors, the uniform mix (1/3, 1/3, 1/3) is the natural candidate for equilibrium. Against it, every pure move earns an expected payoff of 0. That is why nobody can exploit it. Any other mix, such as favoring Rock, can be exploited by a player who counters it.

Python Why the uniform mix is unexploitable

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 uniform mix guarantees exactly 0; any deviation guarantees less than 0. This "guaranteed payoff against the best counter" is the security level from Zero-Sum and Constant-Sum Games, now computed for mixed strategies.

Mixed strategy Nash equilibrium

A mixed strategy Nash equilibrium is a profile of mixed strategies (x*, y*) where each player's strategy is a best response to the other's. Since a mixed strategy is a probability-weighted average of pure strategies, one result is crucial:

A mixed strategy is a best response only if every pure strategy in its support is a best response. In other words, each of those pure strategies gives the same expected payoff, and that payoff is the maximum.

The reason is simple: an average can only equal the maximum if every ingredient equals the maximum. This fact is the engine of the next lesson, the indifference principle, and has a surprising consequence: in a mixed equilibrium, each player is indifferent among the actions they mix over.

Python Indifference at the equilibrium of matching pennies

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.

If the row player tilts toward Heads, the column player gains by always picking Tails. So equilibrium requires exactly 50/50: the right probabilities are the ones that make the opponent indifferent.

Interpreting mixed strategies

Do real people flip dice? Rarely. There are several interpretations:

  • Literal randomization, as in poker bluffing or security patrols.
  • Population frequencies: in a large population, 30 percent play A and 70 percent play B. No one randomizes, but the average behavior looks mixed. Evolutionary game theory builds on this.
  • Beliefs: the mixture describes what others believe about me, not what I actually do. Each player's action is determined by hidden factors the opponent cannot see.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A mixed strategy for a player with three actions is...

    A mixed strategy assigns a probability to each pure action; the probabilities are non-negative and add to 1.
  2. 2. If both players mix independently with x and y, what is the probability of cell (i, j)?

    Independent choices multiply: P(row i and column j) = x_i * y_j.
  3. 3. Which pure strategies can appear in the support of a best-response mixed strategy?

    An average equals the maximum only if every component equals the maximum, so each action in the support must be a best response.
  4. 4. Why is the uniform mix (1/3, 1/3, 1/3) unexploitable in rock-paper-scissors?

    Each pure move wins, loses and ties with equal probability, so no counter-strategy earns more than 0.

Summary

  • A mixed strategy is a probability distribution over pure strategies; pure strategies are its corners.
  • Independent mixing gives cell probabilities x_i * y_j and expected payoff x @ A @ y.
  • Randomizing protects against exploitation in conflict games.
  • In a mixed equilibrium every pure strategy in a player's support is a best response, so the player is indifferent among them.
  • Mixed strategies can be read as literal randomization, population frequencies or beliefs.

Next: The Indifference Principle