Physics and Astronomy

Robot - Follow That Line
ObjectiveTo develop algorithms and programs to have a pre-built Lego Mindstorms robot follow a line on the floor.
PurposeTo encourage and demonstrate creativity, algorithmic thinking, simple programming, and teamwork.
ParticipantsTeams of up to six

Supplied by the Judges
A Lego Mindstorms kit provided to the participants. This will consist of a robot pre-built for the designated task and an infrared tower used to beam programs to the robot.

- A CD containing the Robotics Invention System software used to write programs for the robots. This will be provided to the participants as well.

- A computer used to program the robot. This will need to be a PC running Microsoft Windows, with USB support to connect to the infrared tower.

large sheets of paper, tape, and black magic markers. The sheets of paper will be connected together with lines to follow by the time the participants arrive. Judges will also require a stop-watch and a measuring tape for judging purposes.

Supplied by the Teams


Each team will be given three attempts to program their robot to follow a curved black line drawn on sheets of paper connected together from start to finish within a certain time limit. Again, the time limit will be set depending on the length of the line and the space available. Between each attempt, the participants are allowed to fine tune the programming of the robot. Between attempts to follow the line, the judges on hand have the option to either produce a new line to follow, or reverse the direction of traversal in the maze to really test the following abilities of the robots. If different lines are given to teams to follow, the lines should be made to be approximately the same length.


Judging is based on distance travelled along the line from start to finish and/or the time taken to follow the line. The main score for a team is based on the total distance that the robot successfully follows the line for all three attempts. Because of the nature of the Lego sensors, each robot may deviate slightly from the curvature of the line and then reacquire the line and continue travelling along it. If it leaves the line for a great distance before finding the line again (more than 10 cm, for example), this distance will not be counted towards the total travelled. (We want to track the distance travelled along the line itself.) In the case of a tie, the total time taken to reach that distance is compared, with the less time taken earning the win.





Mike Katchabaw, Department of Computer Science, The University of Western Ontario

Main Lego Mindstorms Web Site: http://mindstorms.lego.com/
More details on system requirements can be found at:

These and other similar events have been successfully held by the Outreach committee of the Department of Computer Science.. They can accommodate a wide range of age groups and experience among participants. Typically, a brief tutorial is required before each event to teach participants about the basics of programming the Lego robots. The programming environment is graphical, and much like building Lego in itself, where programs are built by connecting together blocks that carry out different actions. The tutorial usually takes between 10-15 minutes of time.

Events | Location | Scheduling | Registration | Participants | Committee | Judges and Officials | Scoring | Awards | Media
Contact Us | Our Sponsors | Faculty of Science | Western

© 2001 The University of Western Ontario,
Department of Physics and Astronomy

Webmaster: Patrick Whippey
Site Design: Julie Whitehead