Nash Equilibrium Calculator: Mixed Strategies in 2x2 Games

simulator advanced ~8 min
Loading simulation...
Nash Equilibrium: P1 cooperates with probability ≈ 0.333

With default Prisoner's Dilemma payoffs (a1=3, b1=0, c1=5, d1=1), the mixed-strategy Nash Equilibrium has each player cooperating with probability 1/3. The expected payoff is approximately 1.67 — well below the mutual cooperation payoff of 3, illustrating the inefficiency of Nash Equilibrium in social dilemmas.

Formula

P1 mixes: q* = (d1 - b1) / (a1 - c1 + d1 - b1)
P2 mixes: p* = (d2 - b2) / (a2 - c2 + d2 - b2)
Expected payoff: E[u1] = p*·(q*·a1 + (1-q*)·c1) + (1-p*)·(q*·b1 + (1-q*)·d1)

What Is Nash Equilibrium?

A Nash Equilibrium (NE) is the most fundamental solution concept in game theory. Named after mathematician John Forbes Nash Jr., who proved its existence in 1950, a Nash Equilibrium is a profile of strategies — one for each player — such that no player can improve their payoff by unilaterally deviating. In other words, each player's strategy is a best response to the strategies of all other players.

Mixed Strategies

Not every game has a Nash Equilibrium in pure strategies (where each player deterministically chooses one action). However, Nash's existence theorem guarantees that every finite game has at least one equilibrium in mixed strategies — probability distributions over pure strategies. A player mixes so that their opponent is exactly indifferent between their own options, removing any incentive to deviate.

The 2x2 Bimatrix Game

This simulator models a symmetric 2x2 game where Player 1 chooses between rows (Cooperate or Defect) and Player 2 chooses between columns. The four parameters a1, b1, c1, d1 define Player 1's payoffs in each cell. By adjusting these values, you can recreate classic games: the Prisoner's Dilemma (c1 > a1 > d1 > b1), the Stag Hunt (a1 > c1 > d1 > b1), the Chicken Game (c1 > a1 > b1 > d1), or pure coordination games.

Best Response Functions

The lower diagram shows the best response correspondences plotted on the unit square, where the x-axis represents Player 1's probability of cooperating (q) and the y-axis represents Player 2's probability (p). Each player's best response is a step function: they cooperate with probability 1 when the opponent's mixing probability exceeds a threshold, and 0 below it. The Nash Equilibrium lies at the intersection point of these two best-response functions — the white pulsing dot.

Interpreting the Results

Move the payoff sliders to see how the equilibrium shifts. When the temptation to defect is high (c1 >> a1), cooperation probability drops. When mutual cooperation is very rewarding (a1 >> d1), the equilibrium favors more cooperation. Notice that the expected payoff at a mixed NE is typically lower than the mutual cooperation payoff — this is the price of strategic uncertainty. The inefficiency of Nash Equilibrium in social dilemmas is one of the central insights of modern game theory.

FAQ

What is a Nash Equilibrium?

A Nash Equilibrium is a set of strategies — one for each player — where no player can improve their payoff by unilaterally changing their strategy. It was formalized by John Nash in 1950 and earned him the Nobel Prize in Economics in 1994.

What is a mixed-strategy Nash Equilibrium?

A mixed-strategy Nash Equilibrium is one where at least one player randomizes between pure strategies with specific probabilities. In a 2x2 game, a player mixes so that the opponent is indifferent between their own strategies, meaning each strategy yields the same expected payoff.

How do you find the mixed Nash Equilibrium in a 2x2 game?

To find P1's mixing probability q, set P2's expected payoffs equal for both strategies and solve for q. Symmetrically, to find P2's mixing probability p, set P1's expected payoffs equal. The equilibrium is the intersection of the two best-response correspondences.

What is a best-response function?

A best-response function maps each possible strategy of the opponent to the strategy (or mix of strategies) that maximizes a player's payoff. In a 2x2 game, best responses are step functions on the unit square, and their intersection gives the Nash Equilibrium.

Sources

Embed

<iframe src="https://homo-deus.com/lab/game-theory/nash-equilibrium/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub