Say you want a simple maze on an N by M grid, with one path through, and a good number of dead ends, but that looks \"right\" (i.e. like someone made it by hand without too
It turns out there are 12 classic algorithms to generate "perfect" mazes. A maze is perfect if it has one, and only one, solution. Here are some links to each algorithm, in rough order of my preference.
For more info, check out mazelib on GitHub, a Python library implementing all the standard maze generating/solving algorithms.