The game of Nim
Four rows of 1, 3, 5 and 7 counters. Each turn you take as many as you like from one row only, and the last counter is poisoned.
You'll probably like these too
About this test
Nim is one of the few games whose complete solution is known, and we know who found it. In 1901 Charles Leonard Bouton, a mathematician at Harvard, published "Nim, a game with a complete mathematical theory" in the Annals of Mathematics, describing exactly which positions are winning and how to return to one on every move. The name of the game is his too.
Taking games of this kind circulated long before that, played with matchsticks or pebbles, and the four-row version with 1, 3, 5 and 7 became the most common. That is the one that appears in Alain Resnais' film "Last Year at Marienbad" in 1961, where one character wins it imperturbably — less mysterious than it looks, since the game can simply be calculated.
How it works
The counters sit in four rows of 1, 3, 5 and 7. On your turn you pick one row and remove as many counters from it as you want, from a single one up to the whole row, but never from two rows at once. You must take at least one. Whoever takes the last counter on the board loses the game: that is the so-called misère rule, and it is the one applied here.
The key comes down to one picture: think in pairs. Write each row as a sum of heaps of 1, 2 and 4 counters; if every heap can be matched with an identical one in another row, the player about to move is lost, because whatever they break the other player repairs on the far side. So your job on each move is to remove exactly enough to make everything match up again. One exception belongs to the misère version: once only single-counter rows are left, flip the instruction and leave your opponent an odd number of them.
This test is provided for entertainment purposes only. It is not a diagnosis or professional advice.