Cycle detection (source code)

= Cycle detection

Determine whether repeated deterministic updates revisit a state, and optionally find the preperiod and cycle length. Recording all visited states uses memory proportional to the visited orbit. <Floyd's cycle-finding algorithm> detects repetition with constant extra memory.