Move to Light program is a very simple example of this approach to programming. This program is made up of only three behaviors,
Move-forward is always active, it simply makes the robot move forward.
Move-to-Light is more important than
move-forward. When this behavior detects light in one the robots light sensors, it heads in that direction, overriding, or subsuming, the output of
move-from-bumps behavior is the most important. It checks the bump sensors and backs the robot away from any obstacles it runs into. When this behavior is active, it overrides the lower two.
However, when tasks become more complex, one set of behaviors isn't enough to get the job done. In order to make the robots more useful, you can have several hierarchies of behaviors and switch between depending on the situation. Each group of behaviors is called a mood.
With all these behaviors behaving and moods mooding, you can get some pretty interesting actions from very simple software. With a little practice, you can even get the robots to do what you want them to! (Yeah, right.)
So after the software for one robot is working, whats next? The Evolution of Antware