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?
At its core, a pathfinding algorithm seeks to find the shortest path between two points. This application visualizes various pathfinding algorithms in action, and more!
All of the algorithms on this application are adapted for a 2D grid, where 90 degree turns have a "cost" of 1 and movements from a node to another have a "cost" of 1.
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!