The arrow will automatically traverse through the maze and make all the correct turns and movements to get to the red square. Each time the arrow reaches a green square, or a Checkpoint, it's logic will change to path better.
PROG 4.6