Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suboptimal path with diagonal and manhattan #49

Open
caryoscelus opened this issue Jan 24, 2024 · 1 comment
Open

suboptimal path with diagonal and manhattan #49

caryoscelus opened this issue Jan 24, 2024 · 1 comment

Comments

@caryoscelus
Copy link

i changed example to allow diagonal movement and experimented a little with it. seems like manhattan fails to find shortest solution under certain conditions. e.g. it produces this
manhattan
instead of
good
(which is produced by other heuristics)

@MWFIAE
Copy link

MWFIAE commented Mar 24, 2025

In Manhattan distance you only care about the distance in terms of horizontal and vertical movement, not about the number of nodes in between. So imho, the calculated solution is equally correct with the one you get from other heuristics or even this one:

Image

Its always 4 horizontally and 5 vertically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants