*** Welcome to piglix ***

Octal games


The octal games are a class of two-player games that involve removing tokens (game pieces or stones) from heaps of tokens. They have been studied in combinatorial game theory as a generalization of Nim, Kayles, and similar games.

Octal games are impartial meaning that every move available to one player is also available to the other player. They differ from each other in the numbers of tokens that may be removed in a single move, and (depending on this number) whether it is allowed to remove an entire heap, reduce the size of a heap, or split a heap into two heaps. These rule variations may be described compactly by a coding system using octal numerals.

An octal game is played with tokens divided into heaps. Two players take turns moving until no moves are possible. Every move consists of selecting just one of the heaps, and either

Heaps other than the selected heap remain unchanged. The last player to move wins in normal play. The game may also be played in misère play, in which the last player to move loses.

Games played with heaps in this fashion, in which the allowed moves for each heap are determined by the original heap's size, are called Taking and Breaking games in the literature. Octal games are a subset of the taking and breaking games in which the allowed moves are determined by the number of tokens removed from the heap.

The octal code for a game is specified as

where the octal digit dn specifies whether the player is allowed to leave zero, one, or two heaps after removing n tokens from a heap. The digit dn is the sum of

Zero tokens are not counted as a heap. Thus the digit dn is odd if a heap of n tokens may be removed entirely, and even otherwise. The specification of one-heap results in dn applies to removing n tokens from a heap of more than n. The two-heap results in dn apply to removing n tokens from a heap of at least n+2, and separating the remainder into two nonempty heaps.

Octal games may allow splitting a heap into two parts without removing any tokens, by use of the digit 4 to the left of the decimal point. This is similar to the move in Grundy's game, which is to split a heap into two unequal parts. Standard octal game notation, however, does not have the power to express the constraint of unequal parts.


...
Wikipedia

...