Click to See Complete Forum and Search --> : [RESOLVED] does anybody know A*?


Feoggou
March 16th, 2009, 02:45 PM
Hi, I am trying to learn this algorithm, and I'm having some problems with it. I found somewhere a pseudocode and am trying to make it work for a sample, which is a kind of map (very small), using GDI.

first, I'd like to ask:
what happens if the tile presumed by the algorithm is not efficient?
e.g.: (I noted, 0 - the origin, X - the target, B - block (cannot pass through):


B

B
..............................
B
B
B
B
0 B X
B


what if the algorithm chooses first to go up?

then, in the small map(jpg) I uploaded, if the algorithm first chooses to go right... will it put all (from the right part of the origin) empty places in the closedlist and then erase them, and then go in other parts to explore (first, on the origin's area, then left through the channel)? (it doesn't seem to efficient).

please, help me.

Russco
March 16th, 2009, 09:13 PM
This (http://www.policyalmanac.org/games/aStarTutorial.htm) is a good resource for A*. Reading this tutorial and the linked material should improve your understanding of A* pathfinding greatly.

Feoggou
March 18th, 2009, 07:04 AM
Thanks a lot for the link!
(There are also links to many interesting and needed things)