Improved Fast Replanning For Robot Navigation in Unknown Terrain
Improved Fast Replanning For Robot Navigation in Unknown Terrain
Consider a robot-navigation task in unknown terrain, of predecessors of s 2 S in the graph. 0 <
(s; s0 ) 1
where the robot always observes which of its eight adja- denotes the cost of moving from s to s0 2 S u
(s). The
cent cells are traversable and then moves with cost one to task of LPA* is to maintain a shortest path from the start
one of them. The robot starts at the start vertex and has to vertex sstart 2 S to the goal vertex sgoal 2 S , knowing
move to the goal vertex. It always computes a shortest path both the topology of the graph and the current edge costs.
from its current vertex to the goal vertex under the assump-
tion that cells with unknown blockage status are traversable. 3.2 Lifelong Planning A*
It then follows this path until it reaches the goal vertex, in
which case it stops successfully, or some edge costs change, LPA* is shown in Figure 2. It maintains an estimate g (s)
in which case it recomputes a shortest path from the current of the start distance of each vertex s. LPA* also maintains
vertex to the goal vertex. It can utilize initial knowledge rhs-values, a second kind of estimates of the start distances.
about the blockage status of cells in case it is available. Fig- The rhs-values are one-step lookahead values based on the
ure 1 shows the goal distances of all traversable cells and g-values and thus potentially better informed than the g-
the shortest paths both before and after the robot has moved values. They always satisfy the following relationship:
along the path and discovered the first blocked cell it did not
know about. Cells whose goal distances have changed are
0 if s = sstart
rhs(s) = 0 0 ; s)) (1)
shaded gray. The goal distances are important because one mins0 2P red(s) (g (s ) +
(s otherwise.
can easily determine a shortest path from the current vertex
of the robot to the goal vertex by greedily decreasing the A vertex is called consistent iff its g-value equals its rhs-
goal distances once the goal distances have been computed. value, otherwise it is called inconsistent. This concept is
Notice that the goal distances of only about 15 percent of the important because the g-values of all vertices equal their
cells have changed, and most of the changed goal distances start distances iff all vertices are consistent. However, LPA*
are irrelevant for recalculating a shortest path from the cur- does not make every vertex consistent after some of the edge
rent vertex of the robot to the goal vertex. Thus, one can ef- costs have changed. First, we can prove that LPA* does not
The pseudocode uses the following functions to manage the priority queue: U.TopKey() returns the smallest priority of
all vertices in priority queue U . (If U is empty, then U.TopKey() returns [1; 1℄.) U.Pop() deletes the vertex with a vector with two compo-
the smallest priority in priority queue U and returns the vertex. U.Insert (s; k) inserts vertex s into priority queue U
with priority k. Finally, U.Remove(s) removes vertex s from priority queue U . nents where k1 (s) = min(g (s); rhs(s)) + h(s; sgoal ) and
procedure CalculateKey(s) k2 (s) = min(g (s); rhs(s)). The priorities are compared
f01g return [min(g(s); rhs(s)) + h(s; sgoal ); min(g(s); rhs(s))℄;
procedure Initialize()
according to a lexicographic ordering. For example, prior-
f02g U = ;;
f03g for all s 2 S rhs(s) = g(s) = 1;
ity k (s) is smaller than or equal to priority k 0 (s), denoted by
f04g rhs(sstart ) = 0; k (s) _ k 0 (s), iff either k1 (s) < k 0 (s) or (k1 (s) = k 0 (s) and
f05g U.Insert(sstart ; CalculateKey(sstart )); 1 1
0
k2 (s) k2 (s)). LPA* recalculates the g-values of vertices
procedure UpdateVertex(u)
f06g if (u 6= sstart ) rhs(u) = min
s0 2P red(u)
(g(s0 ) +
(s0 ; u));
f07g if (u 2 U ) U.Remove(u);
in the priority queue (“expands the vertices” by executing
f08g if (g(u) 6= rhs(u)) U.Insert(u; CalculateKey(u)); lines f10-16g) in the order of increasing first priority com-
procedure ComputeShortestPath()
_ CalculateKey(sgoal ) OR rhs(sgoal ) 6= g(sgoal ))
f09g while (U.TopKey()< ponents, which correspond to the f-values of an A* search,
f10g u = U.Pop();
f11g if (g(u) > rhs(u))
and vertices with equal first priority components in order of
f12g g(u) = rhs(u);
f13g for all s 2 Su
(u) UpdateVertex (s);
increasing second priority components, which correspond
f14g
f15g
else
g(u) = 1;
to the g-values of an A* search. Thus, it expands vertices in
f16g for all s 2 Su
(u) [ fug UpdateVertex(s);
a similar order as an A* search, that expands vertices in the
procedure Main()
f17g Initialize(); order of increasing f-values (since the heuristics are consis-
f18g forever
f19g ComputeShortestPath(); tent) and vertices with equal f-values that are on the same
f20g Wait for changes in edge costs;
f21g for all directed edges (u; v) with changed edge costs branch of its search tree in order of increasing g-values. A
f22g Update the edge cost
(u; v);
f23g UpdateVertex (v); more detailed and formal description of LPA*, its compar-
Figure 2: Lifelong Planning A* (forward search). ison to A*, and proofs of its correctness can be found in
[8].
recompute the start distances that have been computed be-
fore and have not changed (incremental search) [8], simi-
lar to DynamicSWSF-FP [12]. Second, LPA* uses heuris- 4 D* Lite
tic knowledge (in form of approximations of the goal dis- So far, we have described our LPA*, that repeatedly de-
tances) to focus the search and determine that some start termines shortest paths between the start vertex and the goal
distances need not get computed at all (heuristic search), vertex as the edge costs of a graph change. We now use
similar to A* [10]. The heuristics h(s; s0 ) estimate the dis- LPA* to develop D* Lite, that repeatedly determines short-
tance between vertex s and vertex s0 . They need to satisfy est paths between the current vertex of the robot and the
0 0
h(sgoal ; sgoal ) = 0 and h(s; sgoal )
(s; s ) + h(s ; sgoal )
goal vertex as the edge costs of a graph change while the
for all vertices s 2 S and s0 2 S u
(s). We can prove robot moves towards the goal vertex. D* Lite does not make
that ComputeShortestPath() of LPA* recalculates the g- any assumptions about how the edge costs change, whether
value of each vertex at most twice and thus terminates. If they go up or down, whether they change close to the cur-
g (sgoal ) = 1 after the search, then there is no finite-cost
rent vertex of the robot or far away from it, or whether they
path from sstart to sgoal . Otherwise, one can trace back a change in the world or only because the robot revised its ini-
shortest path from sstart to sgoal by always moving from tial estimates. The goal-directed navigation problem in un-
the current vertex s, starting at sgoal , to any predecessor s0 known terrain then is a special case of this problem, where
that minimizes g (s0 ) +
(s0 ; s) until sstart is reached (ties the graph is an eight-connected grid whose edge costs are
can be broken arbitrarily). Thus, LPA* does not explicitly initially one and change to infinity when the robot discov-
maintain a search tree. Instead, it uses the g-values to en- ers that they cannot be traversed. We first describe a simple
code it implicitly. version of D* Lite and then a more sophisticated version.
Because both versions of D* Lite are based on LPA*, they
3.3 Similarity of Lifelong Planning A* and A* share many properties with A* and are efficient.
LPA* is an incremental version of A*, the most popu-
lar search method in artificial intelligence, and thus shares 4.1 The Basic Version of D* Lite
many similarities with it. For example, both search meth-
We have already argued that many goal distances remain
ods maintain a priority queue. The priority queue of LPA*
unchanged as the robot moves to the goal vertex and ob-
always contains exactly the inconsistent vertices. These are
serves obstacles in the process. Thus, we can use a ver-
the vertices whose g-values LPA* potentially needs to up-
sion of LPA* for the goal-directed navigation problem in
date to make them consistent. The priority of vertex s in the
unknown terrain. We first need to switch the search direc-
priority queue is always
tion of LPA*. The version presented in Figure 2 searches
from the start vertex to the goal vertex and thus its g-values
k (s) = [k1 (s); k2 (s)℄; (2) are estimates of the start distances. The version presented
The pseudocode uses the following functions to manage the priority queue: U.TopKey() returns the smallest priority of The pseudocode uses the following functions to manage the priority queue: U.TopKey() returns the smallest priority of
all vertices in priority queue U . (If U is empty, then U.TopKey() returns [1; 1℄.) U.Pop() deletes the vertex with all vertices in priority queue U . (If U is empty, then U.TopKey() returns [1; 1℄.) U.Pop() deletes the vertex with
the smallest priority in priority queue U and returns the vertex. U.Insert (s; k) inserts vertex s into priority queue U the smallest priority in priority queue U and returns the vertex. U.Insert (s; k) inserts vertex s into priority queue U
with priority k. Finally, U.Remove(s) removes vertex s from priority queue U . with priority k. U.Update(s; k) changes the priority of vertex s in priority queue U to k. (It does nothing if the
current priority of vertex s already equals k.) Finally, U.Remove(s) removes vertex s from priority queue U .
procedure CalculateKey(s)
f01g return [min(g(s); rhs(s)) + h(sstart ; s); min(g(s); rhs(s))℄; procedure CalculateKey(s)
f01’g return [min(g(s); rhs(s)) + h(sstart ; s); min(g(s); rhs(s))℄;
procedure Initialize()
f02g U = ;; procedure Initialize()
f03g for all s 2 S rhs(s) = g(s) = 1; f02’g U = ;;
f04g rhs(sgoal ) = 0; f03’g for all s 2 S rhs(s) = g(s) = 1;
f05g U.Insert(sgoal ; CalculateKey(sgoal )); f04’g rhs(sgoal ) = 0;
f05’g U.Insert(sgoal ; CalculateKey(sgoal ));
procedure UpdateVertex(u)
f06g if (u 6= sgoal ) rhs(u) = min
s0 2Su
(u)
(
(u; s0 ) + g(s0 )); procedure UpdateVertex (u)
f07g if (u 2 U ) U.Remove(u);
f06’g if (u 6= sgoal ) rhs(u) = min 0
s 2Su
(u)
(
(u; s0 ) + g(s0 ));
f08g if (g(u) 6= rhs(u)) U.Insert(u; CalculateKey(u)); f07’g if (u 2 U ) U.Remove(u);
f08’g if (g(u) 6= rhs(u)) U.Insert(u; CalculateKey(u));
procedure ComputeShortestPath()
f09g while (U.TopKey()< _ CalculateKey(sstart ) OR rhs(sstart ) 6= g(sstart )) procedure ComputeShortestPath()
f10g u = U.Pop(); f09’g while (U.TopKey()< _ CalculateKey(sstart ) OR rhs(sstart ) 6= g(sstart ))
f11g if (g(u) > rhs(u)) f10’g u = U.Pop();
f12g g(u) = rhs(u); f11’g if (g(u) > rhs(u))
f13g for all s 2 P red(u) UpdateVertex (s); f12’g g(u) = rhs(u);
f14g else f13’g for all s 2 P red(u) UpdateVertex (s);
f15g g(u) = 1; f14’g else
f16g for all s 2 P red(u) [ fug UpdateVertex(s); f15’g g(u) = 1;
f16’g for all s 2 P red(u) [ fug UpdateVertex (s);
procedure Main()
f17g Initialize(); procedure Main()
f18g forever f17’g Initialize();
f19g ComputeShortestPath(); f18’g ComputeShortestPath();
f20g Wait for changes in edge costs; f19’g while (sstart 6= sgoal )
f21g for all directed edges (u; v) with changed edge costs f20’g /* if (g(sstart ) = 1) then there is no known path */
f22g Update the edge cost
(u; v);
f21’g sstart = arg min 0
s 2Su
(sstart )
(
(sstart ; s0 ) + g(s0 ));
f23g UpdateVertex (u);
f22’g Move to sstart ;
f23’g Scan graph for changed edge costs;
Figure 3: Lifelong Planning A* (backward search). f24’g if any edge costs changed
f25’g for all directed edges (u; v) with changed edge costs
f26’g Update the edge cost
(u; v);
f27’g UpdateVertex (u);
for all s 2 U
in Figure 3 searches from the goal vertex to the start vertex f28’g
f29’g U.Update(s; CalculateKey(s));
ComputeShortestPath();
and thus its g-values are estimates of the goal distances. It f30’g
was derived from the original version by reversing all edges Figure 4: D* Lite: Basic Version.
of the graph and exchanging the start and goal vertex. The
heuristics h(s; s0 ) now need to satisfy h(sstart ; sstart ) = be reached during the search. The basic version of D* Lite
0 and h(sstart ; s) h(sstart ; s0 ) +
(s0 ; s) for all ver- then computes a shortest path from the current vertex of the
tices s 2 S and s0 2 P red(s). More generally, since robot sstart to the goal vertex f18’g. If the robot has not
the robot moves and thus changes sstart , the heuristics reached the goal vertex yet f19’g, it makes one transition
needs to satisfy this property for all sstart 2 S . To along the shortest path and updates sstart to reflect the cur-
solve the goal-directed navigation problem in unknown ter- rent vertex of the robot f21’-22’g. (In the pseudocode, we
rain, the CalculateKey(), Initialize(), UpdateVertex(), and have included a comment on how the robot can detect that
ComputeShortestPath() functions can remain unchanged. there is no path but do not prescribe what it should do in
However, the Main() function needs to get extended so that this case. For the goal-directed navigation problem in un-
it moves the robot and then recalculates the priorities of the known terrain, for example, it should stop and announce
vertices in the priority queue appropriately. This is neces- that there is no path since obstacles do not disappear.) It
sary because the heuristics change when the robot moves, then scans for changes in edge costs f23’g. If some edge
since they are computed with respect to the current vertex costs have changed, it updates the edge costs f26’g and
of the robot. This only changes the priorities of the vertices calls UpdateVertex() f27’g to update the rhs-values of the
in the priority queue but not which vertices are consistent vertices potentially affected by the changed edge costs so
and thus in the priority queue. Figure 4 shows the resulting that they again satisfy the equivalent of Equation 1 and the
algorithm, called the basic version of D* Lite. priority queue so that it again contains exactly the incon-
The basic version of D* Lite first calls Initialize() f17’g sistent vertices with priorities that satisfy the equivalent of
to initialize the g-values of the vertices to infinity, the rhs- Equation 2. The basic version of D* Lite then updates the
values of the vertices so that they satisfy the equivalent of priorities of all vertices in the priority queue f28’-29’g, re-
Equation 1, and the priority queue so that it contains ex- calculates a shortest path f30’g, and iterates.
actly the inconsistent vertices with priorities that satisfy the We can prove a variety of properties of the ba-
equivalent of Equation 2. The priority queue only contains sic version of D* Lite, including the correctness of its
the goal vertex since all other vertices are initially consis- ComputeShortestPath() function which implies the correct-
tent. Thus, in an actual implementation, the basic version of ness of the basic version of D* Lite (all proofs can be found
D* Lite needs to initialize a vertex only when it is encoun- in [8]):
tered during the search and thus does not need to initialize
all vertices up front. This is important because the num- Theorem 1 ComputeShortestPath() of the basic version of
ber of vertices can be large and only a few of them might D* Lite always terminates and one can then follow a short-
The pseudocode uses the following functions to manage the priority queue: U.TopKey() returns the smallest priority of
all vertices in priority queue U . (If U is empty, then U.TopKey() returns [1; 1℄.) U.Pop() deletes the vertex with uses for the corresponding vertices. They are initialized
the smallest priority in priority queue U and returns the vertex. U.Insert (s; k) inserts vertex s into priority queue U
with priority k. Finally, U.Remove(s) removes vertex s from priority queue U . in the same way as the basic version of D* Lite initializes
procedure CalculateKey(s) them. After the robot has moved from vertex s to some
+ h(sstart ; s)+km ; min(g(s); rhs(s))℄;
vertex s0 where it detects changes in edge costs, the first ele-
f01”g return [min(g(s); rhs(s))
procedure Initialize()
f02”g U = ;;
f03”g km = ; 0 ment of the priorities can have decreased by at most h(s; s0 ).
f04”g for all s 2 S rhs(s) = g(s) = 1;
f05”g rhs(sgoal ) = 0;
(The second component does not depend on the heuristics
f06”g U.Insert(sgoal ; CalculateKey(sgoal )); and thus remains unchanged.) Thus, in order to maintain
procedure UpdateVertex(u)
f07”g if (u 6= sgoal ) rhs(u) = min 0 (
(u; s0 ) + g(s0 ));
lower bounds, D* Lite needs to subtract h(s; s0 ) from the
s 2Su
(u)
f08”g if (u 2 U ) U.Remove(u); first element of the priorities of all vertices in the priority
queue. However, since h(s; s0 ) is the same for all vertices
f09”g if (g(u) 6= rhs(u)) U.Insert(u; CalculateKey(u));
procedure ComputeShortestPath()
f10”g while (U.TopKey()< _ CalculateKey(sstart ) OR rhs(sstart ) 6= g(sstart ))
f11”g kold = U.TopKey();
in the priority queue, the order of the vertices in the priority
f12”g u = U.Pop();
f13”g if( kold _ <CalculateKey( )) u queue does not change if the subtraction is not performed.
f14”g u
U.Insert( ; CalculateKey( )); u Then, when new priorities are computed, their first compo-
f15”g else if (g(u) > rhs(u))
f16”g
f17”g
g(u) = rhs(u);
for all s 2 P red(u) UpdateVertex (s);
nents are by h(s; s0 ) too small relative to the priorities in the
f18”g
f19”g
else
g(u) = 1;
priority queue. Thus, h(s; s0 ) has to be added to their first
f20”g for all s 2 P red(u) [ fug UpdateVertex (s);
components every time some edge costs change. If the robot
procedure Main()
f21”g slast = sstart
; moves again and then detects cost changes again, then the
f22”g Initialize();
f23”g ComputeShortestPath(); constants need to get added up. We do this in the variable
f24”g while (sstart = 6 sgoal )
f25”g /* if (g(sstart ) = 1) then there is no known path */ km f30”g. Thus, whenever new priorities are computed,
f26”g sstart = arg min 0 (
(sstart ; s0 ) + g(s0 ));
f27”g Move to sstart ;
s 2Su
(sstart ) the variable km has to be added to their first components, as
f28”g
f29”g
Scan graph for changed edge costs;
if any edge costs changed
done in f01”g. Then, the order of the vertices in the priority
f30”g km = km + h(slast ; sstart ); queue does not change after the robot moves and the pri-
f31”g slast = sstart ;
f32”g
f33”g
for all directed edges (u; v) with changed edge costs
Update the edge cost
(u; v);
ority queue does not need to get reordered. The priorities,
f34”g
f35”g
UpdateVertex(u);
ComputeShortestPath();
on the other hand, are always lower bounds on the corre-
sponding priorities of the basic version of D* Lite after the
Figure 5: D* Lite: Final Version. first component of the priorities of the basic version of D*
Lite has been increased by the current value of km . We
est path from sstart to sgoal by always moving from the cur- exploit this property by changing ComputeShortestPath()
rent vertex s, starting at sstart , to any successor s0 that as follows. After ComputeShortestPath() has removed a
minimizes
(s; s0 ) + g (s0 ) until sgoal is reached (ties can vertex u with the smallest priority kold = U.TopKey()
be broken arbitrarily). from the priority queue f12”g, it now uses CalculateKey()
to compute the priority that it should have had. If
kold <_ CalculateKey(u) then it reinserts the removed ver-
4.2 The Final Version of D* Lite tex with the priority calculated by CalculateKey() into the
priority queue f13”-14”g. Thus, it remains true that the
The basic version of D* Lite has the disadvantage that priorities of all vertices in the priority queue are lower
the repeated reordering of the priority queue can be expen- bounds on the corresponding priorities of the basic ver-
sive since the priority queue often contains a large num- sion of D* Lite after the first components of the priori-
ber of vertices. The final version of D* Lite, shown in ties of the basic version of D* Lite have been increased
Figure 5, uses a method derived from D* [14] to avoid by the current value of km . If kold _ CalculateKey(u),
having to reorder the priority queue. Differences to the then it holds that kold = _ CalculateKey(u). In this case,
basic version of D* Lite are shown in bold. The heuris- ComputeShortestPath() performs the same operations for
tics h(s; s0 ) now need to satisfy h(s; s0 )
(s; s0 ) and vertex u as ComputeShortestPath() of the basic version
00 0 0 00 0 00
h(s; s ) h(s; s ) + h(s ; s ) for all vertices s; s ; s 2 S ,
0
of D* Lite f15”-20”g. ComputeShortestPath() performs
where
(s; s ) denotes the cost of a shortest path from ver- these operations for vertices in the exact same order as
tex s 2 S to vertex s0 2 S . This property implies the prop- ComputeShortestPath() of the basic version of D* Lite,
erty that heuristics for the basic version of D* Lite need to which implies that the final version of D* Lite shares many
satisfy. This is not overly restrictive, however, since both properties with the basic version of D* Lite, including the
properties are guaranteed to hold if the heuristics are de- correctness of ComputeShortestPath() which implies the
rived by relaxing the search problem, which will almost al- correctness of the final version of D* Lite:
ways be the case and holds for the heuristics used in this
paper. Theorem 2 ComputeShortestPath() of the final version of
The final version of D* Lite uses priorities that are lower D* Lite always terminates and one can then follow a short-
bounds on the priorities that the basic version of D* Lite est path from sstart to sgoal by always moving from the cur-
The pseudocode uses the following functions to manage the priority queue: U.Top() returns a vertex with the smallest
priority of all vertices in priority queue U . U.TopKey() returns the smallest priority of all vertices in priority queue (that is, a vertex whose g-value is larger than its rhs-value)
U . (If U is empty, then U.TopKey() returns [1; 1℄.) U.Insert(s; k) inserts vertex s into priority queue U with
priority k. U.Update(s; k) changes the priority of vertex s in priority queue U to k. (It does nothing if the current it is unnecessary to take the minimum over all of its respec-
priority of vertex s already equals k.) Finally, U.Remove (s) removes vertex s from priority queue U .
tive successors since only the g-value of the overconsistent
procedure CalculateKey(s)
f01”’g return [min(g(s); rhs(s)) + h(sstart ; s) + km ; min(g(s); rhs(s))℄; vertex has changed. Since it decreased, it cannot increase
procedure Initialize()
f02”’g U = ;;
the rhs-values of the predecessors. Thus, it is sufficient to
f03”’g km = 0;
f04”’g for all s 2 S rhs(s) = g(s) = 1;
compute the rhs-value as the minimum of its old rhs-value
f05”’g rhs(sgoal ) = 0;
f06”’g U.Insert(sgoal ; [h(sstart ; sgoal ); 0℄);
and the sum of the cost of moving from the predecessor to
procedure UpdateVertex(u) the overconsistent vertex and the new g-value of the over-
f07”’g if (g(u) 6= rhs(u) AND u 2 U ) U.Update(u; Cal
ulateKey(u));
f08”’g else if (g(u) 6= rhs(u) AND u 2
= U ) U.Insert(u; Cal
ulateKey(u));
consistent vertex (f20”’g). A similar optimization can be
f09”’g else if (g(u) = rhs(u) AND u 2 U ) U.Remove (u);
made for the computation of the rhs-value of a vertex after
procedure ComputeShortestPath()
f10”’g while (U.TopKey()< _ CalculateKey(sstart ) OR rhs(sstart ) 6= g(sstart )) the cost of one of its outgoing edges has changed (f44”’g).
f11”’g u = U.Top();
f12”’g kold = U.TopKey(); Third, when UpdateVertex() on line f20”g computes the
f13”’g knew = CalculateKey(u));
f14”’g if(kold <k _ new ) rhs-value for a predecessor of an underconsistent vertex
f15”’g U.Update(u; knew );
f16”’g else if (g(u) > rhs(u)) (that is, a vertex whose g-value is smaller than its rhs-value),
f17”’g g(u) = rhs(u);
f18”’g U.Remove (u); the only g-value that has changed is the g-value of the un-
f19”’g for all s 2 P red(u)
f20”’g if (s =
6 sgoal ) rhs(s) = min(rhs(s);
(s; u) + g(u)); derconsistent vertex. Since it increased, the rhs-value of the
f21”’g UpdateVertex (s);
f22”’g else predecessor can only get affected if its old rhs-value was
f23”’g gold = g(u);
f24”’g g(u) = 1; based on the old g-value of the underconsistent vertex. This
f25”’g for all s 2 P red(u) [ fug
f26”’g if (rhs(s) =
(s; u) + gold OR s = u) can be used to decide whether the predecessor needs to get
(
(s; s0 ) + g(s0 ));
f27”’g
f28”’g
if (s 6= sgoal ) rhs(s) = min 0
UpdateVertex (s);
s 2Su
(s) updated and its rhs-value needs to get recomputed (f26”’-
procedure Main() 27”’g). A similar optimization can be made for the compu-
f29”’g slast = sstart ;
f30”’g Initialize(); tation of the rhs-value of a vertex after the cost of one of its
f31”’g ComputeShortestPath();
f32”’g while (sstart = 6 sgoal ) outgoing edges has changed (f45”’-46”’g).
f33”’g /* if (g(sstart ) = 1) then there is no known path */
f34”’g sstart = arg min 0 (
(sstart ; s0 ) + g(s0 ));
Fourth, there are several small optimizations one can
s 2Su
(sstart )
f35”’g Move to sstart ; perform. For example, the priority on line f06”g can be
calculated directly (f06”’g), CalculateKey() on lines f13”-
f36”’g Scan graph for changed edge costs;
f37”’g if any edge costs changed
km = km + h(slast ; sstart );
14”g needs to calculate the priority of vertex u only once
f38”’g
f39”’g slast = sstart ;
for all directed edges (u; v) with changed edge costs
(f13”’g), and the vertex with the highest priority needs to
f40”’g
f41”’g
old =
(u; v);
Update the edge cost
(u; v);
get removed on line f12”g only if line f14”g does not rein-
f42”’g
f43”’g if (
old >
(u; v))
if (u 6= sgoal ) rhs(u) = min(rhs(u);
(u; v) + g(v));
sert it again immediately afterwards ( f12”’, 15”’, 18”’g).
f44”’g
f45”’g else if (rhs(u) =
old + g(v))
f46”’g if (u 6= sgoal ) rhs(u) = min 0
s 2Su
(u)
(
(u; s0 ) + g(s0 ));
f47”’g UpdateVertex (u);
f48”’g ComputeShortestPath();
complete search
sgoal sgoal
sstart sstart
sgoal sgoal
sstart sstart
sgoal sgoal
sstart sstart
sgoal sgoal
sstart sstart
6 Experimental Results 50
45
110
40 100
We now compare focussed D* and the optimized final 35 90
version of D* Lite. Since both methods move the robot in 30
80
the same way and focussed D* has already been demon- 25
20 70
strated with great success on real robots, we only need 10x10 20x20 30x30
maze size
40x40 10x10 20x20 30x30
maze size
40x40