|
|
|
|
|
by squeaky-clean
1316 days ago
|
|
The algorithms do seem wrong. I get this for a DFS on an empty map [0]. And the A star doesn't appear to follow any heuristic during the search. [0] https://imgur.com/a/AvUMxLQ edit: Just wanted to add in case this is more of a frontend demo than a pathfinder demo, it does look beautiful and the search animation is more intuitive than similar demos I've seen. And runs fine on my phone. |
|
It's just that (unlike the other 3 algorithms) DFS doesn't guarantee to find the shortest path, just a path.
Not a problem on mazes with only one solution, but problematic when there are multiple solutions (or near-infinite solutions on an empty map)