Hacker News new | ask | show | jobs
by s-macke 4048 days ago
I would like to see a code, which solves a maze by calculating the Poisson equation for pressure. As boundary condition set high pressure at the start of the maze and low pressure at the end and follow the steepest decent.
3 comments

this kind of idea has been explored under the name "collaborative diffusion".

e.g. http://sgd.cs.colorado.edu/wiki/Collaborative_Diffusion

Thanks. Indeed, the idea looks similar.
I assume Neumann 0 boundary condition at the walls. Would it always solve the maze though? It seems intuitively true but hard to prove.
Hacked something together. Seems to work.

http://simulationcorner.net/maze/

Yes, open boundary conditions at the walls.

I am not sure what happens if you have two possible paths to the exit but one of them is wider, but longer. It might not always find the shortest path.

I like this main idea, because it is independent on the dimension and structure of the maze.

I really like this idea!