Jump to content

Wythoff's game: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Tags: AWB Reverted
No edit summary
Line 26: Line 26:
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), (1,0) 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). (sequence {{OEIS link|A066096}} and {{OEIS link|A090909}} in [[OEIS]]) (Also see {{oeis|A072061}})
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), (1,0) 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). (sequence {{OEIS link|A066096}} and {{OEIS link|A090909}} in [[OEIS]]) (Also see {{oeis|A072061}})


For [[Misère|misere game]] of this game, (0, 1) and (2, 2) are cold positions, and a position (''n'', ''m'') with ''m'', ''n'' > 2 is cold if and only if (''n'', ''m'') in normal game is cold.
For [[Misère|misere game]] of this game, (0, 1) and (2, 2) are cold positions, and a position (''n'', ''m'') with ''m'', ''n'' > 2 is cold if and only if (''n''−2, ''m''−2) in normal game is cold.


==Formula for cold positions==
==Formula for cold positions==
Line 37: Line 37:
:<math>\frac{1}{\phi} + \frac{1}{\phi^2} = 1 \,.</math>
:<math>\frac{1}{\phi} + \frac{1}{\phi^2} = 1 \,.</math>
As is true in general for pairs of Beatty sequences, these two sequences are [[complement (set theory)|complementary]]: each positive integer appears exactly once in either sequence.
As is true in general for pairs of Beatty sequences, these two sequences are [[complement (set theory)|complementary]]: each positive integer appears exactly once in either sequence.

==More than two piles==

Like [[Nim]], Wythoff's game can also be played with more than two piles of counters. Players take turns removing counters from one or more piles; when removing counters from more than one pile, the numbers of counters removed from each pile must be equal.

This is like the chess queen in [[three-dimensional chess]], when there are three piles. More generally, when there are ''n'' piles, this is like the chess queen in ''n''-dimensional chess.

For example, (1,1,3) and (1,2,3) are hot positions, since in these two positions a player can reach (0,1,2), which is a cold position. (1,1,4) and (1,3,3) are cold positions.


==See also==
==See also==
Line 49: Line 57:
==External links==
==External links==
*{{MathWorld|urlname=WythoffsGame|title=Wythoff's Game}}
*{{MathWorld|urlname=WythoffsGame|title=Wythoff's Game}}
* {{cite web|last1=Grime|first1=James|title=Wythoff's Game (Get Home)|url=https://www.youtube.com/watch?v=AYOB-6wyK_I |archive-url=https://ghostarchive.org/varchive/youtube/20211215/AYOB-6wyK_I |archive-date=2021-12-15 |url-status=live|website=YouTube|publisher=[[Brady Haran]]|accessdate=21 August 2017|format=video}}{{cbignore}}
* {{cite web|last1=Grime|first1=James|title=Wythoff's Game (Get Home)|url=https://www.youtube.com/watch?v=AYOB-6wyK_I|website=YouTube|publisher=[[Brady Haran]]|accessdate=21 August 2017|format=video}}


[[Category:Mathematical games]]
[[Category:Mathematical games]]
[[Category:Solved games]]

Revision as of 10:23, 29 December 2021

Wythoff's game is played with two piles of counters

Wythoff's game is a two-player mathematical subtraction game, played with two piles of counters. Players take turns removing counters from one or both piles; when removing counters from both piles, 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.

An equivalent description of the game is that a single chess queen is placed somewhere on a large grid of squares, and each player can move the queen towards the lower left corner of the grid: south, west, or southwest, any number of steps. The winner is the player who moves the queen into the corner.

Martin Gardner in his March 1977 "Mathematical Games column" in Scientific American 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.[2]

Optimal strategy

A visualization of Wythoff's game of Nim. The bottom leftmost square is position (1,1) and the red squares are cold positions. Note that the winning square is not included in the picture.

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 or the coordinates of the queen. 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), (1,0) 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). (sequence A066096 and A090909 in OEIS) (Also see OEISA072061)

For misere game of this game, (0, 1) and (2, 2) are cold positions, and a position (n, m) with mn > 2 is cold if and only if (n−2, m−2) in normal game is cold.

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.

More than two piles

Like Nim, Wythoff's game can also be played with more than two piles of counters. Players take turns removing counters from one or more piles; when removing counters from more than one pile, the numbers of counters removed from each pile must be equal.

This is like the chess queen in three-dimensional chess, when there are three piles. More generally, when there are n piles, this is like the chess queen in n-dimensional chess.

For example, (1,1,3) and (1,2,3) are hot positions, since in these two positions a player can reach (0,1,2), which is a cold position. (1,1,4) and (1,3,3) are cold positions.

See also

References

  1. ^ Wythoff's game at Cut-the-knot, quoting Martin Gardner's book Penrose Tiles to Trapdoor Ciphers
  2. ^ Wythoff, W. A. (1907), "A modification of the game of nim", Nieuw Archief voor Wiskunde, 7 (2): 199–202