The Wasteland · Pattern · combinatorial game theory

The Game the Golden Ratio Wins

WYTHOFF 1907 · two piles, three moves cold positions (⌊nφ⌋, ⌊nφ²⌋) φ = 1.6180339887… solved live · 12/12 offline

Here are two heaps of stones. Take as many as you like from one heap, or the same number from both. Whoever clears the table wins. It is a children's game. Its secret is the most irrational number there is.

In 1907 the Dutch mathematician Willem Wythoff wrote down a tiny variation on the ancient game of Nim. Two piles of tokens sit between two players. On your turn you do exactly one of three things: take any number of tokens from the first pile, take any number from the second, or take the same number from both at once. The player who removes the last token wins.

That third move, the one that empties from both piles together, is the whole story. Without it the game is trivial. With it, the game has a perfect strategy hiding inside it, and the shape of that strategy is two straight rays whose slopes are φ = 1.618…, the golden ratio, and its reciprocal 1/φ. The formula is exact: the losing positions are exactly the integer points (⌊nφ⌋, ⌊nφ²⌋) and their mirror images, each within one step of those rays, and below the golden ratio falls out of a stone-counting game the way a struck bell finds its pitch.

Play first. Then we'll take the machine apart.

I · Play the queen

Picture the two pile sizes as a single chess queen on a quarter-infinite board, at the square (a, b). The three moves are exactly the queen's moves toward the corner: slide left (take from pile a), slide down (take from pile b), or slide diagonally down-left (take the same from both). Whoever lands the queen on the corner (0, 0) wins. You move; then a machine that has solved the whole board moves back. It plays perfectly: hand it a hot square and it will never let go. Each new game starts you on a hot square, so you can beat it, but only by finding the right move every single turn. Find out why.

Instrument I · Wythoff's queen · play the perfect machinetap a square
your move
queen at
(7, 4)
Slide the queen toward the corner.
won 0 · lost 0 · the machine plays the verified cold-position strategy, recomputed for this board.

If you played a few rounds you found the rule the machine obeys: from most squares there is a move that drops the queen onto a gold square — and once it sits there, every escape only lands on a non-gold square, where your opponent can put it back. The gold squares are the cold positions: lose them and, against perfect play, you have already lost. Everything else is hot — a square from which the winning move exists. The entire theory of the game is the list of cold squares. Reveal them, and they line up.

The losing squares aren't scattered. They climb the board along two perfectly straight rays.

II · The two golden rays

Plot every cold position. They are not a cloud — they are two rays leaving the corner, mirror images across the diagonal, and their slopes are φ and 1/φ. Each cold position is (⌊nφ⌋, ⌊nφ²⌋) for n = 0, 1, 2, …: the n-th multiple of the golden ratio, floored, paired with the n-th multiple of its square. Below the dots, the two coordinate-sequences are unrolled along the number line — and something quietly miraculous happens.

Instrument II — the cold positions, and the partition they make⌊nφ⌋ · ⌊nφ²⌋
lower ⌊nφ⌋ — the small pile upper ⌊nφ²⌋ — the large pile

Run your eye along the number line. Every positive integer is exactly one colour. No integer is skipped; no integer is claimed twice. The lower sequence 1, 3, 4, 6, 8, 9, 11, … and the upper sequence 2, 5, 7, 10, 13, 15, 18, … interlock perfectly to tile all of ℕ. This is a theorem older than the game: Rayleigh's theorem (Lord Rayleigh, 1894), better known as Beatty's theorem after the problem Samuel Beatty set in 1926. For any two irrational numbers r and s with 1/r + 1/s = 1, the sequences ⌊nr⌋ and ⌊ns⌋ together hit every positive integer once and only once.

And 1/φ + 1/φ² = 1 — exactly, because φ² = φ + 1, so (φ+1)/φ² = φ²/φ² = 1. The golden ratio is a Beatty pair with its own square. That's rare. Which raises the real question: of all the irrational pairs that tile the integers, why does this game land on φ specifically?

III · Why φ, and nothing else

The answer is the diagonal move. Look back at the cold positions: the gap between the two coordinates of the n-th one is always exactly n. ⌊nφ²⌋ − ⌊nφ⌋ = n, because φ² = φ + 1. That is forced by the rule "take the same number from both piles": the move along the diagonal can never change the difference between the piles, so the n-th cold position must be the one whose piles differ by n, and there can be only one per difference. So the upper sequence is pinned to be the lower sequence plus n — meaning s = r + 1. Now demand that the two sequences still tile the integers, 1/r + 1/s = 1:

