Nim game XL origin

Nim games are strategy games for two players which belong to the category of games that mathematicians call "impartial gamesfor which we can define a winning strategy by calculation. The general principle of these games is to start with a number of heaps (or rows) of objects (objects can be matches, tokens, coins ... and why not bricks ...), each player in turn must take one or more objects in one heap, and until there are no more objects...

When I realized the program Marienbad, which is a Nim game, I had documented on Nim games and the availability of Nim games programs for Android.

Having found that the Android offer was very limited, few programs with fixed configurations, most with a single heap, I got the idea to make a program that would allow a wide variety of Nim games, since the simpler with only one heap, via mean games with some heaps, and up to complex games with a dozen or a few dozen heaps. This program is "Nim Game XL".

This program makes it possible to choose the number of heaps (1 to 99), the number of objects per heap (1 to 999), the end-game option ("normale" or "misère"), and maximum number of objects that one can remove at each stroke (it is essential to limit it with a single heap, with several heaps is an additional complexity and can be put to a number greater than the number of objects of the larger heap to avoid it).

The origins of the Nim games are probably very old. The first traces are reported in China and Africa, and the first references in Europe are reported to the 16th century. The present name was given by the English mathematician Charles Leonard Bouton in 1901 which found an algorithm for the gain. In 1951, a computer, the Nimrod was built, dedicated solely to its resolution. Many theoretical studies have been made since in the context of combinatorial game theory.

In the classic version of the game, which is only used today in the Nim Game XL program, we have a fixed number of heaps and we can take objects in any heap within a specified limit. Note that there are many variations where such rules are modified, for example:

    • Wythoff game, you can also remove the same number of objects of all heaps,
    • Circular Nim, the objects in a circle and you can only remove adjacent objects,
    • Grundy game, you can divide a heap into two heaps with objects in both,
    • Greedy Nim, you can only take objects in the larger pile.