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

🐛 Detect threefold repetition on pvNode #796

Merged
merged 6 commits into from
Jun 7, 2024
Merged

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented Jun 3, 2024

Impl with if inside of loop

Test  | threefold-rep-pvNode
Elo   | -4.01 +- 4.65 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | -2.28 (-2.25, 2.89) [0.00, 3.00]
Games | 12728: +3707 -3854 =5167
Penta | [436, 1518, 2561, 1455, 394]
https://openbench.lynx-chess.com/test/378/

Impl with if outside of loop, still losing stc

Test  | threefold-rep-pvNode
Elo   | -4.11 +- 4.55 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | -1.55 (-2.25, 2.89) [-8.00, 0.00]
Games | 13602: +4056 -4217 =5329
Penta | [494, 1652, 2634, 1563, 458]
https://openbench.lynx-chess.com/test/380/

LTC looking slightly better

Test  | threefold-rep-pvNode
Elo   | -2.50 +- 4.87 (95%)
SPRT  | 40.0+0.40s Threads=1 Hash=128MB
LLR   | -0.52 (-2.25, 2.89) [-5.00, 0.00]
Games | 10968: +3050 -3129 =4789
Penta | [322, 1361, 2187, 1302, 312]
https://openbench.lynx-chess.com/test/387/

I'm merging anyway, it looks very bad to report lost positions such as this one as 0.0

position fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQK1NR w KQq - 0 1 moves b1c3 c7c5 d2d4 c5d4 d1d4 b8c6 d4a4 d7d5 g1f3 g8f6 c1g5 c8d7 g5f6 e7f6 e1c1 c6b4 a4b3 d7e6 d1d4 d8b6 a2a3 b4c6 b3b6 a7b6 d4d2 f8c5 e2e3 c6e7 h1d1 c5d6 c3b5 e8d7 b5d6 d7d6 f3d4 h8c8 e3e4 c8c5 b2b4 c5c4 e4d5 e7d5 c1b2 g7g6 d4b5 d6c6 b5d4 c6d7 d4b5 d7c6 b5d4 c6d6 d4b5 d6e5 d2e2 e5f4 e2d2 f4e5 d2e2 e5f4 e2d2 d5e7 b5d6 c4c7 d1e1 f4g4 c2c3 g4g5 d6e4 g5h6 e4f6 h6g7 f6e4 h7h6 g2g3 e7d5 d2d4 d5f6 e4d6 c7d7 e1e2 a8d8 d6b5 e6d5 h2h4 d8c8 e2e1 c8d8 e1e3 d8c8

@eduherminio eduherminio marked this pull request as ready for review June 7, 2024 10:35
@eduherminio eduherminio changed the title Detect threefold repetition on pvNode 🐛 Detect threefold repetition on pvNode Jun 7, 2024
@eduherminio eduherminio enabled auto-merge (squash) June 7, 2024 10:35
@eduherminio eduherminio merged commit 49b926f into main Jun 7, 2024
27 checks passed
@eduherminio eduherminio deleted the threefold-rep-pvNode branch June 7, 2024 10:39
eduherminio added a commit that referenced this pull request Jun 16, 2024
eduherminio added a commit that referenced this pull request Jun 20, 2024
This reverts commit 49b926f, which caused Lynx to draw by threefold repetition completely won endgames.
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