2
$\begingroup$

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?

Pseudo Code from figure 3

$\endgroup$
1
  • 1
    $\begingroup$ @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. $\endgroup$ Commented Apr 8, 2016 at 11:40

1 Answer 1

3
$\begingroup$

$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:

Pseudo Code from figure 4

$\endgroup$
4
  • $\begingroup$ 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 $\endgroup$
    – vacky
    Commented Apr 8, 2016 at 19:11
  • $\begingroup$ @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. $\endgroup$ Commented Apr 8, 2016 at 20:41
  • $\begingroup$ Do you mean in line 26? @Greenonline $\endgroup$
    – vacky
    Commented Apr 8, 2016 at 20:54
  • $\begingroup$ @vacky - Sorry, yes - 26 - Error due to parallax.... :-) $\endgroup$ Commented Apr 8, 2016 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.