How it was found

A golden ratio thirty years early

Wythoff described the losing positions of his game in 1907 with an argument about partitions of the integers, and no Grundy value anywhere in it. The theory that arrived thirty years later computes the same positions — and has never produced a closed form for the values, which the older argument had for the zeros from the start.

Assumes: Wythoff's game, and the ratio nobody put there · Every impartial game is a Nim heap

Willem Abraham Wythoff published his game in 1907. A queen sits on a quarter-infinite chessboard and may move any distance left, any distance down, or any distance diagonally toward the corner. Whoever cannot move — because the queen has reached the corner — loses.

He also published the losing positions, exactly, in closed form. They are the pairs

(nφ, nφ2),n=1,2,3,(\lfloor n\varphi \rfloor,\ \lfloor n\varphi^2 \rfloor), \qquad n = 1, 2, 3, \ldots

where φ=(1+5)/2\varphi = (1+\sqrt5)/2 is the golden ratio.

Nothing in the rules of the game contains a continuous quantity, an irrational number, or any geometry beyond a square lattice. The golden ratio has no business being there, and it is.

A golden ratio in a table that never mentions it. Grundy values for Wythoff's game, computed by the mex rule alone — a queen moving left, down or diagonally toward the corner, and whoever cannot move loses. The circles are Wythoff's 1907 description of the losing positions, which came thirty years before any of this machinery: the pairs formed from the golden ratio. They land on the zeros exactly. Nothing in the computation knows about φ and nothing in Wythoff's argument knows about Grundy values.
Fig. 1 The Grundy values of the game, computed by the mex rule alone — no φ anywhere in the computation. The circles are Wythoff’s 1907 description of the losing positions. They land on the zeros exactly, and the two arguments have nothing in common.

The older argument, which is about counting

Wythoff’s derivation does not compute anything about the game position by position. It works like this.

The losing positions, whatever they are, must have a property: no move connects two of them, and from every other position some move reaches one. Suppose they can be listed as pairs (an,bn)(a_n, b_n) with an<bna_n < b_n and ana_n increasing. Then two things must hold.

Each ana_n is the smallest number not yet used, because if some number kk were missing from every pair, the position (k,k)(k, k) would have a diagonal move to the corner and could not be a loss, so kk must appear — and if it appeared as some bmb_m with am<ka_m < k then… the argument continues in this vein and pins down the pairs completely.

The difference bnanb_n - a_n is exactly nn. From (an,bn)(a_n, b_n) a diagonal move subtracts the same amount from both, so it preserves the difference; the losing positions must therefore have all differences distinct, and being greedy about it forces bnan=nb_n - a_n = n.

Those two conditions determine the pairs, and Beatty’s theorem turns them into the formula: the two sequences nα\lfloor n\alpha \rfloor and nβ\lfloor n\beta \rfloor partition the positive integers exactly when α\alpha and β\beta are irrational with 1/α+1/β=11/\alpha + 1/\beta = 1. Requiring β=α+1\beta = \alpha + 1 to make the differences come out right gives α2=α+1\alpha^2 = \alpha + 1, which is the defining equation of φ\varphi.

That is where the golden ratio enters: as the solution of a quadratic that a partition condition produced. Not from a spiral, not from a rectangle, not from anything with a shape. The identity φ2=φ+1\varphi^2 = \varphi + 1 is doing all the work, and it arrives here as a constraint the game imposed rather than as a property anybody went looking for.

What happens with the wrong constant. Wythoff's construction run with six constants instead of one. The pairs (⌊nα⌋, ⌊nα²⌋) are compared with the Grundy table's cold squares on a board of 60. The golden ratio lands on a cold square every one of its 23 times; the silver ratio 1+√2 misses on its very first pair, and the Fibonacci ratios 8/5, 13/8 and 21/13 agree for four, seven and twelve pairs before failing. A near-miss surviving twelve pairs is why a finite picture cannot establish the slope.
Fig. 2 The same construction run with five other constants, which is the way to see that φ was not chosen. Only φ puts all twenty-three of its pairs on cold squares. 1 + √2 — a quadratic irrational of the same kind — misses at the very first pair, at (2, 5), and the rational 3⁄2 does worse. The partition condition has one solution and the golden ratio is it.

