<s>
LPA*	B-Algorithm
or	O
Lifelong	B-Algorithm
Planning	I-Algorithm
A*	I-Algorithm
is	O
an	O
incremental	B-Algorithm
heuristic	I-Algorithm
search	I-Algorithm
algorithm	O
based	O
on	O
A*	B-Protocol
.	O
</s>
<s>
LPA*	B-Algorithm
is	O
an	O
incremental	O
version	O
of	O
A*	B-Protocol
,	O
which	O
can	O
adapt	O
to	O
changes	O
in	O
the	O
graph	B-Application
without	O
recalculating	O
the	O
entire	O
graph	B-Application
,	O
by	O
updating	O
the	O
g-values	O
(	O
distance	O
from	O
start	O
)	O
from	O
the	O
previous	O
search	O
during	O
the	O
current	O
search	O
to	O
correct	O
them	O
when	O
necessary	O
.	O
</s>
<s>
Like	O
A*	B-Protocol
,	O
LPA*	B-Algorithm
uses	O
a	O
heuristic	O
,	O
which	O
is	O
a	O
lower	O
boundary	O
for	O
the	O
cost	O
of	O
the	O
path	O
from	O
a	O
given	O
node	O
to	O
the	O
goal	O
.	O
</s>
<s>
LPA*	B-Algorithm
maintains	O
two	O
estimates	O
of	O
the	O
start	O
distance	O
for	O
each	O
node	O
:	O
</s>
<s>
If	O
all	O
nodes	O
are	O
locally	O
consistent	O
,	O
then	O
a	O
shortest	O
path	O
can	O
be	O
determined	O
as	O
with	O
A*	B-Protocol
.	O
</s>
<s>
When	O
a	O
node	O
becomes	O
locally	O
inconsistent	O
(	O
because	O
the	O
cost	O
of	O
its	O
predecessor	O
or	O
the	O
edge	O
linking	O
it	O
to	O
a	O
predecessor	O
has	O
changed	O
)	O
,	O
it	O
is	O
placed	O
in	O
a	O
priority	B-Application
queue	I-Application
for	O
re-evaluation	O
.	O
</s>
<s>
LPA*	B-Algorithm
uses	O
a	O
two-dimensional	O
key	O
:	O
</s>
<s>
Entries	O
are	O
ordered	O
by	O
(	O
which	O
corresponds	O
directly	O
to	O
the	O
f-values	O
used	O
in	O
A*	B-Protocol
)	O
,	O
then	O
by	O
.	O
</s>
<s>
The	O
node	O
at	O
the	O
top	O
of	O
the	O
priority	B-Application
queue	I-Application
has	O
a	O
key	O
which	O
is	O
greater	O
than	O
or	O
equal	O
to	O
the	O
key	O
for	O
the	O
goal	O
.	O
</s>
<s>
The	O
graph	B-Application
is	O
initialized	O
by	O
setting	O
the	O
rhs-value	O
of	O
the	O
start	O
node	O
to	O
0	O
and	O
its	O
g-value	O
to	O
infinity	O
.	O
</s>
<s>
The	O
first	O
run	O
of	O
LPA*	B-Algorithm
thus	O
behaves	O
in	O
the	O
same	O
manner	O
as	O
A*	B-Protocol
,	O
expanding	O
the	O
same	O
nodes	O
in	O
the	O
same	O
order	O
.	O
</s>
<s>
When	O
the	O
cost	O
of	O
an	O
edge	O
changes	O
,	O
LPA*	B-Algorithm
examines	O
all	O
nodes	O
affected	O
by	O
the	O
change	O
,	O
i.e.	O
</s>
<s>
This	O
code	O
assumes	O
a	O
priority	B-Application
queue	I-Application
queue	O
,	O
which	O
supports	O
the	O
following	O
operations	O
:	O
</s>
<s>
Being	O
algorithmically	O
similar	O
to	O
A*	B-Protocol
,	O
LPA*	B-Algorithm
shares	O
many	O
of	O
its	O
properties	O
.	O
</s>
<s>
Each	O
node	O
is	O
expanded	O
(	O
visited	O
)	O
at	O
most	O
twice	O
for	O
each	O
run	O
of	O
LPA*	B-Algorithm
.	O
</s>
<s>
Locally	O
overconsistent	O
nodes	O
are	O
expanded	O
at	O
most	O
once	O
per	O
LPA*	B-Algorithm
run	O
,	O
thus	O
its	O
initial	O
run	O
(	O
in	O
which	O
every	O
node	O
enters	O
the	O
overconsistent	O
state	O
)	O
has	O
similar	O
performance	O
to	O
A*	B-Protocol
,	O
which	O
visits	O
each	O
node	O
at	O
most	O
once	O
.	O
</s>
<s>
The	O
keys	O
of	O
the	O
nodes	O
expanded	O
for	O
each	O
run	O
are	O
monotonically	O
nondecreasing	O
over	O
time	O
,	O
as	O
is	O
the	O
case	O
with	O
A*	B-Protocol
.	O
</s>
<s>
The	O
priority	B-Application
queue	I-Application
implementation	O
has	O
a	O
significant	O
impact	O
on	O
performance	O
,	O
as	O
in	O
A*	B-Protocol
.	O
</s>
<s>
Using	O
a	O
Fibonacci	B-Application
heap	I-Application
can	O
lead	O
to	O
a	O
significant	O
performance	O
increase	O
over	O
less	O
efficient	O
implementations	O
.	O
</s>
<s>
For	O
an	O
A*	B-Protocol
implementation	O
which	O
breaks	O
ties	O
between	O
two	O
nodes	O
with	O
equal	O
f-values	O
in	O
favor	O
of	O
the	O
node	O
with	O
the	O
smaller	O
g-value	O
(	O
which	O
is	O
not	O
well-defined	O
in	O
A*	B-Protocol
)	O
,	O
the	O
following	O
statements	O
are	O
also	O
true	O
:	O
</s>
<s>
The	O
order	O
in	O
which	O
locally	O
overconsistent	O
nodes	O
are	O
expanded	O
is	O
identical	O
to	O
A*	B-Protocol
.	O
</s>
<s>
Of	O
all	O
locally	O
overconsistent	O
nodes	O
,	O
only	O
those	O
whose	O
cost	O
does	O
not	O
exceed	O
that	O
of	O
the	O
goal	O
need	O
to	O
be	O
expanded	O
,	O
as	O
is	O
the	O
case	O
in	O
A*	B-Protocol
.	O
</s>
<s>
LPA*	B-Algorithm
additionally	O
has	O
the	O
following	O
properties	O
:	O
</s>
<s>
When	O
edge	O
costs	O
change	O
,	O
LPA*	B-Algorithm
outperforms	O
A*	B-Protocol
(	O
assuming	O
the	O
latter	O
is	O
run	O
from	O
scratch	O
)	O
as	O
only	O
a	O
fraction	O
of	O
nodes	O
need	O
to	O
be	O
expanded	O
again	O
.	O
</s>
