During the search phase, Grt always selects to expand the most promising
state, according to its heuristic. If the various facts of a problem were
independent or even if Grt always
managed to track their interactions through the related facts, this strategy
would be optimal. However, this is not always the case and some times the
search is led to local optimal states. Therefore, the planner should
temporarily backtrack to less promising states, before selecting the most
promising ones. Figure 2 presents an example situation:
|
Initial state |
|
|
Goal state |
||||
2 |
K |
|
|
|
2 |
|
|
K |
1 |
|
|
|
|
1 |
|
|
|
0 |
R |
|
|
|
0 |
|
|
R |
|
0 |
1 |
2 |
|
|
0 |
1 |
2 |
Figure 2: A 3x3 grid
problem.
The problem refers to
a grid-like domain (McDermott, 1999), where K is a key and R is a
robot. The robot can only proceed to adjacent positions. The valid actions are get and leave the key and move
the robot. Table 3 shows part of the Greedy Regression Table for the problem of
Figure 2.
According to this
Table, the distance between the initial and the goal state is 10. There are two
applicable to the initial state actions, moving R to n1_0 and moving R to n0_1.
After moving R to n1_0 the resulting state has a distance
from the goals equal to 9, whereas after moving R to n0_1 the resulting
state has a distance from the goals equal to 11. So the planner decides to move
R to n1_0 and subsequently to n2_0.
However, it is obvious that the optimal first movements are moving the robot to
n0_1, next to n0_2, getting the key etc.
Fact |
Distance from Goals |
Related Facts |
|
|
|
(at R n2_0) |
0 |
( ) |
(at K n2_2) |
0 |
( ) |
(at R n1_0) |
1 |
( ) |
(at R n0_0) |
2 |
( ) |
(at R n0_1) |
3 |
( ) |
(at R n2_1) |
1 |
( ) |
(at R n2_2) |
2 |
( ) |
(in R K) |
3 |
( (at R
n2_2) ) |
(at R n1_2) |
3 |
( ) |
(at K n1_2) |
7 |
( (at R
n1_2) ) |
(at R n0_2) |
4 |
( ) |
(at K n0_2) |
8 |
( (at R
n0_2) ) |
Table 3: Part of the Greedy Regression Table
for the 3x3 grid problem.
Initially the planner
does not select the optimal action, since it leads to a state with a greater
distance from the goals, according to the heuristic. In order to decide to move
the robot towards the key, the planner should go through all the other valid
plans, then backtrack and move the robot to worse states (this requires that
the planner maintains a closed list of visited states and does not revisit
them). In difficult problems, the number of states that the planner has to
visit before following the optimal direction, is extremely large. This is the
main reason why Grt, like many
other heuristic planners, does not handle grid-like domains efficiently.
For the 3x3 grid
problem of Figure 2, an ideal planner should detect that, in order to move the
key from n0_2 to n2_2, it is necessary that the robot gets the key, so the fact (at R n0_2)
should be achieved before the fact (at R
n2_0). However, the planner does not
know that the facts (at R n0_0), (at R n2_0) and (at R n0_2)
are related in some way, because the domain definition does not provide this
piece of information. Therefore, it is necessary to provide the planner with
information about relations that hold between the facts of the problem.
Ioannis
Refanidis
14-8-2001