We initiate a general theory for analyzing the complexity of motion planning
of a single robot through a graph of “gadgets”, each with their
own state, set of locations, and allowed traversals between locations that can
depend on and change the state. This type of setup is common to many robot
motion planning hardness proofs. We characterize the complexity for a natural
simple case: each gadget connects up to four locations in a perfect matching
(but each direction can be traversable or not in the current state), has one
or two states, every gadget traversal is immediately undoable, and that gadget
locations are connected by an always-traversable forest, possibly restricted
to avoid crossings in the plane. Specifically, we show that any single
nontrivial four-location two-state gadget type is enough for motion planning
to become PSPACE-complete, while any set of simpler gadgets (effectively
two-location or one-state) has a polynomial-time motion planning algorithm.
As a sample application, our results show that motion planning games with
“spinners” are PSPACE-complete, establishing a new hard aspect of
Zelda: Oracle of Seasons.