CS322 Fall 1997
Assignment 8 (planning)

Solution

In the file ~cs322/cilog/delrob_strips.pl (also available on the web) is a representation of the delivery robot in cilog using STRIPS. In the file ~cs322/cilog/strips_strips.pl (also available on the web) is a cilog program that implements the STRIPS planner. You will need to play with these to do this assignment.

Question 1

In this question we will add to the STRIPS representation a more complicated paint action than in the previous assignment.

Suppose we have the object paintcan(Colour) that denoted a can of paint of colour Colour.

Add the action paint(Obj,Colour) that that results in the Object changing its colour to Colour. (Unlike the previous assignment, the object only has one colour). The painting can only be carried out if the object is sitting at o109 and an autonomous agent is at position o109 carrying the can of paint of the appropriate colour.

Initially, Rob is blue, the parcel is brown, the key k1 is brown, there is red paint at the storage room, and green paint at the mail room.

Axiomatize this domain and show you have checked it. An example query is

ask achieve(color(parcel,green),init,S,10,_).
Warning: check your answer to make sure it is right. You may need to reorder the preconditions of paint in order to make sure the plan works.

Solution

Here is the definition of the action paint(Obj,Color)
preconditions(paint(Obj,Color),
   [sitting_at(Obj,o109),carrying(Ag,paint(Color)),at(Ag,o109)]).
achieves(paint(Obj,Color),color(Obj,Color)).
deletes(paint(Obj,Color),color(Obj,PrevColor)).
There is also a complete axiomatization of the example that produces the output in the assignment.

Question 2

In this question you will think about the limitations of STRIPS. In the previous question, you needed to appropriately order the preconditions to make sure it works. For this domain, are there orderings of the preconditions (think about all of the actions) so that you find the shortest plans for colouring the objects of the domain? Explain what they are or why there are no such orderings. Is the STRIPS planner a good idea?

Solution

You needed to make sure that when putting down an object, the agent first picks up the object then moves to the appropriate position.

What I wanted you to notice was this if you tried to achieve, say, the parcel being red, it never goes to storage, picks up both the red paint and the parcel, and then move to o109. Reordering may help for this example, to ensure the robot is carrying the paint first. But then it doesn't get a good answer when the robot is already sitting at the position as the object to be painted (it goes away and gets the paint, then comes back).