Skip to content
p.mba

Type to search tools, guides, glossary terms, frameworks, formula sheets and pages.

Menu

Game theory solver

Solve two-player games up to 4×4: dominance elimination, pure and mixed Nash equilibria, zero-sum values and classic presets, with every step shown.

When you’ll use this
  • Managerial economics, weeks 5–7: checking Nash equilibrium and mixed-strategy problem sets
  • Competitive strategy, pricing and entry weeks: testing whether a price war or capacity standoff has a stable outcome
  • Negotiation and game theory electives: explaining prisoner’s dilemma, chicken and stag hunt structures before a class exercise
  • Exam review: verifying iterated elimination steps and indifference calculations by hand

Game theory solver tool

Loading your saved inputs…

Back up all tools

Game
Two campus coffee carts pick a price tier. Discount is dominated, and the rest has only a mixed equilibrium.

10 of 40 characters

10 of 40 characters

Payoffs
Both players maximize. Enter the row player’s payoff first in each cell. Payoffs are utilities, so only their order and spacing matter.
Each cell: North Cart’s payoff, then South Cart’s payoff
North Cart (rows) / South Cart (columns)

Nash equilibria found

1

0 pure, 1 mixed

North Cart: dominant strategy

None

South Cart: dominant strategy

None

Game type

General-sum

Best responses underlined; cells where both payoffs are underlined are pure Nash equilibria
North Cart / South CartPremiumStandardDiscountremoved (strictly dominated)
Premium(4 (best response for North Cart), 2)(1, 3 (best response for South Cart))(2 (best response for North Cart), 0)
Standard(3, 4 (best response for South Cart))(3 (best response for North Cart), 1)(1, 0)
Discountremoved (strictly dominated)(2, 1)(0, 1)(0, 5 (best response for South Cart))
All equilibria found (support enumeration)
#TypeNorth Cart playsSouth Cart playsNorth Cart expected payoffSouth Cart expected payoff
1MixedPremium 3/4 (75.0%), Standard 1/4 (25.0%)Premium 2/3 (66.7%), Standard 1/3 (33.3%)35/2

In a mixed equilibrium each player randomizes so that the other is indifferent between the strategies they mix over; no player can gain by deviating alone.

Iterated elimination of strictly dominated strategies

  1. Remove North Cart’s Discount: strictly dominated by Premium.
  2. Remove South Cart’s Discount: strictly dominated by Premium.

Survivors: North Cart keeps Premium, Standard; South Cart keeps Premium, Standard. Strict elimination gives the same result in any order. Only domination by another pure strategy is checked.

Allowing weakly dominated strategies

No weakly dominated strategies beyond the strict ones above.

Security levels

North Cart’s pure maximin (the best guaranteed payoff with a pure strategy): 1. South Cart can hold North Cart to at most 2 with a pure strategy (minimax).

The game is not constant-sum, so these numbers are security levels rather than a game value.

How this works

Formulas

The row player picks strategy ii and the column player picks strategy jj. The row player’s payoff is AijA_{ij} and the column player’s is BijB_{ij}. Mixed strategies are probability vectors xx (rows) and yy (columns).

Expected payoffs.

urow(x,y)=∑i∑jxi yj Aij,ucol(x,y)=∑i∑jxi yj Biju_{\text{row}}(x, y) = \sum_i \sum_j x_i\, y_j\, A_{ij}, \qquad u_{\text{col}}(x, y) = \sum_i \sum_j x_i\, y_j\, B_{ij}

Dominance (pure strategies). Row strategy rr strictly dominates kk when it is better against every remaining column. It weakly dominates kk when it is never worse and better against at least one column:

strict: Arj>Akj  ∀jweak: Arj≥Akj  ∀j  and  Arj>Akj for some j\text{strict: } A_{rj} > A_{kj} \ \ \forall j \qquad \text{weak: } A_{rj} \ge A_{kj} \ \ \forall j \ \text{ and } \ A_{rj} > A_{kj} \text{ for some } j

The same test applies to the column player, using the columns of BB.

Best responses and pure Nash equilibrium. A cell (i,j)(i, j) is a pure Nash equilibrium when each strategy is a best response to the other:

Aij=max⁡kAkjandBij=max⁡lBilA_{ij} = \max_{k} A_{kj} \quad \text{and} \quad B_{ij} = \max_{l} B_{il}

Mixed equilibrium by support enumeration. For each pair of supports S1S_1 (rows used) and S2S_2 (columns used) of equal size, solve the indifference systems:

∑j∈S2Aij yj=v  ∀i∈S1,∑i∈S1Bij xi=w  ∀j∈S2,∑jyj=∑ixi=1\sum_{j \in S_2} A_{ij}\, y_j = v \ \ \forall i \in S_1, \qquad \sum_{i \in S_1} B_{ij}\, x_i = w \ \ \forall j \in S_2, \qquad \sum_j y_j = \sum_i x_i = 1

A solution counts as an equilibrium only if every probability on the support is positive and no strategy outside the support pays more:

∑jAkj yj≤v  ∀k∉S1,∑iBil xi≤w  ∀l∉S2\sum_j A_{kj}\, y_j \le v \ \ \forall k \notin S_1, \qquad \sum_i B_{il}\, x_i \le w \ \ \forall l \notin S_2

