Index

Module 01 · Game TheoryThe Math of Strategy

What Is a Game?

What Is a Game
What Is a Game · Open board

The opening board of a track about choices that depend on each other: two people, two firms, two services, each doing the best it can while watching what the other one does. It picks up where Decision-Making Under Uncertainty left off: that lesson was one mind choosing against a fixed, uncaring world; this one is what changes once the thing you’re choosing against is choosing back.

Before you start. Decision-Making Under Uncertainty showed that an uncertain choice has a best answer once you write down what could happen and what each outcome is worth. Here the uncertainty is a person with their own reasons, deciding at the same time as you - harder, and far more common.

1944: Princeton, and the economics that couldn’t add up

Oskar Morgenstern was an economist at Princeton University in the early 1940s, and something in his own field bothered him. Economics had a whole toolkit for a decision against nature: a farmer deciding how much wheat to plant given uncertain rain, a firm deciding how much to produce given an uncertain market. Write down what could happen, weigh each outcome by how likely it is, pick the best - the same math as Decision-Making Under Uncertainty.

But most decisions in a real economy aren’t against nature. Two grocers on the same street pricing bread. Two bidders at the same auction. In each, what you’re deciding against is a person or firm deciding right back at you, for their own reasons, at the same time - not a fixed world, but something watching you exactly as hard as you’re watching it.

Morgenstern found a mathematician down the road at Princeton’s Institute for Advanced Study, John von Neumann, who had worked on exactly this kind of problem for its own sake for years. In 1944 the two of them published Theory of Games and Economic Behavior, and it gave “a decision that depends on someone else’s decision” an actual shape you could write down and solve, instead of a shrug.

The moment it clicked: your best move depends on theirs

A decision becomes a game the moment your best choice depends on what someone else decides, and theirs depends on yours. Here’s a version of that small enough to write down completely.

Say you run a food truck, and so does someone else, and at lunchtime you both park near the same office park. There are two plazas to choose, one north, one south. Park in the same plaza and the two lines and the smell together make it busy: you both do well. Park in different plazas and each looks like the only food around, no line forms, and you both have a slow day.

That’s a real game by the definition above: the best plaza for you depends on where the other truck sets up, and vice versa. Pinning it down completely takes exactly four pieces of information.

First, who’s deciding: the players - here, the two truck owners, nobody else.

Second, what each of you can actually choose. Not just today’s plaza, but a full plan for every kind of day: rainy Tuesdays, the day of the big game, the week a rival opens nearby. That whole plan, an answer for every situation, is your strategy. “Park north on weekdays, south on event days” is a strategy; “park north” with no answer for the rest is not.

Third, what each of you gets out of every possible pairing of plazas - the money in your till at the end of the day, for you-north-them-north, you-north-them-south, and so on through all four pairings. That number, for every pairing, is the payoff.

Fourth, and this is the assumption sitting underneath all of it: each of you is trying to make as much money as you personally can, and each of you knows the other one is too. That’s rationality - not that either of you is always right, just that you’re each playing to win your own day, not being kind or careless about it.

The payoff matrix: the whole game in one grid

Put all four pieces on paper and you get a small grid: your two plazas down the side, theirs across the top, and in each of the four boxes, the two numbers - yours and theirs - for that pairing. That grid is a payoff matrix, and it’s the one picture worth being able to read on sight, because most of the rest of this track is built by drawing one of these and asking what a smart player does with it.

Here is one, with your two plazas as rows - Up is north, Down is south - and theirs as columns - Left is north, Right is south. Each cell reads (your take, their take):

                 THEM
              Left     Right
      Up    (3, 2)    (0, 0)
YOU
      Down  (0, 0)    (2, 3)

Top-left: you both picked north. You take 3, they take 2 - the busy-plaza bonus, split unevenly because your regulars are on that side. Bottom-right: you both picked south, and now it’s their regulars, 2 for you, 3 for them. The other two corners are the mismatched plazas: however you split up, both of you get 0.

