-
Notifications
You must be signed in to change notification settings - Fork 5
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
Better resigning behaviour #264
Conversation
let win_ratio = n.win_ratio(); | ||
if win_ratio == 0.0 { | ||
Pass(color) | ||
} else if win_ratio < 0.01 && game.winner() != color { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iopq: The check for the winner (IIRC in the sense of Tromp/Taylor rules) is probably what lead to the passing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check for winner prevents a pass in Tromp/Taylor rules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pass move was only excluded when the bot was loosing under TT rules in the lines above. Wouldn't it be possible that it was the best move but that check for the winner then prevented the resigning code from firing? Especially as it's a !=
here and a ==
in line 131.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's probably what the bug is, it was probably supposed to do the opposite, pass if it seems like it's winning, not when it seems like it's losing.
As expected this works:
|
Improve the behaviour when the game is clearly lost, i.e. resign earlier. Hopefully this will fix #263.
@iopq: This is marked as WIP as the benchmarks aren't finished, yet. Please don't merge yet. :)