Impartial Combinatorial Game Theory: From Nim to Sprague-GrundyEvery 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.