Thanks to the next caching of processed states, we have to get every possible single-step state before we can add a new state, so the process to take a route and turn it into a sequence of states to start from would be:
Start at the first state.
Get all the next states from the current state.
Find the one that corresponds to the next history step in the route, remove it from the list.
Extend all the other states into the queue.
Record this state, then go back to step 1 using this state.
Thanks to the
next
caching of processed states, we have to get every possible single-step state before we can add a new state, so the process to take a route and turn it into a sequence of states to start from would be: