Difference between revisions of "Brain Maze"

From Noah.org
Jump to navigationJump to search
Line 8: Line 8:
  
 
You can run the brain maze algorithm by clicking here: [http://www.noah.org/cgi-bin/brainmaze.py brainmaze.py]
 
You can run the brain maze algorithm by clicking here: [http://www.noah.org/cgi-bin/brainmaze.py brainmaze.py]
 +
 +
Download [http://www.noah.org/wiki/extensions/download_svn.php?filename=brainmaze.py brainmaze.py]
  
 
<table border="0" cellpadding="0" cellspacing="0">
 
<table border="0" cellpadding="0" cellspacing="0">

Revision as of 12:18, 7 December 2007


This is a fractal algorithm I created for generating mazes. I think it's pretty neat. The original was written in C for a computer science class I was taking at UCSC. This version is in Python. The original would print spaces and hashes (#) to display the maze. This version also generates HTML.

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

Download brainmaze.py

<include svncat src="file:///home/svn/src/python/brainmaze.py" highlight="python" />