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 start and end point selection for percolation #13

Open
2 tasks
mivanit opened this issue Sep 4, 2023 · 0 comments
Open
2 tasks

fix start and end point selection for percolation #13

mivanit opened this issue Sep 4, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mivanit
Copy link
Member

mivanit commented Sep 4, 2023

for a maze generated via percolation, a start point is selected randomly and then another is selected by selecting another from the same connected component. This sometimes selects an isolated cell, and causes the solving algorithm (and other things) to fail, since the start and end point cannot be the same.

Possible tasks:

  • find the largest connected component when selecting the start and end points. The probability of there not being any connections in a pure percolation maze with parameter $p$ is $p^{(n-1)^2}$. For context, this works out to 39% for n=4, p=0.1, so it's still likely to fail
  • A flag in MazeDatasetConfig to allow mazes without solutions
@mivanit mivanit added the bug Something isn't working label 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
Projects
None yet
Development

No branches or pull requests

1 participant