Grt has been implemented in C++[1]. Its operation consists of several
stages, which are shown in Figure 6a.
(a) The Grt operation stages
(b) The
problem processing stage
Figure 6: The overall operation of the Grt planning system.
In the first stage the
domain and problem files are parsed and the initial data structures are
constructed. The second stage consists of computing the facts and the actions
of the problem. The facts are stored in a tree structure, which is indexed by
their predicates and their objects and allows for fast access, while the
actions are stored in a linked list. Moreover, multiple pointers connect each
fact with the actions, where the fact appears. The computation of the facts and
actions is performed incrementally, by repeatedly applying the following steps:
§
If a
fact has been reached, create new actions that include this fact and others
already reached, in their preconditions.
§
If an
action has been created, add its add effects in the tree structure.
The process starts
with the initial state facts and continues until no more facts and actions can
be reached. This approach is time efficient and succeeds in not generating many
unreachable facts and actions. For example, in the logistics domain, the
facts denoting that a truck is located in a city different than its initial
location, and the corresponding actions, are not created. Note that in this
stage, both the normal and the inverted actions are computed; the former are
used in the mutex computation stage, while the latter are used in the heuristic
construction stage. However, no pre-instantiated actions are used during the
state-space search, where the applicable actions to each state are computed by progressively
instantiating the action schemas, using constraint satisfaction techniques
(forward checking and intelligent backtracking).
The stages that follow
are the computation of the mutual exclusion relations, the enrichment of the
domain, and the problem processing. The latter stage consists of several
sub-stages, as it is shown in Figure 6b, where the most important ones are the
construction of the heuristic and the state-space search. Note that when we
refer to the pre-processing phase of Grt,
we mean all stages that precede the state-space search.
In the case where
XOR-constraints are provided, Grt
attempts to decompose the current problem into sub-problems. If this attempt is
successful, the problem processing stage is executed recursively for each sub-problem,
otherwise the current problem is solved. Finally, in the case of
decompositions, the partial solutions are merged and the overall solution is
returned.
Ioannis
Refanidis
14-8-2001