Fractal maze


Quite recently (2016) I discovered (on the internets) a new (for me, anyway) type of a maze, called "fractal maze" by its inventor (Mark J.P. Wolf). I think more descriptive name would have been "recursive maze", but it is too late for that.

Here it is:

You need to get from "−" to "+" on top level. Sub-levels A, B and C are exact copies of the top level.

I think it is incredible that it looks so simple. Nothing is hidden, nothing is obscured, the picture is entire maze. You do not even need a computer, there is no complex mechanic, you only need to keep track of your descent stack.

I could not solve the puzzle by just looking at it, so I decided to make a short vim macro to track the movement. I estimated it should take 20-30 minutes, so 10 hours later it actually started working. Here it is, in case somebody is interested: fractal-m.vim. A lot of that time went into ascii rendering of a maze (by hand).

So I had a nice ascii network with reasonably simple rules and virtually no redrawing, but still complex enough, so I have not solved it yet. This souned like an opportunity for a screen0 MSX Basic game.

The game


That is, pretty much, it. Cursor moves along the box-drawing lines and the stack is tracked in the empty space on the lower right (I took screenshot on top level, so the stack is empty).

The biggest challenge was to compress my ascii rendering (which was 32 lines tall) into ≤24 lines rendering which uses box drawing characters. I also had to change naming scheme. Here sub levels have numeric names and exits are letters of the alphabet.

The game is small enough to be "typed in" (after all, I did it). Typing boxdrawing characters was easier than I expected. At this point I do not see how I can compress the maze representation so it would fit into a 3-line game, but I will keep looking, I was surprised before. There is a 3-line implementation of same game rules with a smaller (but still very challenging) maze.

[ MSX BASIC | << Previous | Next >> | Feedback ]