The partition, checked

The Beatty claim is a statement about every positive integer, and it is the load-bearing step, so it is checked here rather than cited.

Taking the first ten pairs generates the numbers 1, 3, 4, 6, 8, 9, 11, 12, 14, 16 from the first sequence and 2, 5, 7, 10, 13, 15, 18, 20, 23, 26 from the second. Every integer from 1 to 16 appears exactly once across the two; nothing is duplicated and nothing is missing.

The bound matters and is worth saying why. Coverage is complete only up to the largest member of the slower sequence, which is 16, not up to the largest number generated at all, which is 26 — the partners of 17, 19, 21 and the rest have not been generated yet. Checking to the wrong bound reports a true theorem as broken, which is what happened the first time this check was written.

The two sequences, and every integer once. The integers from one to 26, each coloured by which of Wythoff's two sequences claims it: gold for the smaller coordinates of the cold pairs and magenta for the larger. Every integer up to 16 is claimed exactly once, which is the partition Wythoff's 1907 argument needs. Above that bound the check stops on purpose, because the numbers 18, 20, 23, 26 have been generated and the integers that would pair with them have not.
Fig. 3 The two sequences on one number line, with the checked region marked. Each integer carries exactly one mark, and the densities of the two are 0.6180 and 0.3820 — which sum to one, because 1/φ + 1/φ² = 1 is the partition condition itself, read as a statement about how often each sequence lands.

Why the greedy construction is forced

The two conditions above look like choices and they are not, and it is worth being precise about that, because “the losing positions are whatever this greedy procedure produces” is unsatisfying until it is clear no other set could have worked.

The set of losing positions of any finite impartial game is determined — it is the set of positions from which every move leads to a win, computed bottom-up — so there is nothing to choose. What the greedy construction does is describe that set, and the description is forced by two facts about the moves.

Every integer must appear as a coordinate of some losing pair. If some kk appeared in none, consider the position (k,k)(k, k): it is a losing position or it is not. It has a diagonal move to the corner, so it is a win; fine. But now consider the smallest such missing kk and the position (k,m)(k, m) for large mm — a horizontal move from it can only change mm, and no choice of mm reaches a losing pair with first coordinate kk, since there is none. So (k,m)(k, m) is a loss for every large mm, which contradicts the fact that losing positions have distinct differences.

And the differences must be distinct. Two losing pairs with the same difference lie on one diagonal, and the diagonal move connects them — but no move may connect two losing positions, because then the player facing one could move to the other and hand the loss back.

Those two together leave exactly one candidate set, and the greedy listing produces it. The formula is then a description of that listing rather than an independent claim.

The greedy construction, and why it is not a choice. The first 10 cold pairs of Wythoff's game beside the two conditions that produce them: the smaller coordinate is the least integer no earlier pair has used, and the difference between the two coordinates is the index of the pair. Both are checked against the pairs the golden-ratio formula gives, and a disagreement in either column stops the figure drawing.
Fig. 4 The listing built greedily, one row at a time: the first coordinate is the least integer not yet used and the difference is the row number, and neither column ever offers a choice. Nothing here consults the golden ratio, or any continuous quantity at all — the pairs come out of take the smallest thing left, and the formula is a closed form for what that procedure produces.

The newer argument, which is about the position

The Sprague–Grundy machinery answers a different and larger question. It assigns every position a value, not merely a label, and the value says which Nim heap the position is equivalent to inside any sum.

