Live data from Hacker News

Python Maze Generator

janthor.com

1–10 of 18 posts

Re: Python Maze Generator

#2
There's probably better ones avaliable now on github, but this one caught my eye.

I was wondering, are there any examples of mazes (real or programs) where the structure, rules or walls change based on a certain algorithmic pattern?

So that you've not only got to find the right way out, but you must crack the code before a way out is even possible.

Kind of like the movie Cube: http://www.imdb.com/title/tt0123755/

Re: Python Maze Generator

#3
I was expecting a simple explanation of some maze generation algorithms, but was very pleasantly surprised with the path-length based visualization stuff. What I mean is that there is more to this page than the title suggests!

Re: Python Maze Generator

#5
One of the things that I continue to notice is that in the machine generated mazes there are always lots of dead-end paths off of mainline path. While when a human makes a maze by hand there tends to be fewer quick dead end paths and a branch will usually take you 4+ squares before you realize that it's non-terminal.

I would think that either there is an algorithm or metric that would score mazes to make them more "realistic". Any references?

Re: Python Maze Generator

#6
post #2

There's probably better ones avaliable now on github, but this one caught my eye. I was wondering, are there any examples of mazes (real or programs) where the structure, rules or walls change based on a certain algorithmic pattern? So that you've not only got to find the right way out, but you must crack the code before a way out is even possible. Kind of like the movie Cube: http://www.imdb.com/title/tt0123755/

There is a (First person, 3D) game, Antichamber, that has some elements of this. The room/corridor around you can change by looking, such as:

Walk up to dead end. Turn around. Corridor is no longer there, a dead end instead. Turn around again. There is now a brand new corridor in fron of you. (These changes never visibly happen, but happen when they are out of view)

Another (more maze like) example can be seen here: https://www.youtube.com/watch?v=v4JxhiNz8ec

(first video I found, there a probably better examples)

Re: Python Maze Generator

#7
sometimes I think there is a very fine line between math visualizations and art.

I keep thinking it would be interesting to take an image (like a face) and let it show through the maze instead of colorizing it.

Re: Python Maze Generator

#10
post #5

One of the things that I continue to notice is that in the machine generated mazes there are always lots of dead-end paths off of mainline path. While when a human makes a maze by hand there tends to be fewer quick dead end paths and a branch will usually take you 4+ squares before you realize that it's non-terminal. I would think that either there is an algorithm or metric that would score mazes to make them more "r…

This article has a description and demo of many different maze generation algorithms: http://weblog.jamisbuck.org/2011/2/7/maze-generation-algorit...

I like the mazes generated by the Hunt-and-Kill and the recursive backtracker algorithms the most. They both generate mazes with long dead-end paths.

Post reply on HN