Two things fall out of that grid, worth carrying into every lesson after this one. First, there’s no plaza that’s simply “your best plaza”: if they go north you want north, if they go south you want south. Your best move changes with theirs, which is the whole game, right there. Second, you and the other owner disagree about which good outcome is better - you prefer both-north, they prefer both-south, and no third option beats both. Dominant Strategies & Nash Equilibrium gives that disagreement a name and a way to reason about it.

The whole method, read top to bottom: one yes/no question, then the pieces to write down in order.

flowchart TD
  A["Does your best choice depend on what someone else chooses?"] -->|no| B["A plain decision, not a game"]
  A -->|yes| C["Name the players"]
  C --> D["List what each can choose: a strategy, a plan for every situation"]
  D --> E["Write what each gets for every combination: the payoffs"]
  E --> F["Draw it as a grid - your choices as rows, theirs as columns"]

You now know

  • A decision becomes a game the moment your best choice depends on what someone else decides, and theirs depends on yours.
  • Any game is fully described by four things: the players (who’s deciding), each one’s strategy (a complete plan, not just one move), the payoffs (what each gets for every combination), and rationality (each player is out for their own best payoff, and knows the others are too).
  • A payoff matrix puts your choices down the side and the other player’s choices across the top; each box holds the two numbers for that pairing, yours first.
  • Your best choice can change depending on what the other side does, which is the entire reason it’s a game and not a plain decision.
  • A game can have two outcomes where neither player would switch alone, yet each player prefers a different one of the two.

Stop here if you want. What follows is the same grid checked by code, plus the two questions - is the prize fixed, and do you move at the same time or in turn - that decide how the rest of this track applies to any situation you throw at it.

Second read: the matrix, checked in code

Reading a matrix means asking, per column and per row: given what they do, what’s my best reply? A best reply is the move that gives you the highest payoff against one particular move of theirs. Here a script asks it of the food-truck matrix, so nothing gets skipped. You don’t need to read the Python line by line; the printed output below is what matters. Save it as game.py and run python3 game.py:

rows, cols = ["Up", "Down"], ["Left", "Right"]
M = {("Up","Left"): (3,2), ("Up","Right"): (0,0), ("Down","Left"): (0,0), ("Down","Right"): (2,3)}

print("cell sums (zero-sum test: every sum equal?)")
sums = {k: a+b for k, (a,b) in M.items()}
for k, s in sums.items(): print(f"  {k[0]:>4} x {k[1]:<5} -> {M[k]}  sum {s}")
print("  zero-sum:", len(set(sums.values())) == 1)

print("\nYOUR best reply to each of THEIR columns (max of first number down the column)")
br_you = {}
for c in cols:
    best = max(rows, key=lambda r: M[(r,c)][0]); br_you[c] = best
    print(f"  if they play {c:<5}: Up gives {M[('Up',c)][0]}, Down gives {M[('Down',c)][0]} -> you play {best}")

print("\nTHEIR best reply to each of YOUR rows (max of second number across the row)")
br_them = {}
for r in rows:
    best = max(cols, key=lambda c: M[(r,c)][1]); br_them[r] = best
    print(f"  if you play {r:<4}: Left gives {M[(r,'Left')][1]}, Right gives {M[(r,'Right')][1]} -> they play {best}")

print("\ncells where both are best replies at once")
for r in rows:
    for c in cols:
        if br_you[c] == r and br_them[r] == c: print(f"  ({r}, {c}) -> payoffs {M[(r,c)]}")

Output, as run. Three lines carry it: the zero-sum: verdict, the two -> you play lines that disagree with each other, and the two cells at the end.

cell sums (zero-sum test: every sum equal?)
    Up x Left  -> (3, 2)  sum 5
    Up x Right -> (0, 0)  sum 0
  Down x Left  -> (0, 0)  sum 0
  Down x Right -> (2, 3)  sum 5
  zero-sum: False

