Here, each plan is a single, continuous forking space generated using a depth-first search algorithm until all cells are visited and all walls are removed in the path of the search – then sorted by wall layout.
The number of cells in the space limits the number of unique alternatives generatable (removing mirrored and rotated duplicates).
2 x 2 cells 1 unique maze
2 x 3 cells 5 unique mazes
2 x 4 cells 12 unique mazes
2 x 5 cells 31 unique mazes
3 x 3 cells 12 unique mazes
3 x 4 cells 112 unique mazes
3 x 5 cells 509 unique mazes
3 x 6 cells 2133 unique mazes
4 x 4 cells 481 unique mazes
4 x 5 cells 5395 unique mazes
4 x 6 cells 20132 unique mazes
5 x 5 cells 9054 unique mazes
Here, two openings are created on side walls, and the size of cell columns and rows are randomly expanded in 1:1 / 2:1 proportions.