Page 202 - Introduction to AI Robotics
P. 202
5.5 Assemblages of Behaviors
Script Collection of Behaviors Example 185
Goal Task pick up and throw away a Coca-Cola can
Places Applicability an empty arena
Actors Behaviors WANDER_FOR_GOAL, MOVE_TO_GOAL,
GRAB_TRASH, DROP_TRASH
Props, Cues Percepts red, blue
Causal Chain Sequence of Behaviors WANDER_FOR_GOAL(TRASH), MOVE_TO_GOAL(TRASH),
GRAB_TRASH,WANDER_FOR_GOAL(TRASH CAN),
MOVE_TO_GOAL(TRASH CAN), DROP_TRASH
Subscripts Exception Handling if have trash and drop, try GRAB_TRASH three times
Figure 5.13 Comparison of script structures to behaviors.
iors. They encourage the designer to think of the robot and the task literally
in terms of a screenplay. Scripts were originally used in natural language
processing (NLP) to help the audience (a computer) understand actors (peo-
ple talking to the computer or writing summaries of what they did). 123 In the
case of robots, scripts can be used more literally, where the actors are robots
reading the script. The script has more room for improvization though, if the
robot encounters an unexpected condition (an exception), the robot begins
SUB-SCRIPT following a sub-script.
Fig. 5.13 shows how elements of an actor’s script compares to a robot
CAUSAL CHAIN script. The main sequence of events is called a causal chain. The causal chain
is critical, because it embodies the coordination control program logic just as
a FSA does. It can be implemented in the same way. In NLP, scripts allow
the computer to keep up with a conversation that may be abbreviated. For
example, consider a computer trying to read and translate a book where the
main character has stopped in a restaurant. Good writers often eliminate all
the details of an event to concentrate on the ones that matter. This missing,
but implied, information is easy to extract. Suppose the book started with
“John ordered lobster.” This is a clue that serves as an index into the cur-
rent or relevant event of the script (eating at a restaurant), skipping over past
events (John arrived at the restaurant, John got a menu, etc.). They also focus
the system’s attention on the next likely event (look for a phrase that indi-
cates John has placed an order), so the computer can instantiate the function
which looks for this event. If the next sentence is “Armand brought out the
lobster and refilled the white wine,” the computer can infer that Armand is
the waiter and that John had previously ordered and received white wine,
without having been explicitly told.