1/r + 1/(r+1) = 1 ⟹ r² = r + 1 ⟹ r = φ

One equation, one positive solution. The golden ratio is not chosen, not approximated, not aesthetic — it is the only number for which "take the same from both piles" and "leave no integer uncovered" can both hold. Turn the dial below and watch every other value fail: leave gaps in the number line, or double-cover it. Only at φ does the coverage become seamless.

Instrument III — the dial: only φ tiles the integerss = r + 1
1.5000
r (lower-pile rate)
2.5000
s = r + 1
1.0667
1/r + 1/(r+1)
drag · gaps and collisions both vanish only at r = φ
Live check — recomputed in your browser, now
· solving the board by retrograde game analysis… · comparing to the golden-ratio formula… · testing the Beatty partition… · checking the forced identities…

The honest edges

Recomputed live, and checked offline first. The machine in Instrument I does not consult a formula to play: it solves the board the hard way, by retrograde analysis: starting from the corner and working outward, every square is labelled cold or hot purely by the game's own rules (a square is cold exactly when no move escapes to another cold square). Only afterwards do we overlay the golden-ratio formula and find the two agree on every square. The Beatty partition and the forced identity r²=r+1 are likewise rechecked above as you watch. All of it is independently proven in /research/wythoffs-game/verify.mjs (12/12): the brute-force cold positions equal (⌊nφ⌋,⌊nφ²⌋) and equal the classical mex construction; the two sequences partition 1…100,000 with zero gaps and zero collisions; the integer floors are proven exact against square-root bounds (no floating-point slack); the first 25 terms match OEIS A000201 and A001950, fetched from the catalogue when this page was written and hardcoded in verify.mjs; and the Sprague–Grundy value is zero on exactly the cold positions.

What is and isn't claimed. "The golden ratio wins" is shorthand: φ describes the losing positions, and the winning strategy is to always hand your opponent one of them. The strategy is perfect under normal play (last to move wins) for this specific move-set; change the rules (misère play, a third pile, a bound on how much you may take) and the clean golden structure can break. The dial in Instrument III shows the tiling condition geometrically; it is a faithful illustration of the algebra 1/r+1/(r+1)=1 ⟹ r=φ, not an independent proof of Beatty's theorem (which is cited). And φ here is the same φ that is the "most irrational" number, the one hardest to approximate by fractions. That property is not what makes the two sequences leave no integer behind: Beatty's theorem partitions the integers for any irrational pair with 1/r + 1/s = 1. What singles out φ is the diagonal move, which pins s = r + 1.

Sources. W. A. Wythoff, “A modification of the game of Nim,” Nieuw Archief voor Wiskunde (2) 7:199–202, 1907 (the game and its golden-ratio solution). Lord Rayleigh (J. W. Strutt), The Theory of Sound, vol. 1, 2nd ed., Macmillan, 1894, p. 123 (the complementary-sequence statement). S. Beatty, problem 3173, American Mathematical Monthly 33:159, 1926, with solutions ibid. 34:159–160, 1927 (whence “Beatty sequences”). H. S. M. Coxeter, “The golden section, phyllotaxis, and Wythoff's game,” Scripta Mathematica 19:135–143, 1953. A. S. Fraenkel, “How to Beat Your Wythoff Games' Opponent on Three Fronts,” Amer. Math. Monthly 89:353–361, 1982. OEIS sequences A000201 (lower Wythoff) and A001950 (upper Wythoff), values verified against their b-files. The floor identity ⌊nφ²⌋ = ⌊nφ⌋ + n and the partition follow from φ²=φ+1 and Beatty's theorem.

Corrected 2026-09-28 (claims pass): the page said the machine "will not lose" and "never loses"; each new game starts the player on a hot square, from which a player who always moves to a cold square wins, so it now says the machine plays perfectly and can be beaten from there. It said the losing positions "fall exactly on two lines" whose slope is φ, "not approximately"; they are the integer points (⌊nφ⌋, ⌊nφ²⌋) and their mirror images, each within one step of rays of slope φ and 1/φ, and it now says so. It called φ being the most irrational number "the deep reason" no integer is left behind; Beatty's theorem does that for any irrational pair with 1/r + 1/s = 1, and what forces φ is the diagonal move. And it said the OEIS terms in the check were "fetched from the catalogue"; they were fetched when the page was written and are hardcoded in verify.mjs.