Information Technology Reference
In-Depth Information
Figure 9.2.
The monkey and bananas problem at the outset
9.1.2 A second example: The monkey and bananas
Now consider a second problem, first suggested by John McCarthy:
A monkey is in a room where a bunch of bananas is hanging from the ceiling,
too high to reach. In the corner of the room is a box, which is not under the
bananas. The box is sturdy enough to support the monkey if he climbs on it, and
light enough so that he can move it easily. If the box is under the bananas, and
the monkey is on the box, he will be high enough to reach the bananas.
The initial setup for this problem is sketched in figure 9.2. In this case, the moves
available to the monkey are described informally. The monkey can do the following:
Go to anywhere in the room (provided the monkey is not on the box).
Climb on the box (provided the monkey is at the box but not on it).
Climb off the box (provided the monkey is on the box).
Push the box anywhere (provided the monkey is at the box but not on it).
Grab the bananas (provided the monkey is on the box under the bananas).
Note the provisos for these actions. In thinking about how to solve this problem, one
needs to realize that the monkey cannot push the box after he has climbed on it, for
instance. Here is what the monkey needs to do to solve the problem:
1.
Go to where the box is.
2.
Push it under the bananas.
 
 
Search WWH ::




Custom Search