This is a fractal algorithm I created for generating mazes. I think it's pretty neat.
This generates a random maze with no loops -- a single connected path links all elements of the maze. This maze also has the property that it is space filling.
You can run the brain maze algorithm by clicking here: brainmaze.py
<include svncat src="file:///home/svn/src/python/brainmaze.py" highlight="python" />