Introduction
Finding the shortest path on a grid is a fundamental challenge in robotics and game development. While the A* algorithm is the standard approach, it often suffers from performance bottlenecks due to path symmetry—where numerous paths between two points have identical costs, leading to redundant exploration. Jump Point Search (JPS) was developed to mitigate this by "jumping" over empty space, but its application has historically been limited to uniform-cost grids. Weighted Jump Point Search (JPSW) extends this high-speed performance to complex maps with varying terrain costs, such as roads, swamps, or forests.
The Challenge of Weighted Grids
In uniform grids, JPS identifies "interesting" points solely based on wall corners. In weighted environments, however, any change in terrain cost can alter the optimal path. Simply applying JPS logic to weighted maps leads to "overscanning," where the algorithm redundantly checks the same areas multiple times as shown in Figure 4. This phenomenon can lead to quadratic complexity in the worst cases, negating the benefits of jumping.
Methodology: Weighted Jump Point Search (JPSW)
JPSW introduces several innovations to maintain optimality while maximizing speed:
- Orthogonal-Last Tie-breaking: By preferring diagonal moves early and orthogonal moves last, the algorithm enforces a "canonical" path, effectively ignoring 90% of the search space.
- Neighborhood Pruning: A local Dijkstra search within a $3 \times 3$ area determines which neighboring moves are necessary for an optimal path.
- Aggressive Jumping at Boundaries: JPSW treats terrain cost changes as "virtual corners," stopping to re-evaluate only at these borders (see Figure 2).
- Overscanning Mitigation: Techniques like Diagonal Branch Pruning and Orthogonal Jump Caching reduce the worst-case complexity of these scans from quadratic to linear by storing and reusing jump results.
Experimental Evaluation
The researchers tested JPSW against A across diverse benchmarks, including synthetic "Stripes" maps and real-world game maps from Dragon Age and StarCraft*.
- Speed: JPSW achieved up to 30x speedups on worst-case synthetic maps and consistently performed 4.5x to 8x faster than A* on realistic game environments.
- Optimality: Mathematical proofs ensure that JPSW always finds the shortest path despite its aggressive pruning and jumping logic.
- Adaptability: The algorithm supports dynamic maps through incremental cache updates, making it suitable for real-time applications where terrain might change (e.g., a bridge being destroyed).
Conclusion
JPSW represents a significant advancement in grid-based pathfinding, bringing the efficiency of jump-point logic to the complex, weighted environments common in modern applications. While it requires additional memory for its jump cache, the order-of-magnitude speedup over A* makes it a compelling choice for performance-critical systems. Future work may focus on further refining pruning rules for continuous gradient cost fields, such as those found in risk-based maps.
Summary updated