Jump to content

Wythoff's game

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 198.7.247.226 (talk) at 22:15, 13 May 2015. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Wythoff's game is a two-player mathematical game of strategy, played with two piles of counters. Players take turns removing counters from one or both piles; in the latter case, the numbers of counters removed from each pile must be equal. The game ends when one person removes the last counter or counters, thus winning.

Martin Gardner claims that the game was played in China under the name 捡石子 jiǎn shízǐ ("picking stones").[1] The Dutch mathematician W. A. Wythoff published a mathematical analysis of the game in 1907.

A visualization of Wythoff's game of Nim
A visualization of Wythoff's game of Nim

Optimal strategy

Any position in the game can be described by a pair of integers (n, m) with n ≤ m, describing the size of both piles in the position. The strategy of the game revolves around cold positions and hot positions: in a cold position, the player whose turn it is to move will lose with best play, while in a hot position, the player whose turn it is to move will win with best play. The optimal strategy from a hot position is to move to any reachable cold position.

The classification of positions into hot and cold can be carried out recursively with the following three rules:

  1. (0,0) is a cold position.
  2. Any position from which a cold position can be reached in a single move is a hot position.
  3. If every move leads to a hot position, then a position is cold.

For instance, all positions of the form (0, m) and (m, m) with m > 0 are hot, by rule 2. However, the position (1,2) is cold, because the only positions that can be reached from it, (0,1), (0,2), and (1,1), are all hot. The cold positions (n, m) with the smallest values of n and m are (0, 0), (1, 2), (3, 5), (4, 7),(6,10) and (8, 13).

Formula for cold positions

Wythoff discovered that the cold positions follow a regular pattern determined by the golden ratio. Specifically, if k is any natural number and

where φ is the golden ratio and we are using the floor function, then (nk, mk) is the kth cold position. These two sequences of numbers are recorded in the Online Encyclopedia of Integer Sequences as OEISA000201 and OEISA001950, respectively.

The two sequences nk and mk are the Beatty sequences associated with the equation

As is true in general for pairs of Beatty sequences, these two sequences are complementary: each positive integer appears exactly once in either sequence.

See also

References

  • Weisstein, Eric W. "Wythoff's Game". MathWorld.