# Chapter ᚅ(N): The stadium *Teclam Áirme, the Mathematical Compendium — a copy for AI readers of https://www.teclamairme.com/#ch-T7, as of 2026-09-30. Links are relative to https://www.teclamairme.com/fortheaireaders/.* [Guide for AI readers](index.md) · [Its glossary cards](ch07-cards.md) · [Its references](ch07-refs.md) · [Previous chapter](ch06.md) · [Next chapter](ch08.md) *A footnote such as [r-7.3] is reference entry 7.3 and links to it. Section 7 of 28; chapters are named by their Ogham letter, never by number.* ᚅ – [Nion](ch07-cards.md#g-og-nin): associated with the ash tree, Section 7 ## Chapter ᚅ(N): The stadium > “I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS mathematics.” > — John Horton Conway · quoted in MacTutor History of Mathematics, Quotations by John Conway [r-7.15](ch07-refs.md#r-7.15) Formula: ([3 ⊕ 5 ⊕ 6](ch07-cards.md#g-nim356))/([1 ⊕ 2 ⊕ 4](ch07-cards.md#g-nim124) + [2 ⊗ 2](ch07-cards.md#g-nimprod)) {brace: [combinatorial game theory](ch07.md#ch-T7-combinatorial-game-theory)} · ([v(matching pennies)](ch07-cards.md#g-mpvalue))/([½](ch07-cards.md#g-mixhalf) + [u(D, D)](ch07-cards.md#g-pdpayoff)) {brace: [classical game theory](ch07.md#ch-T7-classical-game-theory)} Key concepts: Combinatorial and classical game theory: Nim and matching pennies. It includes symbols you may not have seen before, such as: [⊕](ch07-cards.md#g-nimsum), [⊗](ch07-cards.md#g-nimprod), and [v](ch07-cards.md#g-mpvalue). Zero here is a verdict: a position the player to move must lose, and a game so fair that neither side can expect an edge. Let’s rest a bit in our seats; we have a good view of the games. The network of possible moves has become a contest of choices. Another player has a say in how our carefully counted choices turn out. There are two kinds of game here. In Nim, both players see the whole position and take turns. In matching pennies, we choose without seeing the other player’s choice. One zero describes a position from which the next player cannot force a win; the other describes a game in which neither player can secure a positive expected gain. Field notes ### [combinatorial game theory](ch07.md#ch-T7-combinatorial-game-theory) {#ch-T7-combinatorial-game-theory} Nim is played with heaps of counters. On each turn, remove at least one counter from exactly one heap; whoever takes the last counter wins. Charles Bouton showed in 1901 how to read any position: write the heap sizes in binary and add without carrying. This operation is [exclusive-or](ch07-cards.md#g-nimsum), written ⊕, and its answer is called the *nim-sum*: an even number of ones in a column gives zero, an odd number gives one. [r-7.1](ch07-refs.md#r-7.1) [r-7.2](ch07-refs.md#r-7.2) An electronic adding circuit uses the same rule for each digit of its sum, and works out the carry separately. [r-7.17](ch07-refs.md#r-7.17) #### Numerator [3 ⊕ 5 ⊕ 6](ch07-cards.md#g-nim356) = 0; a losing Nim position, chosen because the cancellation is visible in every column. In binary, where the columns count fours, twos, and ones, the heaps are 011, 101, and 110: 3 is 2 + 1, 5 is 4 + 1, and 6 is 4 + 2. Every column contains two ones, so the [nim-sum](ch07-cards.md#g-nimsum) is 000, even though fourteen counters sit on the table: it records a strategic property, not a count. [r-7.3](ch07-refs.md#r-7.3) A position with [nim-sum](ch07-cards.md#g-nimsum) zero is lost for the player about to move against correct play. Any move from it makes the [nim-sum](ch07-cards.md#g-nimsum) nonzero, and from any nonzero position some move restores zero, so the player who keeps handing back zeros takes the last counter. [r-7.2](ch07-refs.md#r-7.2) #### Denominator [1 ⊕ 2 ⊕ 4](ch07-cards.md#g-nim124) = 7; the same game from a winning position. The binary ones of 1, 2, and 4 occupy different columns, so nothing cancels. The player to move can win by reducing the heap of 4 to 3, handing over 1 ⊕ 2 ⊕ 3 = 0. [r-7.4](ch07-refs.md#r-7.4) [2 ⊗ 2](ch07-cards.md#g-nimprod) = 3; nimber arithmetic, where two times two is three. A position with nimber 2 can stand in for a Nim heap of two counters when games are played side by side. The [Sprague–Grundy theorem](ch07-cards.md#g-sg) gives each position such a heap value in a finite game where both players have the same available moves, play must end, and the last move wins. [r-7.9](ch07-refs.md#r-7.9) These heap values add by the [no-carry rule](ch07-cards.md#g-nimsum) above. Conway also defined a separate [multiplication](ch07-cards.md#g-nimprod) for them; under its rules, [2 ⊗ 2](ch07-cards.md#g-nimprod) = 3. [r-7.7](ch07-refs.md#r-7.7) [r-7.8](ch07-refs.md#r-7.8) The first fraction is 0/10: 7 + 3 = 10. [r-7.18](ch07-refs.md#r-7.18) **Fine print.** Each nimber expression is worked out first and its answer read as an ordinary whole number; the + between them is ordinary addition, and the fraction does not divide one game position by another. [Nimber multiplication](ch07-cards.md#g-nimprod) is algebra built on top of the games; what the games themselves compute, when several are played side by side, is [nimber addition](ch07-cards.md#g-nimsum), the nim-sum of their values. ### [classical game theory](ch07.md#ch-T7-classical-game-theory) {#ch-T7-classical-game-theory} In the classical games chosen here, each player decides without seeing what the other has chosen. [Von Neumann’s minimax theorem](ch07-cards.md#g-minimax) is about two-player zero-sum games, where whatever one player wins the other loses. It says that every such game with finitely many choices has a value once the players may choose at random: the expected payoff, meaning the average win per round, that a player can guarantee against the best opposition. [r-7.10](ch07-refs.md#r-7.10) #### Numerator [v(matching pennies)](ch07-cards.md#g-mpvalue) = 0; the value of matching pennies, the smallest kind of game in which no fixed choice is safe, and neither side has an edge. We each show a coin. If they match, I win one unit from you; if they differ, you win one from me. If I always choose heads, you can always choose tails, and if I merely favor heads, you can exploit that. My defense is to choose heads and tails with equal probability, independently of you; then my expected payoff is ½ × 1 + ½ × (−1) = 0 whatever you do, and you can protect yourself the same way. [r-7.11](ch07-refs.md#r-7.11) #### Denominator Two ideas in strategy: a fair mixture in matching pennies, and choices in the prisoner’s dilemma that leave both players worse off. [½](ch07-cards.md#g-mixhalf) = ½; the probability of heads in the game’s only equilibrium. A [Nash equilibrium](ch07-cards.md#g-nasheq) is a set of strategies from which no player can improve their expected payoff by changing their own strategy alone. In matching pennies both players use the equal mixture, and neither can profit from a unilateral change. [r-7.12](ch07-refs.md#r-7.12) [u(D, D)](ch07-cards.md#g-pdpayoff) = 1; the prisoner’s dilemma, the classic game about cooperation. It is here because it breaks the rule matching pennies obeys: one player’s gain is no longer the other’s loss, and choices that make sense for each player alone leave both worse off. Each player can cooperate or defect. With the payoffs used here, mutual cooperation earns each player 3 and mutual defection earns each 1; defect against a cooperator and you get 5 while they get 0. Whatever the other person does, defecting improves your own score (5 beats 3, and 1 beats 0), so both defect, even though both would prefer mutual cooperation. [u(D, D)](ch07-cards.md#g-pdpayoff) = 1 is each player’s payoff when both defect. [r-7.14](ch07-refs.md#r-7.14) The second and final fraction is 0/1.5: ½ + 1 = 1.5, positive and finite. **Fine print.** A single round still pays someone; the zero belongs to the guaranteed expected payoff. The prisoner’s dilemma lesson depends on the ordering of the payoffs; the particular numbers are a chosen example. The two denominator terms come from different games and keep their own meanings before entering the formula as numbers. What this chapter adds to the formula: 0/10 · 0/1.5 = 0 Both fractions equal zero, but I would not want to exchange their explanations. Nim’s zero tells the next player something unwelcome about a visible position. Matching pennies’ zero tells both players how randomization can prevent exploitation. Conway’s connection between games and numbers will return in Chapter ᚙ(X), with another answer to what a game can be worth. The games have concluded and most of the crowd is heading for the rail station; let’s follow. The train stops beside a museum I want to show you, but first, we can explore three rather interesting rail cars on the way: the observation car, the locomotive, and the caboose. Hurry to the observation car before those seats are all taken! Watch and read - [The Unbeatable Game from the 60s: Dr NIM](https://www.youtube.com/watch?v=9KABcmczPdg) Stand-up Maths, Matt Parker: a marble-powered plastic machine from the mid-1960s that plays Nim, and the trick behind it [r-7.19](ch07-refs.md#r-7.19) - [Nim and the Powers of Two (Tanton Mathematics)](https://www.youtube.com/watch?v=ORaGSyewF9Q) James Tanton: the binary strategy behind the nim-sum, explained on a whiteboard - [Nim](https://en.wikipedia.org/wiki/Nim) Wikipedia - [Sprague–Grundy theorem](https://en.wikipedia.org/wiki/Sprague%E2%80%93Grundy_theorem) Wikipedia