Nim-sums and Grundy numbers
Use the dummy size as a binary number, and if the XOR one nymth is lost to 0 in each seat — if you put the number of nym sums to 0, you will always take the last stone.
- Category
- Game AI
Technical terms · Nim-sum (bitwise XOR) · Bouton’s theorem · Sprague–Grundy number