Fractal block mazes are the recursive maze created by omeometo.
This is the javascript to solve them by iterative deepening for the depth.
play here online:
- https://koteitan.github.io/fractalblockmaze/ (stable version)
- https://koteitan.github.io/staged/fractalblockmaze/ (beta version)
- left-side (or upper-side in vertical arrangement) is a fractal generating pattern.
- right-side (or lower-side) is a fractal block maze generated by the pattern.
- the start of the maze is the lower-edge.
- the goal of the maze is the upper-edge.
- colors:
- black cells are walls.
- white cells are empty.
- pink cells are the cells in a openlist (searching cells).
- pale pink cells are the cells in a closelist (searched cells).
- blue cells are the found solution path from start to goal.
- operations:
- left-click or drag on the generating pattern:
- toggle the cell's color.
- left-click on the maze:
- zoom in one depth
- right-click on the maze(or press zoom out button):
- zoom out one depth
- left-click or drag on the generating pattern:
- interfaces:
- unit: the number of the parts an edge of the black cell has.
- draw depth: the drawn depth.
- solver depth: the maximum depth in that the solver searches the solution.
- solver status: the status display.
- pause: pause solver.
- reset: reset solver.
- v1.17b (beta version):
- path search algorithm:
- search every white cells in 4-neighbor in [solver depth] depth and put them in the openlist.
- if there is a black cell in 4-neighbor and there is a white cell in 4-neighbor of the black cells and the solver got a inner path to go thru to the white cell, put it in the openlist.
- inner path findings:
- when the solver reachs to the left-end in depth 1, it gets down<->left inner path.
- when the solver reachs to the right-end in depth 1, it gets down<->right inner path.
- cost function of openlist:
- the depth of the cells are the costs of the cells. (the deeper depth is the larger costs)
- path search algorithm:
- v1.11:
- path search algorithm:
- search every white cells in 4-neighbor in [solver depth] depth and put them in the openlist.
- cost function of openlist:
- the distance between upper-edge of the maze and upper-edge position is the costs. (the upper is the lower costs.)
- path search algorithm:
- W. Pullen, "DAEDALUS v1.2", 2003.6
- M. Wolf, "The Small Fractal Maze", Multi-state Mazes, Math Games by E. Pegg Jr., Nov 24, 2003
- omeometo, "fractal maze とか", omeometo の日記, 2018.12.28. (in Japanese)