YOUR best reply to each of THEIR columns (max of first number down the column)
  if they play Left : Up gives 3, Down gives 0 -> you play Up
  if they play Right: Up gives 0, Down gives 2 -> you play Down

THEIR best reply to each of YOUR rows (max of second number across the row)
  if you play Up  : Left gives 2, Right gives 0 -> they play Left
  if you play Down: Left gives 0, Right gives 3 -> they play Right

cells where both are best replies at once
  (Up, Left) -> payoffs (3, 2)
  (Down, Right) -> payoffs (2, 3)

The zero-sum line is the fixed-pie test, done as arithmetic instead of judgement: add up each cell. Two cells sum to 5, two sum to 0, so the total isn’t constant - a non-zero-sum game, where the size of the pie depends on what gets chosen, not just who gets which slice. A true zero-sum game is a fixed pie: your slice growing means mine shrinks by that much, the shape of poker or chess. The classic expensive mistake is treating a growable situation as fixed, fighting over slices instead of making the pie bigger.

The -> you play lines are the best-reply calculation, and they disagree on purpose: you play Up if they play Left, Down if they play Right. No row wins regardless of their column, which is the interdependence from the top of this lesson, made arithmetic. The last block finds exactly two cells where both best-reply lines agree - (Up, Left) and (Down, Right) - so both are stable, but the two players rank them differently. Dominant Strategies & Nash Equilibrium is what to do with a matrix once you’ve found those cells by hand.

For contrast, change the four cells to (1,-1) (-1,1) (-1,1) (1,-1) - you win a dollar if your choices match, they win if they don’t - and run it again. Every cell sums to 0 (1 + -1, -1 + 1, -1 + 1, 1 + -1), so zero-sum: True, and the last block prints nothing: no cell where both sides are content, because whoever is losing always wants to switch. No stable plaza at all, which the mixed-strategy lesson later in this track is built to solve.

Two more axes finish the picture. Do players move simultaneously, both committing at once and blind to each other, or sequentially, one first and the other reacting? Simultaneous is the matrix above, formally the normal form; sequential is a branching game tree, the extensive form, solved by reasoning backward from the last move. Separately: does each player see every move so far (perfect information, chess) or not (imperfect, a sealed bid)? Does each know the other’s payoffs (complete information) or have to guess (incomplete, an auction)?

The rationality caveat. All of this assumes both truck owners are coldly self-interested payoff-maximisers, and real people aren’t quite that. The Psychology track catalogues how real decisions bend: biases (Cognitive Biases), loss aversion and framing (Decision-Making Under Uncertainty), spite, fairness, limited foresight. Treat it as the rational baseline: where incentives point before a real person’s quirks are added.

Where this shows up outside food trucks. A rate limiter and the traffic hitting it are two players adapting to each other’s policy; two services grabbing the same shared capacity can both end up worse off, which is why backoff and quotas exist. A vendor negotiation is non-zero-sum the same way - name the pie before fighting over slices.

Problem set

Solve each before opening its answer.

  1. Two cafés on one street each choose to open Early or Late. Both early: (1, 1). You early, them late: (4, 2). You late, them early: (2, 4). Both late: (0, 0). Rows are your café’s choice, columns theirs, your payoff first. What is your best reply to each of their moves, and which cells are both players content in?
  2. Is this game zero-sum? Cells: (2, −2), (−1, 1), (0, 0), (3, −3).
  3. For each, say simultaneous or sequential, and perfect or imperfect information: rock-paper-scissors; chess; a sealed-bid auction; a game of noughts and crosses.
Answers
  1. If they open early, you do better late (2 against 1). If they open late, you do better early (4 against 0). The same holds for them. The cells where both are best replies are (Early, Late) and (Late, Early): the cafés want to differ, and each prefers to be the early one. (Checked with a brute-force pass over the four cells, 2026-10-17.)
  2. Yes. Every cell sums to 0, so one player’s gain is exactly the other’s loss.
  3. Rock-paper-scissors: simultaneous, so neither sees the other’s move (imperfect). Chess: sequential, perfect information. Sealed bids: simultaneous, imperfect, and each bidder’s value is private, so incomplete information as well. Noughts and crosses: sequential, perfect information, and small enough to solve backward from the end (Draw the Tree, Start From the End).

