(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.
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)))