Sprague-Grundy theorem
The
Sprague-Grundy theory of games is a theory of certain classes of
games called impartial games, developed by R. P. Sprague and P. M. Grundy. It was originally developed for the game of
nim.
It has been developed further by E. R. Berlekamp, John Horton Conway and others, and these developments are presented in the books Winning Ways for your Mathematical Plays and On Numbers and Games.