Running it on Wythoff’s game is mechanical: the value of a position is the mex of the values of everything reachable from it. Nothing about φ is involved and nothing about φ comes out. The zeros land where Wythoff said they would — the hero figure checks that they do, over the whole table drawn — and the rest of the table is the extra information the newer method provides.

A golden ratio in a table that never mentions it. Grundy values for Wythoff's game, computed by the mex rule alone — a queen moving left, down or diagonally toward the corner, and whoever cannot move loses. The circles are Wythoff's 1907 description of the losing positions, which came thirty years before any of this machinery: the pairs formed from the golden ratio. They land on the zeros exactly. Nothing in the computation knows about φ and nothing in Wythoff's argument knows about Grundy values.
Fig. 5 The same agreement in a smaller window, at different parameters, as a check that the first figure’s agreement is not an artefact of where the table stopped.

And here the older method wins

The interesting comparison is not that both find the zeros. It is what each can say about everything else.

Wythoff’s argument gives a closed form for the losing positions and says nothing about any other position. Ask it whether the position (4, 9) is equivalent to a Nim heap of 3 or of 7 and it has no opinion; it was never about that.

The Grundy table gives a value for every position and has no closed form for any of them. No formula for its entries is known, and no row of it is periodic — which is a claim worth drawing rather than asserting, since periodicity is the one property that would make a table as good as a formula.

The zeros have a closed form and the values have none. The first rows of Wythoff's Grundy table on a board of 14, each searched for a period. None of them has one, and no formula for an arbitrary entry is known. That is the half of the comparison the older argument wins: it gives the losing positions in closed form and the newer machinery, which gives a value for every position, has no closed form for any of them.
Fig. 6 Each row of the table with its first twelve values and the shortest period found in it. Row 0 is the identity, 0 1 2 3 …, and even that is not periodic; every row below it is a scramble with no period found at all. That is the difference a closed form makes: the pairs have one and the values do not, so the table is the whole of what is available for every position that is not cold.

The table being unperiodic puts it in the same position as the Grundy sequences that have never settled, and for what may be the same reason.

So there is a question the 1907 argument answers exactly and the 1935 machinery does not answer at all: what are the losing positions, in closed form? And there is a question the newer machinery answers and the older does not: what is this position worth in a sum?

Grundy values for subtraction of 1, 2. The Grundy value of every heap size for a take-away game, computed by the mex rule. A period, if the figure marks one, was found by searching the computed sequence rather than assumed — and where no period is marked, none was found in the range drawn, which is not the same as there being none.
Fig. 7 For contrast, a game whose Grundy values do have a closed form and a period. Wythoff’s do not, and the difference is not that anybody has tried harder in one case than the other.

The lesson generalises past this game, and it is the reason this field exists. A more powerful method is more powerful at the question it was built for. It does not inherit the answers of the methods it replaced, and the older answer can outlive the framework that produced it.

The surprise: the game is a sum in disguise, and that is why φ appears

Here is a way of seeing the golden ratio that makes it slightly less arbitrary, and it is worth the paragraph.

Wythoff’s game is Nim with two heaps, plus one extra move: take the same amount from both. Without the extra move the losing positions are the pairs (k,k)(k, k)Bouton’s criterion, or just mirroring. The extra move destroys exactly those, because from (k,k)(k,k) the diagonal reaches the corner.

So the losing positions have to be re-chosen so that no diagonal connects two of them, which means all their differences must be distinct, which means the nn-th pair has difference nn, which is a growth condition. A set of pairs whose differences grow linearly and whose first coordinates take every unused integer is forced to have a density, and the density is forced to be irrational — because a rational one would repeat and produce a coincidence in the differences.

The golden ratio is what an irrational density that is forced to be as far from rational as possible looks like. That is not a proof, and the proof is the Beatty argument above, but it is the reason a reader should not feel the answer came from nowhere.

What the picture cannot show

The board figures here are finite windows on a quarter-infinite board, and there is one thing no window can convey.

