Page 175 - Introduction to AI Robotics
P. 175
158
5 Designing a Reactive Implementation
Using the Unified Modeling Language representation, 55 the Schema and
Behavior classes look like Fig. 5.1. The OOP organization allows a behavior
to be composed of multiple perceptual schema and motor schema and even
behaviors. Another way of stating this is that the definition of a behavior is
recursive. Why is it useful to have multiple perceptual schema and motor
schema? In some cases, it might be helpful to have two perceptual schema,
one for say daylight conditions using a TV camera and one for nighttime
using infra-red. Sec. 5.2.2 provides a more detailed example of why multiple
schemas in a behavior can be helpful.
PRIMITIVE BEHAVIOR Recall that a primitive behavior is composed of only one perceptual schema
and one motor schema; there is no need to have any coordinated control
program. Primitive behaviors can be thought of being monolithic, where they
do only one (“mono”) thing. Because they are usually a simple mapping
from stimulus to response, they are often programmed as a single method,
not composed from multiple methods or objects. The concept of Perceptual
and Motor Schema is there, but hidden for the sake of implementation.
Behaviors which are assembled from other behaviors or have multiple
ABSTRACT BEHAVIORS perceptual schema and motor schema will be referred to as abstract behav-
iors, because they are farther removed from the sensors and actuators than
a primitive behavior. The use of the term “abstract behavior” should not be
confused with an abstract class in OOP.
5.2.1 Example: A primitive move-to-goal behavior
This example shows how a primitive behavior can be designed using OOP
principles. In 1994, the annual AAAI Mobile Robot Competitions had a “Pick
Up the Trash” event, which was repeated in 1995 at the joint AAAI-IJCAI
Mobile Robot Competition. 129;66 The basic idea was for a robot to be placed
in an empty arena about the size of an office. The arena would have Coca-
Cola cans and white Styrofoam cups placed at random locations. In two
of the four corners, there would be a blue recycling bin; in the other two,
a different colored trash bin. The robot who picked up the most trash and
placed them in the correct bin in the allotted time was the winner. In most
years, the strategy was to find and recycle the Coca-Cola cans first, because
it was easier for the robot’s vision processing algorithms to perceive red and
blue.
One of the most basic behaviors needed for picking up a red soda can and
moving to a blue bin is move_to_goal. When the robot sees a red can, it
must move to it. When it has a can, it must find and then move to a blue bin.