# How can you tell the heuristic value using Manhattan method when using Convex search space?

## Recommended Posts

lucky6969b    1330
It it hard to tell how x and y spans across the distance between the agent's current position and the destination?
Any ideas?
Thanks
Jack

##### Share on other sites
Perhaps a better-worded question is in order?

##### Share on other sites
lucky6969b    1330
I mean it is hard to tell the x-y distance between the current position and the desintation.
If you use Manhattan Heuristic, there is no such thing as 2 squares apart in the x-axis and 2 squares apart in the y-axis as the shapes are all irregular.

Thanks
Jack Edited by lucky6969b

##### Share on other sites
C0lumbo    4411
So if I understand correctly, you're trying to use the manhattan heuristic, but you're finding it difficult, because your A* graph is not a regular 2D grid? Is that the problem you're facing?

If so, then you simply cannot use the manhattan heuristic. I suggest you use straight line distance instead, (the Euclidean Distance described in this link [url="http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html"]http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html[/url])

##### Share on other sites
lucky6969b    1330
Yes, you guess it right. That's what I am talking about.
thanks
Jack