Jousting is one of the simplest state machines. The robot will accelerate with a tuneable speed to ensure that the head is stable, then continue forward at maximum speed. In this period, a control algorithm is used to ensure that the robot follows a black line straight across the arena without veering into walls.
A quick round-based decision was made in Attacking of whether to shoot balls at the opponent (when the opponents IR beacon was detected) or to save balls for the next round.
Lancing was controlled in a simple timed loop that raised and lowered the lance.