Zero-Sum Games
In pure conflict one side's gain is the other's loss, so optimal play means randomizing to stay unpredictable and guaranteeing a floor.
Why Does This Exist?
Chess, poker duels, and adversarial training share a shape: interests diametrically opposed, one player's gain the other's exact loss. Guessing the opponent is then fatal, because anything predictable gets exploited. Zero-sum theory replaces guessing with guarantees: each side can secure a floor regardless of the opponent, and optimal play makes both floors meet at the game's value.
This is the setting of GAN training dynamics and robust optimization, and the companion minimax theorem proves the floors always meet. The general nonzero-sum case (cooperation possible) is the parent overview; equilibrium computation by learning is under game-theoretic optimization.
The one idea you need first
A zero-sum game is one matrix : row gains , column loses the same. Row picks a row distribution , column a column distribution , and the expected payment is . Row maximizes it, column minimizes it.
Think of It Like This
A penalty shootout
The kicker picks left or right; the keeper dives left or right. Score or save: pure conflict, no shared interest. A kicker who always shoots left gets read within minutes; a keeper who always dives right gets chipped down the middle.
Both randomize. The kicker's mix makes the keeper indifferent (no dive systematically better), and the keeper's mix makes the kicker indifferent. Neither wins every kick, but each guarantees their long-run conversion rate whatever the other does. The "value" of the shootout is that rate, fixed once both mix well.
How It Actually Works
Row's security level: , the best floor over row mixes against column's best reply. Column's cap: . Optimal and make these equal at value : row guarantees at least , column holds row to at most .
Worked example
Matching pennies, row wins on match:
Row mixing : against column Heads, payment ; against Tails, . Floor . Column mixing caps row at the same way. Value : a fair game. Pure strategies guarantee (the opponent exploits the revealed side), so mixing gains a full point over any deterministic choice.
A second check with an asymmetric row: against column's best reply gives : worse than . Deviating from the mix costs half a point.
Code
def expected(ax: list[float], ay: list[float], pay: list[list[float]]) -> float: total = 0.0 for i, pi in enumerate(ax): for j, qj in enumerate(ay): total += pi * qj * pay[i][j] # payment row receives return round(total, 3)
pennies = [[1, -1], [-1, 1]]print(expected([0.5, 0.5], [0.5, 0.5], pennies)) # -> 0.0print(expected([1.0, 0.0], [0.5, 0.5], pennies)) # -> 0.0print(expected([0.75, 0.25], [0.0, 1.0], pennies)) # -> -0.5Optimal mixing holds the value; the skewed mix against a best reply loses half a point.
Watch Out For
Playing the equilibrium against a weak opponent
The max-min mix guarantees the value against anyone, but against a predictable opponent it leaves money on the table: exploiting needs a best response to their mix, not the equilibrium mix. In poker and security games, play equilibrium as the default but shift to exploitation once the opponent's bias is measured.
Assuming zero-sum where interests partly align
GAN generators and discriminators look zero-sum but practitioners add feature-matching and gradient penalties that break strict opposition. Results proved for exact zero-sum (value, convergence of specific dynamics) can fail for these variants. Verify the payoff sums to zero before quoting the theorems.
The Quick Version
- Zero-sum means one's gain is the other's loss, captured in a single matrix.
- Optimal play randomizes to stay unpredictable and guarantees a floor.
- Matching pennies has value at each; any pure choice guarantees .
- Row's best floor and column's best cap meet at the value under optimal mixes.
- Deviating to against a best reply costs half a point.
- Exploit weak opponents with best responses, not equilibrium mixes.