The Intuition Behind NIM and Grundy Numbers in Combinatorial Game Theory - Codeforces

Sprague-Grundy theorem. Nim