2×2 closed form. In a 2×2 game, the column mix that makes the row player indifferent puts this probability on the first column:

q=A22−A12A11−A12−A21+A22q = \frac{A_{22} - A_{12}}{A_{11} - A_{12} - A_{21} + A_{22}}

The row mix that makes the column player indifferent puts this probability on the first row:

p=B22−B21B11−B12−B21+B22p = \frac{B_{22} - B_{21}}{B_{11} - B_{12} - B_{21} + B_{22}}

Zero-sum and constant-sum games. When Aij+BijA_{ij} + B_{ij} is the same in every cell, the row player’s payoff is identical in every equilibrium. That payoff is the value of the game. The pure-strategy security levels are:

v‾=max⁡imin⁡jAij  ≤  v‾=min⁡jmax⁡iAij\underline{v} = \max_i \min_j A_{ij} \;\le\; \overline{v} = \min_j \max_i A_{ij}

There is a saddle point (a pure solution) when the two are equal.

Conventions & assumptions

  • Cell order. Each cell lists (row payoff, column payoff). Both players maximize their own payoff and know the whole matrix.
  • Dominance is checked against pure strategies only. A strategy dominated only by a mix of two others is not removed.
  • Fixed elimination order.
    • The sequence shown repeatedly scans the row player’s strategies, then the column player’s, from first to last.
    • It removes the first dominated strategy it finds and names a strict dominator over a weak one.
  • Strict vs weak elimination.
    • Strict elimination reaches the same reduced game in any order.
    • Weak elimination can depend on the order. The solver therefore tries every order and lists every distinct end state, flagging the result as order-dependent when more than one appears.
    • Weak elimination can also delete Nash equilibria.
  • Equal-size supports.
    • Support enumeration uses equal-size supports, which finds every equilibrium of a nondegenerate game. In such a game the number of equilibria is odd.
    • When best responses tie, the game is flagged as degenerate. There may then be infinitely many equilibria, and the list shown can be incomplete.
  • Tolerance. Comparisons use a tolerance of 10−910^{-9} times the largest absolute payoff.

Worked example

Two campus coffee carts, North (rows) and South (columns), each pick a price tier. Each cell shows (North, South):

PremiumStandardDiscount
Premium4, 21, 32, 0
Standard3, 43, 11, 0
Discount2, 10, 10, 5
  1. North’s Discount is strictly dominated by Premium, because 4 beats 2, 1 beats 0 and 2 beats 0. Remove that row.
  2. With Discount gone, South’s Discount column pays 0 and 0. Premium pays 2 and 4, so it strictly dominates Discount. Remove that column.
  3. Look for a pure equilibrium in the remaining 2×2. There is none:
    • North’s best reply to Premium is Premium (4), but South’s best reply to Premium is Standard (3).
    • North’s best reply to Standard is Standard (3), but South’s best reply to Standard is Premium (4).
  4. Find South’s mix. South plays Premium with probability q to make North indifferent: 4q + 1(1 − q) = 3q + 3(1 − q). This gives 3q + 1 = 3, so q = 2/3.
  5. Find North’s mix. North plays Premium with probability p to make South indifferent: 2p + 4(1 − p) = 3p + 1(1 − p). This gives 4 − 2p = 1 + 2p, so p = 3/4.
  6. Compute the payoffs. North expects 4(2/3) + 1(1/3) = 3, and South expects 2(3/4) + 4(1/4) = 2.5.
  7. Check the eliminated strategies. Discount would earn North only 2(2/3) = 4/3 against South’s mix, and would earn South 0 against North’s mix. Neither player wants to deviate.

The game is nondegenerate and has exactly one equilibrium. North plays (3/4, 1/4, 0) and South plays (2/3, 1/3, 0). It is not constant-sum.

Limitations

  • The solver handles two players with up to four strategies each, in a simultaneous, one-shot game with complete information. It doesn’t cover sequential moves, repeated play or private information.
  • Payoffs must be cardinal for mixed strategies to make sense.
    • Multiplying one player’s payoffs by a positive number, or adding a constant, leaves every equilibrium unchanged.
    • Other changes that keep the ranking of outcomes can still move the mixed equilibria.
  • Domination by mixed strategies is not detected.
  • In degenerate games the equilibrium list may miss continua of equilibria.
  • An equilibrium is a prediction under strong rationality assumptions. Real competitors may coordinate, learn or make mistakes. Pair the solver with judgment, as you would in a strategy case.

Excel/Sheets equivalents

QuantityFormula
Expected payoff of row i against mix y=SUMPRODUCT(A_row_i, y)
Best response to column j=MATCH(MAX(A_col_j), A_col_j, 0)
2×2 column mix q=(A22-A12)/(A11-A12-A21+A22) (worked example: =(3-1)/(4-1-3+3) gives 0.6667)
2×2 row mix p=(B22-B21)/(B11-B12-B21+B22) (worked example: =(1-4)/(2-3-4+1) gives 0.75)
k×k indifference system=MMULT(MINVERSE(M), b) with M the payoff block bordered by −1 and a row of 1s
Pure security level (maximin)=MAX(BYROW(A, LAMBDA(r, MIN(r))))

Runs entirely in your browser; inputs are saved only on this device. Last updated .