currently, gen_prim simply passes randomized_stack=True to gen_dfs. Prim's algorithm requires randomly selecting from the neighboring cells at random, but because a cell can have more than one neighbor, selecting from the stack at random causes a bias (at least that's what I think is happening). In any cases, the generated mazes look weird and have long hallways where they shouldn't.
currently,
gen_prim
simply passesrandomized_stack=True
togen_dfs
. Prim's algorithm requires randomly selecting from the neighboring cells at random, but because a cell can have more than one neighbor, selecting from the stack at random causes a bias (at least that's what I think is happening). In any cases, the generated mazes look weird and have long hallways where they shouldn't.