Skip to content

Conversation

@truggeri
Copy link
Owner

Summary

Use a map to store all empty spaces (thus assuming the puzzle will be mostly walls). There are a few "performance" improvements here such as,

  • Only store a solution if the cost is less than other solutions
  • Save the cost it takes to get to a square, only continue with a thread if the cost is less than what another solution took to get to that square
  • If the cost of a thread exceeds the current best solution, then don't bother continuing

@truggeri truggeri self-assigned this Dec 30, 2024
@truggeri truggeri merged commit 8d21a04 into main Dec 30, 2024
1 check passed
@truggeri truggeri mentioned this pull request Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants