Understanding the Jump Point Search algorithm
Members - Reputation: 107
Posted 20 June 2012 - 02:04 AM
When using my example implementation with to find the path around a wall, I get this:
The green and red squares represent the start and end "tiles", gray is wall, blue and lightgreen are jump points (I guess the lightgreens are in the open list, blue in the closed). Now, I get why the tiles at the green arrows came out as jump points, since they all got one forced neighbour, but can someone explain to me why the tiles at the red arrows are jump points?
Members - Reputation: 137
Posted 20 June 2012 - 08:37 AM
Members - Reputation: 179
Posted 27 June 2012 - 12:03 AM
Consider what would happen if the blue nodes were not jump points: you would continue to recurse diagonally away from the current node and miss a potential turn of the optimal path. To avoid this problem JPS only recurses diagonally if it determines there are no jump points in a vertical or horizontal direction. If it finds such a node, the recursion stops and the current node returned as a jump point.
Members - Reputation: 354
Posted 06 November 2012 - 10:07 AM
The above image was derived from images from the whitepaper: http://grastien.net/...s/hg-aaai11.pdf
Please see lines 8-11 on Algorithm 2 (function jump) for the logic behind this. I hope that this helps you to understand why the successor node is forced in this particular scenario.
Check out our latest game Munchy Bunny!
Editor Tool: Rotorz Tile System (for Unity 3D)