Try it

Take a real situation you’re in - a negotiation, a design debate, a pricing call - and write it as a game: name the players, list each one’s strategies, sketch a rough payoff matrix with “high/medium/low” standing in for numbers. Then ask: is the pie fixed or can it grow, and do you move at once or in turn? The “obvious” move often changes once the payoffs are actually on paper.

Drop your rough numbers into game.py in place of M and run it. Three lines tell you what you need: are the sums constant (is the pie really fixed), does your best reply change down the columns (is this really a game), and how many cells are both sides content in (zero means someone always wants to switch; two or more means the argument is about which one).

Go deeper

  • von Neumann & Morgenstern (1944), Theory of Games and Economic Behavior - the founding text.
  • Dixit & Nalebuff, The Art of Strategy - the best intuitive introduction.
  • Osborne, An Introduction to Game Theory - the standard rigorous text.
  • Robert Axelrod, The Evolution of Cooperation - why non-zero-sum plus repetition changes everything.

Retrieval practice

9 questions. Answer each one before you open it.

What turns a plain decision into a game, in one sentence?

The moment your best choice depends on what someone else decides, and theirs depends on yours. A decision against fixed nature - the weather, a dice roll - isn’t a game; a decision against another player who is also choosing is.

List the four things that specify any game.

Players (who’s deciding), strategies (each player’s complete plan, an answer for every situation, not just one move), payoffs (what each gets for every combination of choices), and rationality (each maximises its own payoff, and knows the others are doing the same).

How do you read a payoff-matrix cell, and who picks what?

You pick a row, the other player picks a column, at the same time; the cell where they meet is the outcome. A cell (a, b) lists your payoff first (a), the other player’s second (b).

Zero-sum vs non-zero-sum, and the classic mistake?

Zero-sum: every cell sums to the same constant - a fixed pie, pure competition, like poker or chess. Non-zero-sum: the total can grow or shrink depending on what’s chosen. The mistake is treating a non-zero-sum situation - a negotiation, a partnership - as fixed, and fighting over slices instead of growing the pie.

Normal form vs extensive form - when do you use each?

Normal form, the payoff matrix, is for simultaneous games, both players moving at once, blind to each other. Extensive form, the game tree, is for sequential games, players moving in turn with later ones seeing what came before; solved by reasoning backward from the last move.

Why is the rationality assumption a caveat, and not a law?

Real players are only approximately rational: they care about fairness, spite and trust, and their foresight is limited, which the Psychology track catalogues. Classical game theory gives the rational baseline - what a perfectly self-interested player would do - and predicts a sharp opponent well, a messy human only approximately.

How do you test whether a matrix is zero-sum without judging it, and what did the food-truck matrix give?

Add the two numbers in every cell. Same constant every time: fixed pie, zero-sum. The food-truck matrix summed to 5, 0, 0 and 5 - not constant - so it’s non-zero-sum: two outcomes create value, two destroy it, the signature of a game where coordinating beats competing.

What is a best reply, and what did the food-truck matrix show about yours?

The move that gives you the highest payoff against one specific move of theirs. In the matrix, your best reply is Up if they play Left and Down if they play Right - it changes with their move, so no plaza is best regardless, which is what makes it a game.

In the food-truck matrix, how many cells are best replies for both players at once, and why does that number matter?

Two: (Up, Left) and (Down, Right). Neither player would switch given the other’s choice, so both are stable, but you prefer the first and the other owner the second. A preference gap between two stable outcomes is a disagreement to resolve, not a calculation - the next lesson’s job.

Review Game Theory →

Saved in this browser, and to your account when you sign in.