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
Nash equilibria found
1
0 pure, 1 mixed
North Cart: dominant strategy
None
South Cart: dominant strategy
None
Game type
General-sum
| North Cart / South Cart | Premium | Standard | Discountremoved (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)) |
| # | Type | North Cart plays | South Cart plays | North Cart expected payoff | South Cart expected payoff |
|---|---|---|---|---|---|
| 1 | Mixed | Premium 3/4 (75.0%), Standard 1/4 (25.0%) | Premium 2/3 (66.7%), Standard 1/3 (33.3%) | 3 | 5/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
- Remove North Cart’s Discount: strictly dominated by Premium.
- 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 and the column player picks strategy . The row player’s payoff is and the column player’s is . Mixed strategies are probability vectors (rows) and (columns).
Expected payoffs.
Dominance (pure strategies). Row strategy strictly dominates when it is better against every remaining column. It weakly dominates when it is never worse and better against at least one column:
The same test applies to the column player, using the columns of .
Best responses and pure Nash equilibrium. A cell is a pure Nash equilibrium when each strategy is a best response to the other:
Mixed equilibrium by support enumeration. For each pair of supports (rows used) and (columns used) of equal size, solve the indifference systems:
A solution counts as an equilibrium only if every probability on the support is positive and no strategy outside the support pays more:
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:
The row mix that makes the column player indifferent puts this probability on the first row:
Zero-sum and constant-sum games. When 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:
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 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):
| Premium | Standard | Discount | |
|---|---|---|---|
| Premium | 4, 2 | 1, 3 | 2, 0 |
| Standard | 3, 4 | 3, 1 | 1, 0 |
| Discount | 2, 1 | 0, 1 | 0, 5 |
- North’s Discount is strictly dominated by Premium, because 4 beats 2, 1 beats 0 and 2 beats 0. Remove that row.
- With Discount gone, South’s Discount column pays 0 and 0. Premium pays 2 and 4, so it strictly dominates Discount. Remove that column.
- 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).
- 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.
- 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.
- Compute the payoffs. North expects 4(2/3) + 1(1/3) = 3, and South expects 2(3/4) + 4(1/4) = 2.5.
- 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
| Quantity | Formula |
|---|---|
| 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 .