Zakaria Laabsi

Notes on AI, cryptography & mathematics

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.

March 30, 2026 · 24 min · Zakaria Laabsi