Discuss Scratch
- Discussion Forums
- » Show and Tell
- » Scratch Chess Engine - Game of Kings
- ababoin07
-
100+ posts
Scratch Chess Engine - Game of Kings
I take a short break for chess AI (1 or 2 months I think), I need to change my mind, I do not like to spend 30 months on the same thing… (I would continue in “desktop” mode but I would update the project in 1 or 2 months)
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
I take a short break for chess AI (1 or 2 months I think), I need to change my mind, I do not like to spend 30 months on the same thing… (I would continue in “desktop” mode but I would update the project in 1 or 2 months)
Yes, experience shows, with a chess project one is never done, the project never finished. Good luck for your hiatus, looking forward to the next Destructor version.
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
Draw between GoK (black) and White Dove, 10sec think time, both at 94% accuracy: https://lichess.org/ioJZkpXm#138
- HasiLover_Test
-
100+ posts
Scratch Chess Engine - Game of Kings
I just got Ill, I will hold the tournament once im better.
- ababoin07
-
100+ posts
Scratch Chess Engine - Game of Kings
Thank you, I think I’ll release an incredible updatej upon my returnI take a short break for chess AI (1 or 2 months I think), I need to change my mind, I do not like to spend 30 months on the same thing… (I would continue in “desktop” mode but I would update the project in 1 or 2 months)
Yes, experience shows, with a chess project one is never done, the project never finished. Good luck for your hiatus, looking forward to the next Destructor version.
Last edited by ababoin07 (May 18, 2024 11:37:33)
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
I just got Ill, I will hold the tournament once im better.
Get healthy soon!
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
https://lichess.org/ioJZkpXm#138Draw between GoK (black) and White Dove, 10sec think time, both at 94% accuracy:
Rematch, tough fight, GoK(white) wins at 94% vs. 90% accuracy: https://lichess.org/ob5IeBCC#147
Game #3, GoK white, 97% vs. 92% accuracy
Game #4 was great, GoK black, 98% vs. 91% accuracy: https://lichess.org/qMkJuf25#100
Last edited by ArnoHu (May 18, 2024 19:51:40)
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
This is an interesting position: https://lichess.org/Eh6NDyQb#44
Blitz 2 blunders here with Rxe6 (and does not even finish depth 6). And Difficult only saw the effect at depth 9.
I was not 100% sure, but it might be due to this sequence which lasts 9 moves and keeps white up in material until the checkmate: https://lichess.org/Eh6NDyQb#53
I thought GoK should find it during quiescence, but it is a mix of captures, a quiet move, check, then captures again, and that was not supported yet, so I added at least the possibility for one non-capture check to interrupt captures, and GoK sees it at depth 7 now.
If I am understanding the WD log file correctly, it finds it earlier, namely depth 6.
Blitz 2 blunders here with Rxe6 (and does not even finish depth 6). And Difficult only saw the effect at depth 9.
I was not 100% sure, but it might be due to this sequence which lasts 9 moves and keeps white up in material until the checkmate: https://lichess.org/Eh6NDyQb#53
I thought GoK should find it during quiescence, but it is a mix of captures, a quiet move, check, then captures again, and that was not supported yet, so I added at least the possibility for one non-capture check to interrupt captures, and GoK sees it at depth 7 now.
If I am understanding the WD log file correctly, it finds it earlier, namely depth 6.
Last edited by ArnoHu (May 18, 2024 16:53:59)
- birdracerthree
-
500+ posts
Scratch Chess Engine - Game of Kings
https://lichess.org/Eh6NDyQb#44After Rxe6 is played, WD’s evaluation increases at depth 7. I would expect it to be depth 6 (after Qxd6 the sequence is only captures and checks) (depth 7 for GoK to avoid Rxe6). This is an interesting position:
Blitz 2 blunders here with Rxe6 (and does not even finish depth 6). And Difficult only saw the affect at depth 9.
I was not 100% sure, but it might be due to this sequence which lasts 9 moves and keeps white up in material until the checkmate: https://lichess.org/Eh6NDyQb#53
I thought GoK should find it during quiescence, but it is a mix of captures, a quiet move, check, then captures again, and that was not supported yet, so I added at least the possibility for one non-capture check to interrupt captures, and GoK sees it at depth 7 now.
If I am understanding the WD log file correctly, it finds it earlier, namely depth 6.
Why does GoK play Rxe6 in the first place? Element goes for Qg3 (Element decreased it’s depth automatically thanks to the v1.488 update). The move appears to lose material.
Edit : I forgot about Qxd6 after the rook moves. You still trade into a drawn endgame
![](http://cdn.scratch.mit.edu/scratchr2/static/__9c6d3f90ec5f8ace6d3e8ea1e684b778__/djangobb_forum/img/smilies/smile.png)
Last edited by birdracerthree (May 18, 2024 16:39:06)
- Arekkkkkk
-
30 posts
Scratch Chess Engine - Game of Kings
https://lichess.org/Eh6NDyQb#44Why the hell GOK played Rxe6 if almost every other move is winning lol This is an interesting position:
Blitz 2 blunders here with Rxe6 (and does not even finish depth 6). And Difficult only saw the affect at depth 9.
I was not 100% sure, but it might be due to this sequence which lasts 9 moves and keeps white up in material until the checkmate: https://lichess.org/Eh6NDyQb#53
I thought GoK should find it during quiescence, but it is a mix of captures, a quiet move, check, then captures again, and that was not supported yet, so I added at least the possibility for one non-capture check to interrupt captures, and GoK sees it at depth 7 now.
If I am understanding the WD log file correctly, it finds it earlier, namely depth 6.
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
https://lichess.org/Eh6NDyQb#44Why the hell GOK played Rxe6 if almost every other move is winning lol This is an interesting position:
Blitz 2 blunders here with Rxe6 (and does not even finish depth 6). And Difficult only saw the affect at depth 9.
I was not 100% sure, but it might be due to this sequence which lasts 9 moves and keeps white up in material until the checkmate: https://lichess.org/Eh6NDyQb#53
I thought GoK should find it during quiescence, but it is a mix of captures, a quiet move, check, then captures again, and that was not supported yet, so I added at least the possibility for one non-capture check to interrupt captures, and GoK sees it at depth 7 now.
If I am understanding the WD log file correctly, it finds it earlier, namely depth 6.
Blitz 2 does. Because it only gets to a search depth where this move still gains material. And the quiescence stop (no more captures found) is not really quiet.
Improved GoK's detection, now found at depth 6.
Last edited by ArnoHu (May 18, 2024 19:47:12)
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
https://lichess.org/ioJZkpXm#138Draw between GoK (black) and White Dove, 10sec think time, both at 94% accuracy:
Rematch, tough fight, GoK(white) wins at 94% vs. 90% accuracy: https://lichess.org/ob5IeBCC#147
Game #3, GoK white, 97% vs. 92% accuracy
Game #4 was great, GoK black, 98% vs. 91% accuracy: https://lichess.org/qMkJuf25#100
Final game of the series on Scratch 3, 10sec think time. Another miraculous late-midgame escape by GoK (white), after trailing behind 6,0 (it will not always be so lucky, on the other hand WD did not see the mistakes at first either). 88% vs. 83% accuracy: https://lichess.org/mFVirrsW#145
Last edited by ArnoHu (May 19, 2024 05:09:38)
- birdracerthree
-
500+ posts
Scratch Chess Engine - Game of Kings
GoK will get lucky more times than not. White Dove struggles to close out games. Element doesn’t struggle as much, but it gets less opportunities to do so (limited search depth also a factor). We must look into why…https://lichess.org/ioJZkpXm#138Draw between GoK (black) and White Dove, 10sec think time, both at 94% accuracy:
Rematch, tough fight, GoK(white) wins at 94% vs. 90% accuracy: https://lichess.org/ob5IeBCC#147
Game #3, GoK white, 97% vs. 92% accuracy
Game #4 was great, GoK black, 98% vs. 91% accuracy: https://lichess.org/qMkJuf25#100
Final game of the series on Scratch 3, 10sec think time. Another miraculous late-midgame escape by GoK (white), after trailing behind 6,0 (it will not always be so lucky, on the other hand WD did not see the mistakes at first either). 88% vs. 83% accuracy: https://lichess.org/mFVirrsW#145
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
GoK will get lucky more times than not. White Dove struggles to close out games. Element doesn’t struggle as much, but it gets less opportunities to do so (limited search depth also a factor). We must look into why…https://lichess.org/ioJZkpXm#138Draw between GoK (black) and White Dove, 10sec think time, both at 94% accuracy:
Rematch, tough fight, GoK(white) wins at 94% vs. 90% accuracy: https://lichess.org/ob5IeBCC#147
Game #3, GoK white, 97% vs. 92% accuracy
Game #4 was great, GoK black, 98% vs. 91% accuracy: https://lichess.org/qMkJuf25#100
Final game of the series on Scratch 3, 10sec think time. Another miraculous late-midgame escape by GoK (white), after trailing behind 6,0 (it will not always be so lucky, on the other hand WD did not see the mistakes at first either). 88% vs. 83% accuracy: https://lichess.org/mFVirrsW#145
Might be true, replayed same opening with a GoK alteration (yesterdays quiescence check extension from TW, limited in depth for S3 - had quite some perf impact though), and the game went even more extreme, WD had checkmate in 9 and still lost, none of the engines ever saw that evaluation-wise: https://lichess.org/aqZfqVP6#121
Last edited by ArnoHu (May 19, 2024 06:23:20)
- birdracerthree
-
500+ posts
Scratch Chess Engine - Game of Kings
The GoK S3 vs WD and GoK S3 vs Bonsai tend to be chaotic games. Element doesn’t play like this.GoK will get lucky more times than not. White Dove struggles to close out games. Element doesn’t struggle as much, but it gets less opportunities to do so (limited search depth also a factor). We must look into why…https://lichess.org/ioJZkpXm#138Draw between GoK (black) and White Dove, 10sec think time, both at 94% accuracy:
Rematch, tough fight, GoK(white) wins at 94% vs. 90% accuracy: https://lichess.org/ob5IeBCC#147
Game #3, GoK white, 97% vs. 92% accuracy
Game #4 was great, GoK black, 98% vs. 91% accuracy: https://lichess.org/qMkJuf25#100
Final game of the series on Scratch 3, 10sec think time. Another miraculous late-midgame escape by GoK (white), after trailing behind 6,0 (it will not always be so lucky, on the other hand WD did not see the mistakes at first either). 88% vs. 83% accuracy: https://lichess.org/mFVirrsW#145
Might be true, replayed same opening with a GoK alteration (yesterdays quiescence check extension from TW, limited in depth for S3 - had quite some perf impact though), and the game went even more extreme, WD had checkmate in 9 and still lost, none of the engine ever saw that evaluation-wise: https://lichess.org/aqZfqVP6#121
Have you expected WD or Element to beat GoK on Turbowarp by now? We’ve come so close…
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
The GoK S3 vs WD and GoK S3 vs Bonsai tend to be chaotic games. Element doesn’t play like this.GoK will get lucky more times than not. White Dove struggles to close out games. Element doesn’t struggle as much, but it gets less opportunities to do so (limited search depth also a factor). We must look into why…https://lichess.org/ioJZkpXm#138Draw between GoK (black) and White Dove, 10sec think time, both at 94% accuracy:
Rematch, tough fight, GoK(white) wins at 94% vs. 90% accuracy: https://lichess.org/ob5IeBCC#147
Game #3, GoK white, 97% vs. 92% accuracy
Game #4 was great, GoK black, 98% vs. 91% accuracy: https://lichess.org/qMkJuf25#100
Final game of the series on Scratch 3, 10sec think time. Another miraculous late-midgame escape by GoK (white), after trailing behind 6,0 (it will not always be so lucky, on the other hand WD did not see the mistakes at first either). 88% vs. 83% accuracy: https://lichess.org/mFVirrsW#145
Might be true, replayed same opening with a GoK alteration (yesterdays quiescence check extension from TW, limited in depth for S3 - had quite some perf impact though), and the game went even more extreme, WD had checkmate in 9 and still lost, none of the engine ever saw that evaluation-wise: https://lichess.org/aqZfqVP6#121
Have you expected WD or Element to beat GoK on Turbowarp by now? We’ve come so close…
Well, we have seen stable and volatile games on S3, depending how it develops.
I think both can win single games, mainly on TurboWarp, if they gain some material advantage during midgame and hold on to it during endgame. On S3 it is more about situational luck.
Last edited by ArnoHu (May 19, 2024 06:21:45)
- birdracerthree
-
500+ posts
Scratch Chess Engine - Game of Kings
I have implemented knight underpromotion for Element Dev!
Test positions (in case WD wants to add this) :
https://lichess.org/study/FYcWqN5E/DpzqGYqX (Mate in 3) (I lost the position)
https://lichess.org/study/FYcWqN5E/KtK7oKLW (This is the simplest position I could think of to test this. This is the only position that is 100% composed in the study.
https://lichess.org/study/FYcWqN5E/bO4UkZFH Although Element doesn’t reach the expected depth, it still sees something (evaluation -0.3)
https://lichess.org/study/FYcWqN5E/gdgxdR5F - This comes from a GoK-WD game (page 159). WD played Ng6?? instead of Nc6! because it doesn’t have underpromotion.
Test positions (in case WD wants to add this) :
https://lichess.org/study/FYcWqN5E/DpzqGYqX (Mate in 3) (I lost the position)
https://lichess.org/study/FYcWqN5E/KtK7oKLW (This is the simplest position I could think of to test this. This is the only position that is 100% composed in the study.
https://lichess.org/study/FYcWqN5E/bO4UkZFH Although Element doesn’t reach the expected depth, it still sees something (evaluation -0.3)
https://lichess.org/study/FYcWqN5E/gdgxdR5F - This comes from a GoK-WD game (page 159). WD played Ng6?? instead of Nc6! because it doesn’t have underpromotion.
Last edited by birdracerthree (May 19, 2024 07:03:43)
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
Just fixed a draw-by-repetition detection bug, that had caused some mysterious draws in the past.
Quick question, do you check for a 1st repetition, or must it be a 2nd? Most engine code I have seen go for 1st, but I am afraid it will make draws seem inevitable when there would still be a path out…
Quick question, do you check for a 1st repetition, or must it be a 2nd? Most engine code I have seen go for 1st, but I am afraid it will make draws seem inevitable when there would still be a path out…
Last edited by ArnoHu (May 19, 2024 09:03:37)
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
Just fixed a draw-by-repetition detection bug, that had caused some mysterious draws in the past.
Quick question, do you check for a 1st repetition, or must it be a 2nd? Most engine code I have seen go for 1st, but I am afraid it will make draws seem inevitable when there would still be a path out…
Instead of second-guessing, I simply activated draw-eval on first repetition, which already came in handy in this 109-move thriller against WD, which GoK won but otherwise would have ended in a draw after move 70: https://lichess.org/ILJPcPHP#217
The problem with the second repetition is, it might come so late (if at all), that until then it is obscured by TT evals, and once the draw eval is calculated, it is too late think-time wise to find a better move, and GoK will walk into the draw (which it sees, but cannot prevent any more).
Also don't quite know what do you with blunder such as on move 19, when king shelter pawn captured opponent pawn (another case of material gain understood as more important than position).
Last edited by ArnoHu (May 19, 2024 10:34:38)
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
https://lichess.org/ioJZkpXm#138Draw between GoK (black) and White Dove, 10sec think time, both at 94% accuracy:
Rematch, tough fight, GoK(white) wins at 94% vs. 90% accuracy: https://lichess.org/ob5IeBCC#147
Game #3, GoK white, 97% vs. 92% accuracy
Game #4 was great, GoK black, 98% vs. 91% accuracy: https://lichess.org/qMkJuf25#100
Final game of the series on Scratch 3, 10sec think time. Another miraculous late-midgame escape by GoK (white), after trailing behind 6,0 (it will not always be so lucky, on the other hand WD did not see the mistakes at first either). 88% vs. 83% accuracy: https://lichess.org/mFVirrsW#145
GoK's latest version (white) in a low-accuracy but entertaining game against WD (10 sec). Same pattern again, GoK trailing behind during early midgame, enters endgame at roughly equal terms, then wins: https://lichess.org/X2Bkk8vk#149
The evaluation graph roughly correlated with the difference in search depth, not really surprising. During midgame GoK +1.5 in avg. search depth, later +3.
WD got its rook pinned at move 68, that was kind of strange.
Last edited by ArnoHu (May 19, 2024 18:23:14)