Live data from Hacker News

Pathfinding Visualizer

pathfinding-visualizer-nu.vercel.app

11–20 of 55 posts

Re: Pathfinding Visualizer

#11
post #7

Earlier quoted context omitted.

Maybe it does only horizontal and vertical steps. In that case it makes no difference, because the heuristic should always give you the Manhattan distance, which is equal for all options that don't overshoot the goal.

The blue squares show the nodes it checked, and with A star the entire map shouldn't be blue on an empty maze.

Yeah _0ffh's point makes sense on the path found. But even if it finds a path that is basically one horizontal one vertical line, it should still check the immediate neighbors only.

Re: Pathfinding Visualizer

#12
post #6

Am I missing something that this is doing something other than finding shortest paths? For example A* on an empty map should generate a diagonal path with almost no checks outside the paths immediate neighbors. But I get this: https://link.ekin.dev/OTW2xy

[deleted]

Re: Pathfinding Visualizer

#13
post #7

Earlier quoted context omitted.

Maybe it does only horizontal and vertical steps. In that case it makes no difference, because the heuristic should always give you the Manhattan distance, which is equal for all options that don't overshoot the goal.

The blue squares show the nodes it checked, and with A star the entire map shouldn't be blue on an empty maze.

Yeah right, in that case there's something wrong there! Maybe in the way it queues up the options.

Re: Pathfinding Visualizer

#14

Nice! Some feature requests: The contrast between the walls and the blue (explored) areas is too low. When I press the round button to retry, the maze disappears. I'd like to see the same maze solved with different algorithm, or even see the same algorithm a few times. So my recommendation is to not errase the map, until the user press the button to make another map.

+1 for maze not disappearing. Comparing the different algorithms is the actually pleasing thing to watch.

+1 also for being a persistent maze when switching search algos. Lovely visualisation though!

Re: Pathfinding Visualizer

#15
Very nice! This brings back memories. In the 90's sometime I found a GIF of a huge maze and I wanted to find the solution. Young coder me decided to write a program in VB to find the solution. Just went and grabbed a screen shot of it here: https://i.imgur.com/gRz5b01.png I can't remember how long it took it to solve it back then but it solves it now on modern hardware in about 3 seconds. Likely much better ways to do it now, I know nothing about path finding theory. This was just a simple recursive search.

I need to do more of these fun side projects like this just for the pure joy of it.

Re: Pathfinding Visualizer

#19
post #6

Am I missing something that this is doing something other than finding shortest paths? For example A* on an empty map should generate a diagonal path with almost no checks outside the paths immediate neighbors. But I get this: https://link.ekin.dev/OTW2xy

Manhattan metric maybe? In that case a diagonal line isn't shorter than an L-shaped route.
Post reply on HN