Line maze solving robot

  • Does anyone know how to solve line mazes(Line mazes with no loops)?
  • Can anyone helps me for the code for 8 ir sensors?

Example for a line maze:

This is the array with 8 TCRT5000 sensors and the Robot made my me :


I think you need the following:

Follow a line.
Detect the end of a line and turn around.
Detect a choice and turn a direction, always the same direction, left or right.

There is a large block at one end. Is that the termination? It would be nice to be able to detect the termination and stop.

And if it were me, I would detect the termination and do a victory dance.