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.
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.