Our great sponsors
-
pathfinding
Visual explanation of pathfinding algorithms and how a*, Dijkstra and BFS can be seen as the same algorithm with different parameter/data structures used under the hood (by npretto)
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
I think your priority queue is doing O(nlogn) sort for every insert https://github.com/npretto/pathfinding/blob/master/src/algo/...
This should be a heap instead.
Same story, made something similar in straight JavaScript while I was at school and never showed it to anyone:
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/quyQR)
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 your 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)