Solution (source code)

= Solution

Use independent choices with constant <probabilities> $p$ and $q=1-p$. Completing the entire reverse circuit while the forward-moving object never moves requires the first $F$ choices all to be reverse moves. Thus
$$
\boxed{P=q^F=(1-p)^F.}
$$
Here and below, a zero-length product is interpreted as one, including at $p=0$ or $p=1$.