This tutorial will walk you through all the features of this application.
Press "Skip Tutorial" to dive right in or "Next" to preview the tutorial.
1/9
What is a pathfinding algorithm?
A pathfinding algorithm seeks to find the shortest path between two points. This application visualizes the pathfinding algorithms in action!
All of the algorithms in this application are adapted to a 2D grid and allow for 4-directional movement. Movement between nodes has a 'cost' and is always 1
unless there is a wall in the path; in this case the 'cost' is infinity thus forcing the pathfinder to find a cheaper route.
2/9
Picking an algorithm
You can choose an algorithm from the "Algorithms" drop down menu and then run it using the green button.
Note that the first two algorithms are weighted whereas the second two algorithms are unweighted. Additionally, not all algorithms guarantee the shortest path.
3/9
Meet the algorithms
Each algorithm has its own unique twist.
Dijkstra's Algorithm (weighted): the father of pathfinding algorithms; guarantees the shortest path.
A* Search (weighted): uses heuristics to guarantee the shortest path much faster than Dijkstra's algorithm. One major drawback is its space complexity.
Breadth-first Search (unweighted): fundamental algorithm; guarantees the shortest path.
Depth-first Search (unweighted): not ideal for pathfinding; does not guarantee the shortest path.
4/9
Adding walls
Click on the grid to add a wall.
Note that walls are impenetrable (recall that its 'cost' is infinity).
5/9
Adding a checkpoint
Click the "Insert Checkpoint" button.
Adding the checkpoint will change the course of the pathfinder. It will first find the shortest path to the checkpoint and then to the target node.
6/9
Dragging boxes
You can click and drag the start, target, and checkpoint nodes before and after the visualization is complete.
This will allow you to instantly see different paths.
7/9
Visualizing extras
Use the menu buttons to toggle between different speeds and visualization schemas.
If you want access to this tutorial again click the "Pathfinding Visualizer" title.
8/9
Ready to begin!
Peak performance configurations
1) Try to maximize window/screen to get a large playing field.
2) Always wait until visualization is complete (You can toggle speed through-out).
3) Always ensure that the walls aren't completely obstructing the path since then there is no shortest path!