Welcome to this Path Finding visualization (and also, my first GitHub project 😜 )!
You can have fun with this project at https://giacomoporpiglia.github.io/VisualPathFinding/ (Use Chrome!!!)
The project is built with vanilla javascript, html and css ONLY , without the help of frameworks like React, so I know it may not look awesome, but it does its job :)
At the moment you can try 4 different Algorithms:
Dijkstra is the father of all pathfining algorithms, and it always gives the BEST path from a starting node to the end. It doesn't rely on heuristic, therefore it expands every node in the graph based on its distance from the starting node. You can find more here
A* is a path-finding algorithm which is often used in many fields of computer science due to its completeness, optimality, and optimal efficiency. It uses a conept called "heuristic" (which yuo can play with on the demo) to choose what node to evaluate next, based on its chance of being the right one for the optimal path. You can find more here
Breadth-first search (BFS) starts at the tree root and explores all nodes at the present depth prior to moving on to the nodes at the next depth level. It is guaranteed that BFS always finds, if existing, the best path from point A to B in a graph. You can find more here
Best-first search is an algorithm which explores a graph by expanding the most promising node. Therefore, since not every node is explored, it's never guaranteed that this algorithm finds the best possible path between point A and B, since it picks the next choice and immediately expands it to keep going forward, without making sure that that choice actually was the best of all. You can find more here
I spent a lot coding this, also because the project is built in vanilla javascript, without any framework like React, which I started using in the following months. So, even though I know the interface is not the best, I hope you appreciate my effort. Hope you enjoy playing with this project I put a lot of effort on, and give me a feedback if you want!