Not nearly as hard of a problem, but I built a maze on a Minecraft server for my kids, and used an online random maze generator as a reference. I realized the walls in the generated maze were thin lines of 0 thickness whereas the maze in Minecraft needed to have walls of 1 block thickness. It wasn't hard to redraw the maze by hand with non-zero width walls, but interestingly I had no choice but to redraw it because I couldn't do the conversion in my head and build the maze using the original.
The generated mazes have an incredibly pac-man look to them. I didnt expect my reaction to them. OTOH none of them have the longer paths of some of the Ms Pacman mazes.
While reading I thought the approach seemed overly complex, but the results are very nice.
See also 2010 article about Pac-Man Ghost behaviour, its suprisingly complex for 1980, and each of the four ghosts have slightly different behaviour
https://gameinternals.com/understanding-pac-man-ghost-behavi...