Maze generation

Melvin H. Nicholson -- YBH nicholso at pioneer.arc.nasa.gov
Fri Dec 21 09:58:15 AEST 1990


Steve Alter writes:
>The right-hand-on-the-wall algorithm, in its simple form, won't be able
>connected) but a simple modification to the algorithm can fix that.
>Just remember every room you've visited, and as you're walking around,
>if you see that you're about to step into an already visited room, then
>just pretend that there's a wall in front of you and continue to apply
>the right-hand rule.  After that, you can forget about that piece of
>phantom wall, because the rooms on both sides of it have been visited.

>
Alan McNeely writes:
>Actually I think you have to remember the wall.  Example:
>             -----
>            !     !
>            !  !  !
>      ______!  !  !
>FINISH            !
>      ------    --
>            !  !
>            !  !
>           START
>
>From Start,  algorithm goes right,  creates imaginary wall coming back
>down toward the 4-way,  and goes back around the inside of the loop.
>If we don't remember the imaginary wall we'll be trapped on the loop
>indefinitely.  Right?
>
>Alan McNeely
>mcneely at bigb.columbia.ncr.com

This algorythim has an even bigger problem, whether the wall is
remembered or not.  If "in front of" means "blocking entrance to the
square" then whenever the "mouse" leaves moves from A toward C through
B, where C is previously traversed and A has two (non-imagined) parallel
walls, the "mouse" will be forced to move back toward A.  Since A has
now been previously traveled a new wall is imagined, keeping the "mouse"
in B moving toward C (and then back to A, ad infinitum)

What did you mean by "in front of" ????

Mel Nicholson
Psycholinguistics Research Associates (PLRA)



More information about the Alt.sources.d mailing list