A robot starts at the origin pointing in some cardinal direction. Its only options are the following commands:
- drive forward 1 unit F
- turn left 90 degrees L
- turn right 90 degrees R
The command list is a sequence of these letters e.g. "FRFL" is forward 1, right turn, forward 1, left turn.
I want to find if the robot will stay within some circular boundary or if it will diverge if you repeat a sequence of commands forever. For the above example, it will not be bounded by a circle because FRFL/FRFL/FRFL/FRFL.... results in a staircase-like path going to infinity.
In thinking about this problem, I figured that if I had the initial position and orientation and the final position and orientation after 1 set of commands, then I could extrapolate that by repeating the transformation.
My questions are:
-Is the final (x,y,direction) after one set of commands the only thing needed to solve this (in other words, is this "path independent?") If so, how would I prove that it is path independent or not?
-What would be the minimum number of repeated chunks to guarantee an answer? My intuition says "4" because there are only 4 possible orientations, but I'm not sure...
-If there are other, simpler ways to solve this problem.