Reachability game (source code)

= Reachability game

A turn-based game on a <directed graph> in which a player tries to force a designated target set. Its winning region is a least <fixed point>: add that player's <vertices> with some winning successor and the opponent's <vertices> with all successors winning. The finite-<graph> version uses the same construction as a <winning-position attractor in an infinite game>.

With disjoint terminal wins for two players and infinite plays valued as draws, compute both reachability attractors while keeping terminals fixed. Entry ranks give terminating <winning strategies>; positions outside both regions admit defence avoiding a forced loss. A cycle alone is not a certificate of a draw if it also offers a forceable winning exit.