https://jayd.ml/algorithms/search/ (source https://github.com/jaydenmilne/jaydenmilne.github.io/tree/ma...)
Features:
- Draw your own maze!
- Several different algorithms!
- Adjust solving speed / step algorithm!
- Bugs!
- Share your mazes in the URL (abuse link shorteners to store your data! shorturl.at/ioyT9)
I'm quite proud of how I (ab)used async/await to increase the stack size and be able to easily step and delay the algorithms without having to rewrite them to be re-entrant.
(in case you're wondering, left click to draw walls, right click to place start then end node, left click and drag on walls to go into erase mode)
I made this little interactive playground for various pathfinding algorithms showing how they can be seen as a general algorithm with different a different queue and different heuristic in use.
The readme has some theory but the cool thing is the link to the app on netlify where you can experiment moving the positions of start, goal and of the obstacles.
If you're interested I'd suggest you keep the readme open while toying with the app, as the readme has more theory.
For pathfinding, I've made one myself [0], and the Red Blob Games [1] one is also very popular.
[0] https://gabrielgambetta.com/generic-search.html
[1] https://www.redblobgames.com/pathfinding/a-star/introduction...
I once used A* in a coding challenge for a job. Create a grid (in React) where you can place obstacles, wormholes, a start and a finish, and find the shortest route through it. The wormholes normally break A*, but I'd figured out a way to take them into account. Was a fun challenge. (Didn't take the job.)
This should be a heap with O(logn) insert instead to be truly Dijsktra/A*
For others who want to play with visualizing different search algorithms, this is another cool tool:
It seems to crash (white page) if you cover the destination point with the constraint box.
You may want to look into (lazy) Theta* next