This python program will search randomly for "optimal" 3D mazes, optimal meaning a maze with the largest number of junctions. Four types of situations are not allowed:
T-junctions:
***
*
Open pockets:
**
**
kitty-corner holes:
*
*
out-of-plane kitty-corner holes (e.g. hole at (1,1,1) and at (2,2,2).