Impartial Combinatorial Game Theory: From Nim to Sprague-Grundy
Every impartial combinatorial game reduces to a single XOR computation. This post walks through the full theory — from Nim to the Sprague-Grundy theorem — with proofs, examples, and code.