Hacker News new | past | comments | ask | show | jobs | submit login

A* searches on a generic weighted graph, there's no vertical, horizontal nor diagonal movements. The only thing that matters is which nodes exists and how they are connected.

If diagonals on a 2D-grid are forbidden, then you need to use the Manhattan distance as the heuristic.






Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: