In this section, we present an
approach adopted by the Grt
planner, in order to deal with poor domain descriptions. By the word 'poor' we
refer to domains where negative facts are implicitly present in the initial
state and in the actions' preconditions. Grt
faced this problem twice, with the movie and the elevator domains.
In order to explain
the problem, let us consider the elevator domain, where there is one
elevator, several floors and several passengers. Each passenger is located in
an initial floor and wants to move to her/his destination floor. The domain is
described by four action schemas, (board Floor Passenger) and (depart
Floor Passenger) for boarding and leaving the elevator and (up
Floor1 Floor2) and (down Floor1 Floor2) for moving the
elevator.
The action schema (board
Floor Passenger) is defined by the following PDDL formula:
(:action board
:parameters (?f ?p)
:precondition (and (floor ?f)
(passenger ?p)
(lift-at ?f) (origin ?p ?f))
:effect (boarded ?p))
The only dynamic
predicate in the definition of action schema board is boarded, an
add effect denoting that the passenger has boarded the elevator. There is no
precondition requiring that the passenger is not boarded. The problem with this
definition is twofold. Firstly, the action can be applied several times to the
same passenger in the same plan, i.e. a passenger may board the elevator
although she/he has already boarded. Secondly, and specifically to Grt, it is not stated explicitly that
the passengers are not initially boarded. Actually, the initial state contains
static facts only, which are not removed in the successive states. However, Grt takes into account dynamic facts
only in order to estimate distances. The result is that the initial state and
all the subsequent states are assigned zero distances from the Goals and
the best-first strategy behaves as a breadth-first one.
What
is needed is the definition of a new predicate, say not_boarded. Facts
of this predicate should be added to the initial state, denoting that each
passenger is initially not boarded, and the action schema board should
be changed accordingly.
Grt performs domain enrichment at
run-time. The identification of the above situation is performed in a way
similar to the identification of the incomplete goal states. In this case, Grt looks for dynamic facts of a
problem that are not mutually exclusive with any initial state fact. In case of
such facts, the negations of the identified facts are defined at run-time and
added to the initial state. Furthermore, the negations are added to the
preconditions lists and the delete lists of the actions that achieve the
identified facts.
In the elevator domain
this is the case with the board and depart actions and the boarded
and served predicates. The not_boarded and not_served
predicates are defined at run-time, the initial state is enhanced with facts
determining that each passenger is neither boarded nor served yet and the
actions board and depart are transformed accordingly. For
example, the action schema board is transformed into the following
definition:
(:action board
:parameters (?f ?p)
:precondition (and (floor ?f)
(passenger ?p)(lift-at ?f)
(origin ?p ?f) (not_boarded ?p))
:effect (and (not (not_boarded
?p))(boarded ?p))
A similar situation
arises in the movie domain. In this domain, the goal is to have enough
snacks so as to watch a movie. There are several action schemas of the form:
(:action get-chips
:parameters (?x)
:precondition (and (chips
?x))
:effect (and (have-chips)))
This action schema has
the static fact (chips ?x) as precondition and produces the
dynamic fact (have-chips). The action can be applied several times,
however once is enough to achieve the goal of having chips. The difficulty in
this domain is that the initial state implicitly declares that we do not have
chips (and dips and pops etc), but there is not any specific dynamic fact to
make this clear. Therefore, in case no domain enrichment process takes place, Grt assigns to the initial state a zero
distance from the goals. With the domain enrichment feature, Grt detects that there are facts like
the have-chips, have-dips etc that are not mutually exclusive
with the initial state, defines their negations (not_have-chips, not_have-dips
etc.), adds them to the initial state and transforms the actions accordingly.
In both of the above
domains, without the domain enrichment feature the Grt planner could only solve some of the easiest problems.
However, with this feature it was able to tackle all problems very efficiently.
Adding negative predicates in
the preconditions of the actions may lead to loss of completeness, since the
actions may not be able to be applied in some states, where otherwise they
could. In order to prevent completeness, Grt
treats the new preconditions as conditional preconditions, i.e. they are not
necessary for the application of an action to a state, however, if they are
present in the current state they are removed from the successor one.
Ioannis
Refanidis
14-8-2001