Robot Program: The Spiral
Read the puzzle
On a 5 by 5 grid, number columns 1 to 5 from the left and rows 1 to 5 from the top. A robot starts at column 3, row 3, facing up. Lettered tiles: C at column 3, row 1; A at column 1, row 5; D at column 2, row 5; B at column 5, row 5. Program: forward, right, forward, forward, right, forward, forward, forward, right, forward, forward, forward, forward. Turns are on the spot, to its own right. Which tile does it stop on?
Straight arrow: 1 tile forward. Curved arrow: turn on the spot, to its own left or right. Which tile does it stop on?
Turns use the robot's own left and right, and a turn does not move it.
A
A spiral: up 1, right 2, down 3, left 4: tile A.
How to solve it
Step 1: group the commands between the turns. The 13 commands split into runs of forward moves: 1, then turn right, 2, turn right, 3, turn right, 4. That is 1 + 2 + 3 + 4 = 10 forward moves plus 3 turns.
Step 2: follow the spiral from column 3, row 3 facing up. Up 1: column 3, row 2. Turn right, now facing right; 2 forward: column 5, row 2. Turn right, now facing down; 3 forward: column 5, row 5. Turn right, now facing left; 4 forward: column 1, row 5.
Step 3: read the tile. The bottom row holds A in column 1, D in column 2 and B in column 5, so the robot stops on A.
The usual wrong answer is B or D. B is where the robot stands after the 3-step run, so it tempts anyone who loses count of the final 4 moves. D comes from moving 3 tiles left instead of 4. C tempts anyone who reads the first arrows as a straight run up.
The answer is A. Quick check: across, the robot goes right 2 and left 4, a net 2 to the left of column 3, which is column 1.