The two rays never fall into step. They leave the corner at slopes φ\varphi and φ2\varphi^2, and because those are irrational the pattern of cold squares never repeats in any direction — not along a row, not along a column, not along a diagonal. A finite picture looks like it might be about to settle into a pattern, and it never will.

That is not a limitation of the drawing so much as the fact the drawing is about, and it is why every claim in this essay about the table is bounded by the range computed while the claim about the formula is not.

There is a second thing the picture hides, and it is more practical. The cells drawn here are small values — 0, 1, 2, 3 — and the table’s values grow without bound as the board does. A reader looking at a 14 × 14 window would reasonably guess the values stay small. They do not, and no window of any size would show otherwise.

A larger window makes the point by not making any: at sixteen squares on a side the picture is the same picture, and two irrational slopes look, at every scale, like they are about to become rational. That is why the section above runs the construction against other constants instead — a wrong constant is caught by one pair landing off a cold square, and no amount of looking at a bigger board catches anything at all.

Where the model stops

Two limits, and both are about the table rather than the formula.

The table is computed, so it is finite. Every claim made here about the Grundy values holds over the range drawn and is not a claim about the game. That the values have no period is a statement about a search finding none, not about none existing — the same distinction the octal survey is built on.

And the formula’s exactness has a floating-point caveat. nφ\lfloor n\varphi \rfloor for large nn is a floor of an irrational multiple, and a double eventually gets one wrong. The values here are small enough that it does not arise, and the agreement check would catch it if it did, because a mis-floored pair would land on a non-zero cell.

Who found it, and when

There is one more comparison worth making, because it puts the two methods’ costs side by side rather than only their answers.

Deciding whether a given position is cold takes, by the formula, one multiplication and one floor: work independent of the size of the numbers, once the arithmetic is done. Deciding the same thing from the table takes the whole table below that position, which is quadratic in the coordinates. For a position at (10⁶, 1.6 × 10⁶) the formula answers immediately and the table is not going to be built.

One node per route, one node per position. For each board, the number of nodes in the recursion tree a solver with no memo table would walk, beside the number of distinct positions that tree contains, beside the longest run of moves in it. The first number is the cost of forgetting; the second is the size of the table that avoids it; the third is the stack, and it stays small however the other two grow.
Fig. 8 What computing a table costs, for comparison. Wythoff’s formula is not on this chart at all, because it does no search — which is the practical form of the difference between a closed form and a computation, and the reason a closed form is worth having even when a computation is available.

Wythoff was a Dutch mathematician; the game appeared in Nieuw Archief voor Wiskunde in 1907. The game is older than his paper — a version of it was played in China as tsyanshidzi, picking stones — and what he contributed is the solution rather than the rules.

Sam Beatty’s theorem, which supplies the partition, dates from 1926: nineteen years after Wythoff used the fact it states. Wythoff proved what he needed directly.

It is also worth noting what Wythoff did not claim. He described the losing positions and did not claim the game was interesting for any other reason, did not connect it to Nim in the modern sense, and had no framework in which “this game is equivalent to that one” would have been a statement. The connection to Nim as a sum — Wythoff’s game being two heaps with a coupling move — is a modern reading of it.

That ordering is a small pleasure and a real point. The tools this argument is now taught with arrived after the argument, and a modern account that presents Wythoff’s result as an application of Beatty’s theorem has the history precisely backwards — which is the sort of inversion this field exists to catch.

What an irrational constant in a finite game means

A game with finitely many positions at every size cannot have an irrational answer, and it is worth being exact about how one turns up anyway, because the resolution says what the constant is doing.

Every question about a fixed Wythoff position has a finite answer: the position is cold or it is not, and a search settles it. Nothing irrational can appear in any individual verdict. What ϕ\phi describes is the asymptotic distribution of the cold positions — where the nn-th one sits as nn grows — and an asymptotic density is exactly the kind of quantity that can be irrational while every term of the sequence is an integer.

