Our vehicle uses reflective phototransistors to follow a line on the ground beneath it. The state of the phototransistors is captured, and the car is controlled accordingly by an Atmel 8515 microcontroller. If the car detects a small deviation from the line, it will correct its path by steering in the appropriate direction. If it detects a large deviation, it will take more "drastic" measures to correct its path: it will back up while steering itself back towards the line until it re-centers itself. It then continues on its path.
The original objective for this project was to optimize the car for the speed with which it navigated the line. To do this, we would have increased the speed when little compensation was needed, and decreased the speed as more was needed. This optimization, however, did not require much more effort on our part than the heuristic outlined above. This is because the speed is mechanically regulated by the gradual acceleration of the car in balance with the direction reversal for large corrections.