Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Understanding the D* lite whitepaper


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 sectrix   Members   -  Reputation: 105

Like
0Likes
Like

Posted 13 June 2012 - 04:14 PM

I'm writing a tool for a game I play, and I've found I need a good pathfinding algorithm.

I've already written an A* and a Dijkstra routine, but I've found them to be far too slow. It takes them about 20 and 13 seconds respectively to find the shortest path along the longer routes.

I've come across D* lite as a possible better solution, but there's very little information on the web. Some of what I did find came from here several years ago, so, here's to hoping those members are still around.

I found and read Koenig's 2002 paper about it, (this one), and I understand all of the LPA* pseudo code except for two lines:

- Calculate keys()
In the calculateKeys function, it reads: Return[ min( g(s), rhs(s) ) + h(s, sgoal) ; min ( g(s), rhs(s)) ]. What I don't understand is the ; in the middle. Does the function return two values? Does it perform some sort of operation on the results of the two min statements?

- Update vertex and rhs calculation
The other line I had trouble with was this one: min s' (is element of) pred(s) (g(s'), c(s', s)). I don't get that one at all. The s' in pred() with the smallest g or c?

I feel like I'm going to get a lot of blank stares, but, any ideas anyone?

Sponsor:

#2 TheUnbeliever   Members   -  Reputation: 961

Like
2Likes
Like

Posted 13 June 2012 - 05:37 PM

Does the function return two values?


It returns a pair or 2D vector; the authors have opted for [a;b] over (a,b) to improve legibility.

The other line I had trouble with was this one: min s' (is element of) pred(s) (g(s'), c(s', s)). I don't get that one at all. The s' in pred() with the smallest g or c?


I don't see this line. I do see min s' (is element of) pred(s) (g(s') + c(s', s)) - i.e. the minimum of the expression on the right over all predecessors of s.

EDIT: slightly clearer wording.

Edited by TheUnbeliever, 13 June 2012 - 05:38 PM.

[TheUnbeliever]

#3 sectrix   Members   -  Reputation: 105

Like
0Likes
Like

Posted 13 June 2012 - 06:16 PM

I see. So the second line is basically: the minimum s' in predecessors of u, as calculated by ( g(s') + c (s', u) ).

Excellent, thank you so much for that.

One follow up question then.

When comparing: U.TopKey < calculateKeys, ie: (X1, Y1) < (X2, Y2), is this (X1 < X2) AND (Y1 < Y2), or (X1 < X2) OR (Y1 < Y2), or something else entirely?

Edited by sectrix, 13 June 2012 - 06:31 PM.


#4 TheUnbeliever   Members   -  Reputation: 961

Like
2Likes
Like

Posted 13 June 2012 - 07:57 PM

the minimum s' in predecessors of u, as calculated by ( g(s') + c (s', u) ).


Not quite. That would be written 'argmin', whereas we just have 'min'. This is the minimum value of g(s') + c(s',u) for any predecessor s', not the predecessor itself.

When comparing: U.TopKey < calculateKeys, ie: (X1, Y1) < (X2, Y2), is this (X1 < X2) AND (Y1 < Y2), or (X1 < X2) OR (Y1 < Y2), or something else entirely?


Explained from around the middle of the first paragraph on page 478, starting at 'keys are compared according to a lexicographic ordering.'
[TheUnbeliever]

#5 sectrix   Members   -  Reputation: 105

Like
0Likes
Like

Posted 14 June 2012 - 03:22 AM

OK, I had it backwards then. It's the minimum of ( g(s') + c(s', u) ) as calculated with all s' in predecessors of u.

And the key comparison is: (X1, Y1) <= (X2, Y2) iff (X1 < X2) OR [X1 = X2 AND Y1 <= Y2].
Have I got it right?


And it seems that everywhere in the pseudo code where there is a < with a dot above it represents this lexicographic comparison, correct?

#6 TheUnbeliever   Members   -  Reputation: 961

Like
1Likes
Like

Posted 14 June 2012 - 04:58 AM

Three affirmatives. :-) (I hadn't even noticed the dot first time!)
[TheUnbeliever]

#7 sectrix   Members   -  Reputation: 105

Like
0Likes
Like

Posted 14 June 2012 - 03:21 PM

Fantastic. I really appreciate the help.

I owe you a pint.

#8 xiongyouyi   Members   -  Reputation: 150

Like
0Likes
Like

Posted 15 July 2012 - 05:04 AM

Is D* better than HPA*?




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS