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

Add ponder support #481

Closed
wants to merge 12 commits into from
Closed

Add ponder support #481

wants to merge 12 commits into from

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented Oct 30, 2023

Ponder enabled vs no pondering 👎🏽👎🏽

Finished game 163 (Lynx-add-ponder-support-1877-win-x64 vs Lynx 1875 - main): * {No result}
Score of Lynx-add-ponder-support-1877-win-x64 vs Lynx 1875 - main: 13 - 120 - 26  [0.164] 159
...      Lynx-add-ponder-support-1877-win-x64 playing White: 10 - 55 - 15  [0.219] 80
...      Lynx-add-ponder-support-1877-win-x64 playing Black: 3 - 65 - 11  [0.108] 79
...      White vs Black: 75 - 58 - 26  [0.553] 159
Elo difference: -283.6 +/- 62.6, LOS: 0.0 %, DrawRatio: 16.4 %
SPRT: llr -2.26 (-78.0%), lbound -2.25, ubound 2.89 - H0 was accepted

Regression: disabled vs no pondering

Score of Lynx-add-ponder-support-1877-win-x64 vs Lynx 1875 - main: 5153 - 5157 - 6970  [0.500] 17280
...      Lynx-add-ponder-support-1877-win-x64 playing White: 3512 - 1673 - 3455  [0.606] 8640
...      Lynx-add-ponder-support-1877-win-x64 playing Black: 1641 - 3484 - 3515  [0.393] 8640
...      White vs Black: 6996 - 3314 - 6970  [0.607] 17280
Elo difference: -0.1 +/- 4.0, LOS: 48.4 %, DrawRatio: 40.3 %
SPRT: llr 2.9 (100.4%), lbound -2.25, ubound 2.89 - H1 was accepted

So at least just need to fix the pondering behavior, but when it's off the perf isn't affected

Fix pondering: save previous position command and use it to restore Game instance before search after ponder hit
0f440ca

Score of Lynx-add-ponder-support-1948-win-x64 vs Lynx 1941 - main: 232 - 99 - 163  [0.635] 494
...      Lynx-add-ponder-support-1948-win-x64 playing White: 140 - 30 - 77  [0.723] 247
...      Lynx-add-ponder-support-1948-win-x64 playing Black: 92 - 69 - 86  [0.547] 247
...      White vs Black: 209 - 122 - 163  [0.588] 494
Elo difference: 95.9 +/- 25.6, LOS: 100.0 %, DrawRatio: 33.0 %
SPRT: llr 2.91 (100.7%), lbound -2.25, ubound 2.89 - H1 was accepted

Player: Lynx-add-ponder-support-1948-win-x64
   "Draw by 3-fold repetition": 97
   "Draw by fifty moves rule": 13
   "Draw by insufficient mating material": 46
   "Draw by stalemate": 3
   "Draw by stalled connection": 2
   "Draw by timeout": 2
   "Loss: Black loses on time": 4
   "Loss: Black makes an illegal move: d4d3": 1
   "Loss: Black mates": 24
   "Loss: Black's connection stalls": 3
   "Loss: White loses on time": 2
   "Loss: White makes an illegal move: d3e4": 1
   "Loss: White mates": 61
   "Loss: White's connection stalls": 3
   "No result": 7
   "Win: Black loses on time": 3
   "Win: Black mates": 90
   "Win: White loses on time": 2
   "Win: White mates": 137
Player: Lynx 1941 - main
   "Draw by 3-fold repetition": 97
   "Draw by fifty moves rule": 13
   "Draw by insufficient mating material": 46
   "Draw by stalemate": 3
   "Draw by stalled connection": 2
   "Draw by timeout": 2
   "Loss: Black loses on time": 3
   "Loss: Black mates": 90
   "Loss: White loses on time": 2
   "Loss: White mates": 137
   "No result": 7
   "Win: Black loses on time": 4
   "Win: Black makes an illegal move: d4d3": 1
   "Win: Black mates": 24
   "Win: Black's connection stalls": 3
   "Win: White loses on time": 2
   "Win: White makes an illegal move: d3e4": 1
   "Win: White mates": 61
   "Win: White's connection stalls": 3
Finished match

Remove special ponder hit treatment
and

Make sure to cancel ponder search on new game and avoid fake ponder h…Finished game 235 (Lynx-add-ponder-support-1950-win-x64 vs Lynx-add-ponder-support-1948-win-x64): 1-0 {White mates}

cutechess crashes

Try again ponder hit logic of reusing killers and not deleting history

Score of Lynx-add-ponder-support-2025-win-x64 vs Lynx 2024 - main: 210 - 77 - 131  [0.659] 418
...      Lynx-add-ponder-support-2025-win-x64 playing White: 123 - 27 - 59  [0.730] 209
...      Lynx-add-ponder-support-2025-win-x64 playing Black: 87 - 50 - 72  [0.589] 209
...      White vs Black: 173 - 114 - 131  [0.571] 418
Elo difference: 114.5 +/- 28.4, LOS: 100.0 %, DrawRatio: 31.3 %
SPRT: llr 2.9 (100.2%), lbound -2.25, ubound 2.89 - H1 was accepted

Player: Lynx-add-ponder-support-2025-win-x64
   "Draw by 3-fold repetition": 81
   "Draw by fifty moves rule": 15
   "Draw by insufficient mating material": 30
   "Draw by stalled connection": 3
   "Draw by timeout": 2
   "Loss: Black loses on time": 1
   "Loss: Black mates": 25
   "Loss: Black's connection stalls": 1
   "Loss: White loses on time": 1
   "Loss: White mates": 48
   "Loss: White's connection stalls": 1
   "No result": 3
   "Win: Black loses on time": 3
   "Win: Black mates": 84
   "Win: White loses on time": 3
   "Win: White mates": 120
Player: Lynx 2024 - main
   "Draw by 3-fold repetition": 81
   "Draw by fifty moves rule": 15
   "Draw by insufficient mating material": 30
   "Draw by stalled connection": 3
   "Draw by timeout": 2
   "Loss: Black loses on time": 3
   "Loss: Black mates": 84
   "Loss: White loses on time": 3
   "Loss: White mates": 120
   "No result": 3
   "Win: Black loses on time": 1
   "Win: Black mates": 25
   "Win: Black's connection stalls": 1
   "Win: White loses on time": 1
   "Win: White mates": 48
   "Win: White's connection stalls": 1

@eduherminio
Copy link
Member Author

eduherminio commented Nov 10, 2023

Issue with original impl detecting score 0
logs-draw-detection.txt

@eduherminio
Copy link
Member Author

eduherminio commented Nov 13, 2023

@eduherminio eduherminio mentioned this pull request May 27, 2024
@eduherminio
Copy link
Member Author

Closing in favor of #772

@eduherminio eduherminio deleted the add-ponder-support branch May 27, 2024 20:12
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.

1 participant