# Meaning of s_last in D star Lite algorithm

In the D*Lite algorithm, described in line 21 of Figure 3, on page 4, in D* Lite, the main() starts with defining $s_{last}=s_{start}$. But value of $s_{last}$ is never updated in the entire algorithm.

So what is the purpose of defining this term and what does it mean?

• @BendingUnit22 - I can understand why the OP did not include the pseudo code, as it is not a simple copy and paste job. I have updated the question, with accurate references, a link and a screen shot of the relevant pseudo code. – Greenonline Apr 8 '16 at 11:40

$s_{last}$ does change.

Looking at the pseudo code, $s_{last}$ is updated upon each iteration of the while loop in main(), in line 31, $s_{last}=s_{start}$, if the condition on line 29 is met:

if any edge costs changed


Likewise, in figure 4 $s_{last}$ is updated on line 39:

• But, before updating the value of $s_{last}$ isn't its value already equal to $s_{start}$ as defined in line 21 of unoptimized version? @Greenonline – vacky Apr 8 '16 at 19:11
• @vacky I knew you would ask that :-) yes, but in line 25 s_start varies... and so s_last varies also. However, I am not giving you a particularly good explanation as to why... I am merely looking at the logic of the pseudo code. Apologies. – Greenonline Apr 8 '16 at 20:41
• Do you mean in line 26? @Greenonline – vacky Apr 8 '16 at 20:54
• @vacky - Sorry, yes - 26 - Error due to parallax.... :-) – Greenonline Apr 8 '16 at 21:48