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

Better resigning behaviour #264

Merged
merged 5 commits into from
Mar 11, 2016
Merged

Better resigning behaviour #264

merged 5 commits into from
Mar 11, 2016

Conversation

ujh
Copy link
Owner

@ujh ujh commented Mar 7, 2016

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. :)

@ujh ujh added this to the 0.3.2 milestone Mar 7, 2016
let win_ratio = n.win_ratio();
if win_ratio == 0.0 {
Pass(color)
} else if win_ratio < 0.01 && game.winner() != color {
Copy link
Owner Author

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.

Copy link
Collaborator

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

Copy link
Owner Author

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.

Copy link
Collaborator

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.

@ujh
Copy link
Owner Author

ujh commented Mar 11, 2016

As expected this works:

13x13: 39.91% wins (172 games of 431, ± 4.6 at 95%, ± 4.69 at 99%)
9x9: 84.6% wins (423 games of 500, ± 3.15 at 95%, ± 3.21 at 99%)

ujh added a commit that referenced this pull request Mar 11, 2016
@ujh ujh merged commit e7643b3 into master Mar 11, 2016
@ujh ujh removed the wip label Mar 11, 2016
@ujh ujh deleted the 263-better-resigning-behaviour branch March 18, 2016 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Very low time limits weird passes
2 participants