anyone can share a link for a tutorial or article about optimizing A* for horizontal / vertical movement (no diagonal). Is not as easy as change the G values to 10 everytime.
Thanks
|
anyone can share a link for a tutorial or article about optimizing A* for horizontal / vertical movement (no diagonal). Is not as easy as change the G values to 10 everytime. Thanks |
|||
|
|
|
A* is a graph search; the algorithm doesn't know or care whether you're searching a grid (with or without permissible diagonal movement) or a free-form graph. To "optimize" for the case where diagonal movement isn't allowed, make sure to never return diagonally-adjacent nodes when computing the neighbors of the current node. Between that and selecting an appropriate heuristic for your scenario, there's little in the way of optimizations available specifically for the 4-directional grid case (as far as I'm aware). |
|||||||||||||
|
|
I found the info needed here: http://theory.stanford.edu/~amitp/GameProgramming/Heuristics.html#S7 |
|||
|
|