Fixit Domain

As with many STRIPS-style palnning systems, there are two separate files. One is the facts file, which contains the descriptions of the things that are in the world, the current configuration, and the desired state. The second file is the operators which can be used by the planning system to achieve the goals. The fixit domain begins with a blown-out tire, and a trunk (well a boot actually, since this was done in Britain) full of tools, and a spare. The goal is an inflated tire on the hub. The facts file begins by listing the objects in the world (wrench, jack, pump, wheels, the-hub, the boot, the lug nuts) and then specifies the initial state of the world. Wheel1 is on the hub, Wheel2 is in the boot (intact, but not-inflated) along with all the tools, and the boot is closed. Finally, the facts file details the desired state of the world - Wheel2 inflated and on the hub, lug nuts tightened, and all the tools (along with the blown tire) in the boot.

Facts

(wrench Object)
(jack Object)
(pump Object)
(the-hub Hub)
(the-hub Object)
(nuts Nut)
(nuts Object)
(boot Container)
(wheel1 Object)
(wheel2 Object)
(wheel1 Wheel)
(wheel2 Wheel)

(preconds
	(intact wheel2) 
	(not-inflated wheel2)
	(in wheel2 boot) 
	(in jack boot) 
	(in pump boot) 
	(in wrench boot) 
	(fastened the-hub)
	(on wheel1 the-hub) 
	(on-ground the-hub) 
	(tight nuts the-hub)
	(unlocked boot)
	(closed boot)
)

(effects
	(intact wheel2)
	(inflated wheel2) 
	(on wheel2 the-hub) 
	(in jack boot) 
	(in pump boot) 
	(in wrench boot) 
	(in wheel1 boot) 
	(fastened the-hub)
	(on-ground the-hub)
	(tight nuts the-hub)
	(unlocked boot)  
	(closed boot)
)



So this sets up the idea that the system should open the boot, take out the tools, jack up the car, swap the wheels, and inflate the tire, then put all the tools away. It will do this by finding a sequence of operators (either totally ordered or partially ordered) which will transform the world into the desired state.

Operators

Note: To make this more readable in html, I have replaced the use of angle brackets to indicate a variable with [x].

The operators have three parts: a name, a list of pre-conditions, and a list of effects. These are parameterized to allow the planning system to bind available objects to the formal parameters during plan elaboration.

Fo an operator to be invoked, there must be a consistent binding of its preconditions. For example, to invoke the open operator, it must be possible to assign a an object of type container to the parameter x, such that there are facts stating that x is unlocked and x is closed.

If this binding can be made, then the effects occur. There are two types of effects: things that are deleted from the world knowledge and predicates that are added to the world knowledge. Remember that the Strips Model is based on a closed world hypothesis, any predicate that is not explicitly stated as true, is presumed to be false.

However, This particular fact set plays fairly loose with the closed world model. Look at the Wheel2 predicates in the fact file. Wheel2 is explicitly declared to be not-inflated, and the inflate operator explicitly requires that the whhel be both not-inflated and intact. The effects delete not-inflated, and add inflated. This suggests that a open world model is in use. However, Wheel1 is not explicitly declared to be either intact or not-intact, nor is it declared to be either inflated or not-inflated.

(operator
 open
 (params 
  ([x] Container))
 (preconds
  (unlocked [x]) (closed [x]))
 (effects 
  (del closed [x]) (open [x])))


(operator
 close
 (params 
  ([x] Container))
 (preconds
  (open [x]))
 (effects 
  (del open [x]) (closed [x])))

(operator
 fetch
 (params ([x] Object)  ([y] Container))
 (preconds
  (in [x] [y]) (open [y]))
 (effects
  (del in [x] [y]) (have [x])))


(operator
 put-away
 (params  ([x] Object) ([y] Container))
 (preconds
  (have [x]) (open [y]))
 (effects
  (in [x] [y])  (del have [x])))

(operator
 loosen 
 (params ([x] Nut)  ([y] Hub))
 (preconds
  (have wrench) (tight [x] [y]) (on-ground [y]))
 (effects
  (loose [x] [y]) (del tight [x] [y])))

(operator
 tighten
 (params ([x] Nut)
   ([y] Hub))
 (preconds
  (have wrench) (loose [x] [y]) (on-ground [y]))
 (effects
  (tight [x] [y]) (del loose [x] [y])))

(operator
 jack-up
 (params ([y] Hub))
 (preconds  (on-ground [y]) (have jack))
 (effects (not-on-ground [y]) (del on-ground [y]) (del have jack)))

(operator
 jack-down
 (params ([x] Hub))
 (preconds (not-on-ground [x]))
 (effects (del not-on-ground [x]) (on-ground [x]) (have jack)))

(operator
 undo
 (params ([x] Nut) ([y] Hub))
 (preconds
  (not-on-ground [y]) (fastened [y]) (have wrench) (loose [x] [y]))
 (effects
  (have [x]) (unfastened [y]) (del fastened [y]) 
  (del loose [x] [y])))

(operator
 do-up
 (params ([x] Nut) ([y] Hub))
 (preconds 
  (have wrench) (unfastened [y])
       (not-on-ground [y]) (have [x]))
 (effects
   (loose [x] [y]) (fastened [y]) (del unfastened [y])
   (del have [x])))

(operator
 remove-wheel
 (params ([x] Wheel) ([y] Hub))
 (preconds 
  (not-on-ground [y]) (on [x] [y]) (unfastened [y]))
 (effects
   (have [x]) (free [y]) (del on [x] [y])))

(operator
 put-on-wheel
 (params ([x] Wheel) ([y] Hub))
 (preconds
  (have [x]) (free [y]) (unfastened [y]) (not-on-ground [y]))
 (effects
  (on [x] [y]) (del free [y]) (del have [x])))

(operator
 inflate
 (params ([x] Wheel))
 (preconds
  (have pump) (not-inflated [x]) (intact [x]))
 (effects (del not-inflated [x]) (inflated [x])))

(operator
 cuss
 (params)
 (preconds)
 (effects (del annoyed)))

Plan Produced by GraphPlan

Note: GraphPlan actually produces a partially ordered plan, which I have linearized.

  1. open_boot
  2. fetch_jack_boot
  3. fetch_pump_boot
  4. fetch_wrench_boot
  5. fetch_wheel2_boot
  6. loosen_nuts_the-hub
  7. inflate_wheel2
  8. jack-up_the-hub
  9. put-away_pump_boot
  10. undo_nuts_the-hub
  11. remove-wheel_wheel1_the-hub
  12. put-on-wheel_wheel2_the-hub
  13. put-away_wheel1_boot
  14. do-up_nuts_the-hub
  15. jack-down_the-hub
  16. tighten_nuts_the-hub
  17. put-away_jack_boot
  18. put-away_wrench_boot
  19. close_boot
jpg3u@virginia.edu
Last modified: Wed Jan 31 14:19:31 2001