Welcome to Pathfinding Visualizer
Hey! Shiba (Creator) here. This is short Tutorial/Info-thingy on how this works. Don't worry I've got you. btw if you go fullscreen (by pressing f11) I'll be happy.
What is a pathfinding algorithm?
At its core, a pathfinding algorithm seeks to find the shortest path between two points that is from the Starting Node (Green) to the Destination Node (Red). Both of them can be dragged across anywhere in the grid. This application visualizes various pathfinding algorithms in action, and more!
All of the algorithms on this application are adapted for a 2D grid of 25x25 nodes, where 90 degree turns have a "cost" of 1 and movements from a node to another have a "cost" of 1. Alright Now you can see some button at the bottom with
- Dijkstra's Algorithm: the father of pathfinding algorithms; guarantees the shortest path
- A* Search: arguably the best pathfinding algorithm; uses heuristics to guarantee the shortest path much faster than Dijkstra's Algorithm.
- Breath-first Search: a great algorithm; guarantees the shortest path.
- Depth-first Search: a very bad algorithm for pathfinding; does not guarantee the shortest path
You can also make walls on the grid by just clicking and dragging your cursor, to give those algorithms some challenge as these Walls are impenetrable, meaning that a path cannot cross through them meaning that the algorithms would explore more paths, hence more exciting visualisation process.