The visual routines are highly context dependent, and therefore need an enveloping construct to interpret their results. For example, the stop light detector assumes the lights are in a certain position when gaze is straight ahead, thus the stop light behavior has to enforce this constraint. To do this, the behaviors are implemented as finite state machines, presented in the figure below.