7. This exercise returns to a blocks world similar to the one shown in figure 8.16. Imagine...
Question:
7. This exercise returns to a blocks world similar to the one shown in figure 8.16.
Imagine that there is a group of blocks (cubes, for simplicity) arranged in some configuration on a table in front of a robot, and you would like the robot to rearrange them without having to tell it how to do so. Assume that there is a single type of action, moving a block to a location, where a location is either an area on the table or on top of another block. This action can only be performed by the robot if there is nothing on the blocks and nothing at the desired location.
For the example problem shown in figure 9.15, an acceptable plan is this: move block A to area 5 (on the table), move block B onto block D, and move block A onto block B.
Use situations and fluents as the representation of the states in this blocks world.
For example, after performing the actions in this plan, the final situation would be [move(a,b),move(b,d),move(a,area5)]. You will only need to use one fluent, located_on
(b, l, s), which should hold when block b is at location l in situation s.
a. Write the initial state clauses for the fluent located_on for the initial situation in figure 9.15. (As you test your program with different initial situations, you will need to vary these clauses.)
b. Write the successor state clauses for the fluent located_on. You need to decide for each action a how located_on
(b, l, [a|s]) depends on a and what holds in situation s. Show that your located_on works properly by testing it on a variety of situations.
c. Write a clause for the goal state in figure 9.15. (As you test your program with different goals, you will need to vary this clause.)
d. Define the poss predicate for your move action, using located_on.
e. Show that the planning problem in figure 9.15 can be solved with plan.
f. Show that your program works on other small problems of your choosing.
Step by Step Answer: