Re: [CODE]Random 'maze'?

From: doppsoft (
Date: 01/05/97

I've found an implementation of a maze making function (found the 
algorithm on the web) and now I've run into a unique problem.  This is 
the algorithm (in english):

You start off with some sort of regular grid of cells, with walls between 
them (say, the cells of a honeycomb). 
       You go through all those walls in random order. 
              When you come to a wall, you knock it down unless doing so 
would mean that there were two cells connected by two different paths. 
(In other words, unless the two cells on either side of the wall were 
already connected.) 
       When you've done this, you end up with every cell connected to 
every other cell in exactly one way. 
       Then you pick a starting point and a finishing point which are as 
far apart as possible (or something), and you're done. 

Ok, as you can see, this algorithm is actually pretty easy to do with use 
of the find_first_step function.  The problem I am running into is that 
the find_first_step is ALWAYS returning the BFS_NO_PATH, no matter what.  
I do 'knock the wall down' but for some reason, it doesn't recognize the 
change.  Any idea why it does this?

PS. I am going to post this code when I am finished it.
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

This archive was generated by hypermail 2b30 : 12/18/00 PST