That is the general shape and it is worth recognising, because it recurs. A constant appearing in a game’s analysis is nearly always a statement about a sequence of positions rather than about any position, and the sequence is usually generated by a linear recurrence. Linear recurrences have irrational growth rates for algebraic reasons that have nothing to do with games, and the constant is inherited rather than discovered.

So the right reading of “the golden ratio appears in Wythoff’s game” is that the cold positions are generated by a Fibonacci-like recurrence, and ϕ\phi is that recurrence’s growth rate. The mystery is entirely in why the recurrence is the one it is, and that question has a combinatorial answer with no irrational number in it.

The habit worth carrying is to ask, of any constant in this subject, what sequence it is the growth rate of. If the answer is the losing positions in size order, the constant is describing them and not explaining them — and the explanation, when it arrives, is usually about digits.

The same shape, elsewhere in the subject

Wythoff is the clearest case of an older description outliving the framework that replaced it, and it is not the only one.

Bouton’s criterion for Nim is a closed form for the losing positions of a game, found before there were values, and it is still how anybody actually decides a Nim position — nobody computes Grundy values to play Nim. The Sprague–Grundy theorem explains why Bouton’s criterion works and does not improve on it.

Green Hackenbush is the reverse case and is worth the contrast: there the structural principles — fusion, and the colon principle — genuinely replace the search, and the older way of getting the answer was to play it out. Sometimes the newer machinery does inherit and improve the old answers.

What separates the two is whether the question the old method answered is the question the new method was built for. Sprague and Grundy were building a theory of sums, and the losing positions of one game are a by-product of it. Wythoff was building a description of one game’s losing positions, and there is no reason a theory of sums should improve on it.

One number that is worth stating

The two sequences have densities 1/φ0.6181/\varphi \approx 0.618 and 1/φ20.3821/\varphi^2 \approx 0.382, and those add to exactly 1 — which is the Beatty condition and is what makes them a partition rather than a pair of sequences that happen not to collide in the range anybody checked.

That the condition is an equality rather than an inequality is the reason the result is exact. A pair of sequences whose densities summed to slightly less than one would leave gaps at unpredictable places, and there would be no closed form for the cold positions at all.

Where the ladder goes next

The wythoff anchor has two rungs to here: the game, and the constant that turns up in its cold positions thirty years before anybody was looking for it.

The rung above changes what the answer is written in, and the change is worth more than a restatement. The digits say which move wins drops the golden-ratio formulas entirely and writes the cold positions in Fibonacci base: the smaller heap ends in an even number of zeros, and the larger is the same numeral shifted up one place.

Two things follow that the closed form does not give. The first is that the condition becomes checkable by inspection rather than by arithmetic on an irrational number — no floating point, no rounding, no question about which side of a boundary a large heap falls on. A rule about digits answers a question about a heap of a trillion, and a rule about ϕ\phi answers it only as accurately as the arithmetic is carried out.

The second is that the digits say which move wins, which the formulas do not. A pair of Beatty sequences tells a player whether a position is cold; it does not name the move that reaches the nearest cold position, and the numeral does, because the operation on the digits is visible.

That is the same trade this site keeps finding and it is worth naming here. The golden ratio is the description and the numeral is the mechanism, and a constant that appears in a description is evidence about the description rather than about the game. The reason ϕ\phi turns up in Wythoff’s game is that Fibonacci numerals are what the move rule is doing — which is a much less mysterious statement than the one the constant invites.

Part 2 of 4

One argument about Wythoff's game. The parts either side of it:

What links here

Essays that reach for this one mid-argument — the half of a link its own author cannot write down, the 8 sharing most with it of 11.

What this makes readable

Essays that declare this one a prerequisite.

The objects named here

The third axis, after the field and the series: the games, values and theorems themselves, and every essay that touches each one.

Beatty sequenceClosed formExhaustive searchGolden ratioGrundy valueImpartialMexNimPartitionPeriodicityWythoff's game