Groups
Category
Nim is a two-player impartial game with several piles where a move removes any positive number of stones from exactly one pile.
SpragueโGrundy (SG) theory solves impartial, normal-play, terminating games by assigning each position a nonnegative integer called its Grundy value.