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

optimize and fix n-peg algorithm #325

Open
domino14 opened this issue Mar 28, 2024 · 0 comments
Open

optimize and fix n-peg algorithm #325

domino14 opened this issue Mar 28, 2024 · 0 comments
Labels

Comments

@domino14
Copy link
Owner

domino14 commented Mar 28, 2024

n-peg for n > 1 is broken for non-bag-emptying plays. It often gives the right answer, but that's by accident.

We need to support at least one of the following modes:

When solving the peg recursively:

  • when it is our turn again when the bag is not empty, solve the PEG recursively ("sure wins only")
  • when it is our opponent's turn, solve the PEG on their side ("probable wins")

Also threads are not used optimally; when solving more complex plays and other threads are done they should help.

@domino14 domino14 added the bug label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant