Skip to content

feat(pathfinding): Add Jump Point Search (JPS) Algorithm #93

Description

@Sanan507

Overview

Implement Jump Point Search (JPS) for grid pathfinding. JPS is an optimization of A* on uniform-cost grids that skips symmetric paths by jumping across straight lines until a forced neighbor or obstacle is encountered, speeding up pathfinding by up to 10x-100x.

Implementation Details & File Reference

  • Algorithm Model: Create backend/src/main/java/com/algorithmrace/visualizer/algorithms/pathfinding/JPSModel.java extending PathfindingModel.
    • Implement direction-aware jump functions along horizontal, vertical, and diagonal lines.
    • Record jump points and intermediate visited nodes as SimulationFrame frames with distinct CellState markers.
  • Factory Registration: Register "Jump Point Search" in PathfindingFactory.java.
  • Complexity Catalog: Add entry in ComplexityCatalog.java highlighting O(b^d) reduced search space.
  • Frontend Metadata: Add entry in frontend/src/data/algorithmMetadata.ts (complete: true, optimal: true, weighted: false).

Definition of Done

  • Jump Point Search is selectable in the Pathfinding Arena.
  • Shows dramatic node expansion reductions compared to standard A*.
  • Path reconstruction from jump points is optimal and accurate.

Skill Level

Hard — requires implementing diagonal and cardinal jump pruning rules on 2D grid coordinates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions