Maze Generator

This is a piece of python code that has the ability to generate massive mazes. (I created it on the 13th of June 2013 as a one-day project - I was curious as to how big a maze I can get) The algorithm requires extreme depths of recursion, amounts beyond what Python can handle, so I had to bypass this problem by creating my own stack and writing the content of it onto the disk when it became too large.

For extremely large mazes, the program has the ability to bypass main memory limitations by cutting the maze up into sectors. It stores the unused sectors onto the disk and keeps the active ones in the memory. After a few passageways have been created, the algorithm is stuck to working on passageways in a specific part of the maze and does not need to load the sectors from the disk for some time.

Code:

Sample output




All links from the CV