Nim is a mathematical strategy game. Players take turns removing any number of sticks from a single heap. You must remove at least one.
Normal: The player who takes the last stick wins.
Misère: The player who takes the last stick loses.
Strategy hint: The XOR (nim-sum) of all heap sizes determines the winning position. A nim-sum of 0 is losing for the player to move in normal play.