Nim is a two-player zero-sum game with $n$ piles of pebbles. Players may take any number of pebbles from a single pile. The aim is either to win by taking all the pebbles in the last remaining pile (normal play) or alternatively to force that move upon your opponent (misere play).