Introduction
The Sprague-Grundy theorem says that every finite impartial normal-play game position is equivalent to a Nim pile of some size. That size is its Grundy number.
Once Grundy numbers are known, independent games combine with xor exactly like Nim piles.
Problem or motivation
We are given a directed acyclic graph. A token on vertex may move along any outgoing edge. Players alternate moving exactly one of several tokens. A player with no legal move loses.
Determine whether the starting collection of token positions is winning.
Each vertex is one game state. Several tokens form the disjoint sum of those games.
Core concept
The Grundy number of a state is