Generating Pac-Man mazes is harder than you might think

Shaun LeBron set out to generate legit Pac Man mazes, but it turns out their simplicity and elegance concealed unexpectedly hard work: "Generating random Pac-Man mazes is a deceptively difficult problem that I spent some months working on. It is not easy to describe clearly. I hope you are patient."

For example, the underlying grid appears to be 18 tiles wide, but is in fact 28 tiles wide: though paths and walls intuitively seem the same width, walls are at least two tiles thick. Sharp turns, dead ends and assymetry are forbidden.

But having figured out how to work within these constraints—a solution inspired by Tetris is the most aesthetically pleasing—LeBron's results are fabulous.

It seems to me this should be implemented in a close facsimile of the OG Pac-Man "engine", both as Random Pac-Man and as a weird sprawling Pac Man RPG. Code's on github, get cracking!