Use some libraries.
Location should be move-sensitive.
Trivial plan-route
Current-location
Let's use a stack.
Update the agent.
Location actually works.