At 3/5/13 01:44 PM, ImpotentBoy2 wrote:
At 3/5/13 01:27 PM, Rustygames wrote:
So first it will check above, then left, then right and then finally below the last tile. That's why it takes a couple of steps to the right first and the rest of the weirdness is making up for that initial decision (while moving it as close to the goal as possible).that's where I'm confused. if it was up,left,right,down respectively I'm surprised the path I got wasn't r,r,r,r,r,r,r,d,d,d,d,d.
r,r,r,r,r,r,d,d,d,d,d,d wouldn't be as optimal in terms of the heuristic because the heuristic is a straight line. It will try and go as straight as possible, but it favors certain directions where it makes no difference (in this case up, then left, then right then down).
I agree it isn't as aesthetically pleasingquite the opposite, I find it organic.
You might be right, I will add a little man to follow the path and try the 2 methods and we'll see which one is nicest.