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 bug in resign logic #102
Conversation
It looks like the build is failing because its using an older version of regex, but it looks fixed in the last master. Manually triggering a re-build should make the error go away. |
Actually, I think my fix is wrong. :) I'll investigate further later. I believe it's a but in the |
The bot lost against Brown (random player) as it resigned when all simulated moves lead to a loss. At the end of the game this can however happen when the only possible moves are plays in the opponents eyes. So now we only resign if both all simulations lead to a loss and playing a pass move would lead to a loss.
OK, here's the real fix. It turns out that the |
Looks fine, but I wonder if keeping the name Playout::new instead of Playout::run is better ? The somewhat implicit contract of new is that it'll only instantiate some object. Here we do some serious work, maybe it'd be better to switch the name over ? |
That is true, of course! |
The bot lost against Brown (random player) as it resigned when all
simulated moves lead to a loss. At the end of the game this can however
happen when the only possible moves are plays in the opponents eyes.
So now we only resign if both all simulations lead to a loss and playing
a pass move would lead to a loss.