Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix prim's algorithm implementation #12

Open
mivanit opened this issue Sep 3, 2023 · 0 comments
Open

fix prim's algorithm implementation #12

mivanit opened this issue Sep 3, 2023 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@mivanit
Copy link
Member

mivanit commented Sep 3, 2023

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.

@mivanit mivanit added bug Something isn't working enhancement New feature or request labels Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant