Discuss Scratch
- Discussion Forums
- » Show and Tell
- » Scratch Chess Engine - Game of Kings
- birdracerthree
- Scratcher
500+ posts
Scratch Chess Engine - Game of Kings
Standing pat is not applied during when you are in check and when you are checking the opponent, correct?How does GoK apply stand pat when running check extensions in quiescence? I’m removing stand pat for checks and check evasions, but it is not working.
Standing pat is simply not applied then, and also GoK looks for a check evasion during quiescence search.
By the way, are there any types of puzzles you are interested in? I need more puzzles for the test positions study.
Last edited by birdracerthree (May 13, 2024 04:52:48)
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
Standing pat is not applied during when you are in check and when you are checking the opponent, correct?How does GoK apply stand pat when running check extensions in quiescence? I’m removing stand pat for checks and check evasions, but it is not working.
Standing pat is simply not applied then, and also GoK looks for a check evasion during quiescence search.
By the way, are there any types of puzzles you are interested in? I need more puzzles for the test positions study.
Only for the side that is in check, on its next move. I give it a checkmate base evaluation, and it has to find a way out.
Great puzzles, yes, I already used them before.
Last edited by ArnoHu (May 13, 2024 05:06:48)
- birdracerthree
- Scratcher
500+ posts
Scratch Chess Engine - Game of Kings
So that’s only on check evasions? Is that equivalent to removing stand pat, or is there a difference?Standing pat is not applied during when you are in check and when you are checking the opponent, correct?How does GoK apply stand pat when running check extensions in quiescence? I’m removing stand pat for checks and check evasions, but it is not working.
Standing pat is simply not applied then, and also GoK looks for a check evasion during quiescence search.
By the way, are there any types of puzzles you are interested in? I need more puzzles for the test positions study.
Only for the side that is in check, on its next move. I give it a checkmate base evaluation, and it has to find a way out.
Great puzzles, yes, I already used them before.
I was asking if you need a different type of puzzle that is not in the study.
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
So that’s only on check evasions? Is that equivalent to removing stand pat, or is there a difference?Standing pat is not applied during when you are in check and when you are checking the opponent, correct?How does GoK apply stand pat when running check extensions in quiescence? I’m removing stand pat for checks and check evasions, but it is not working.
Standing pat is simply not applied then, and also GoK looks for a check evasion during quiescence search.
By the way, are there any types of puzzles you are interested in? I need more puzzles for the test positions study.
Only for the side that is in check, on its next move. I give it a checkmate base evaluation, and it has to find a way out.
Great puzzles, yes, I already used them before.
I was asking if you need a different type of puzzle that is not in the study.
If you'd only remove standing pat, I think you would only escape by captures, not by evasions.
- birdracerthree
- Scratcher
500+ posts
Scratch Chess Engine - Game of Kings
So you have to lower alpha as well as remove standing pat, or do I only lower alpha?So that’s only on check evasions? Is that equivalent to removing stand pat, or is there a difference?Standing pat is not applied during when you are in check and when you are checking the opponent, correct?How does GoK apply stand pat when running check extensions in quiescence? I’m removing stand pat for checks and check evasions, but it is not working.
Standing pat is simply not applied then, and also GoK looks for a check evasion during quiescence search.
By the way, are there any types of puzzles you are interested in? I need more puzzles for the test positions study.
Only for the side that is in check, on its next move. I give it a checkmate base evaluation, and it has to find a way out.
Great puzzles, yes, I already used them before.
I was asking if you need a different type of puzzle that is not in the study.
If you'd only remove standing pat, I think you would only escape by captures, not by evasions.
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
So you have to lower alpha as well as remove standing pat, or do I only lower alpha?So that’s only on check evasions? Is that equivalent to removing stand pat, or is there a difference?Standing pat is not applied during when you are in check and when you are checking the opponent, correct?How does GoK apply stand pat when running check extensions in quiescence? I’m removing stand pat for checks and check evasions, but it is not working.
Standing pat is simply not applied then, and also GoK looks for a check evasion during quiescence search.
By the way, are there any types of puzzles you are interested in? I need more puzzles for the test positions study.
Only for the side that is in check, on its next move. I give it a checkmate base evaluation, and it has to find a way out.
Great puzzles, yes, I already used them before.
I was asking if you need a different type of puzzle that is not in the study.
If you'd only remove standing pat, I think you would only escape by captures, not by evasions.
I do not apply standing pat, and return a checkmate evaluation, if there is no better move found.
- birdracerthree
- Scratcher
500+ posts
Scratch Chess Engine - Game of Kings
Alright, thank you. Hopefully I will get check extensions and en passant into Element fairly soon.So you have to lower alpha as well as remove standing pat, or do I only lower alpha?So that’s only on check evasions? Is that equivalent to removing stand pat, or is there a difference?Standing pat is not applied during when you are in check and when you are checking the opponent, correct?How does GoK apply stand pat when running check extensions in quiescence? I’m removing stand pat for checks and check evasions, but it is not working.
Standing pat is simply not applied then, and also GoK looks for a check evasion during quiescence search.
By the way, are there any types of puzzles you are interested in? I need more puzzles for the test positions study.
Only for the side that is in check, on its next move. I give it a checkmate base evaluation, and it has to find a way out.
Great puzzles, yes, I already used them before.
I was asking if you need a different type of puzzle that is not in the study.
If you'd only remove standing pat, I think you would only escape by captures, not by evasions.
I do not apply standing pat, and return a checkmate evaluation, if there is no better move found.
GoK is becoming too powerful. GoK 7.000 will be coming
- AZURUS41
- Scratcher
57 posts
Scratch Chess Engine - Game of Kings
I put the code of my bot on github, so even if this isn't scratch, it can now be used for test games : https://github.com/Azurus41/PyChess !
It now has an opening book, and you can export the FEN/pgn ( the pgn is in uci format, convert it here : https://www.dcode.fr/uci-chess-notation )
( It's not scratch but as my bot is now, it has a lower nps so it's a fair oponent )
It now has an opening book, and you can export the FEN/pgn ( the pgn is in uci format, convert it here : https://www.dcode.fr/uci-chess-notation )
( It's not scratch but as my bot is now, it has a lower nps so it's a fair oponent )
Last edited by AZURUS41 (May 13, 2024 07:05:58)
- AZURUS41
- Scratcher
57 posts
Scratch Chess Engine - Game of Kings
https://github.com/Azurus41/PyChess !My program now can do self-play ! I put the code of my bot on github, so even if this isn't scratch, it can now be used for test games :
It now has an opening book, and you can export the FEN/pgn ( the pgn is in uci format, convert it here : https://www.dcode.fr/uci-chess-notation )
( It's not scratch but as my bot is now, it has a lower nps so it's a fair oponent )
Also I'm trying to implement endgame tables, do you have any good pesto table for this ?
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
https://github.com/Azurus41/PyChess !I put the code of my bot on github, so even if this isn't scratch, it can now be used for test games :
It now has an opening book, and you can export the FEN/pgn ( the pgn is in uci format, convert it here : https://www.dcode.fr/uci-chess-notation )
( It's not scratch but as my bot is now, it has a lower nps so it's a fair oponent )
Thx, is the bot running online somewhere? For a frontend you'd have to connect it to a UCI GUI? What is the expected rating?
I took a quick look at the code, from the perspective of performance I recommend switching to bitboards and bitwise ooerations, not to rely on strings for underlying data structures (instead use primitives like ints and arrays / lists of ints, maps where necessary), and avoid creating objects like Pieces during search (esp. in the innermost code), as this can cause a lot of overhead and object churn.
Last edited by ArnoHu (May 14, 2024 08:56:02)
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
https://lichess.org/XLJKeCN7#166Epic battle between GoK (black) and White Dove, both at 10sec think time, 92% vs. 87% accuracy:
Rematch, good game with high accuracy, GoK wins with 97% vs. 92%: https://lichess.org/u5Q1AjXm#104
Switch to Scratch 3, GoK Medium vs. WD P2, back and forth during midgame, GoK slowly destroying pawn structure, ends up at 89% vs. 86% accuracy: https://lichess.org/Vp5uKhHW#131
Game #4 on TurboWarp, GoK wins at 94% vs. 90% accuracy: https://lichess.org/W5pPE6jG#130
- ababoin07
- Scratcher
100+ posts
Scratch Chess Engine - Game of Kings
I read a few pages about the CPW, and I can say that I learned a lot, which will help me for my bot
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
I read a few pages about the CPW, and I can say that I learned a lot, which will help me for my bot
Have you verified this one?
GoK Blitz 2 (black) vs. Destructor, at move 18 GoK is up 6.6, and Destructor did not move any more (was checked at the time): https://lichess.org/vLuZ1jwy#36
- -089-
- Scratcher
14 posts
Scratch Chess Engine - Game of Kings
well I guess if we're just talking about accuracy, you should have a look at this: Great effort, 94% accuracy looks really good.
SB dev (depth 4+0) vs Scurious 2.2 (5 ply) https://lichess.org/5la9DXU9#75
I found it completely by accident. it blundered it's queen in round 7 of HasiLover's 960 tournament because of a bug and after I fixed that a couple days after the tournament, I wanted to do a rematch with that position.
needless to say the first time I saw it completely crush Scurious my jaw dropped.
originally I had it set to 4+3, it got 97% accuracy. (as well as chess.com's game review thingy giving it 2 back to back brilliant moves!)
https://lichess.org/roqGzzwK
and from there I just kept on lowering DSDepth.
just a massive coincidence of course, but still incredibly cool!
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
well I guess if we're just talking about accuracy, you should have a look at this: Great effort, 94% accuracy looks really good.
SB dev (depth 4+0) vs Scurious 2.2 (5 ply) https://lichess.org/5la9DXU9#75
I found it completely by accident. it blundered it's queen in round 7 of HasiLover's 960 tournament because of a bug and after I fixed that a couple days after the tournament, I wanted to do a rematch with that position.
needless to say the first time I saw it completely crush Scurious my jaw dropped.
originally I had it set to 4+3, it got 97% accuracy. (as well as chess.com's game review thingy giving it 2 back to back brilliant moves!)
https://lichess.org/roqGzzwK
and from there I just kept on lowering DSDepth.
just a massive coincidence of course, but still incredibly cool!
Very impressive, esp. at relatively low search depth. What depth setting do you recommend for 10sec think time on TurboWarp? Do you think it could get to depth 4 or 5 AND quasi-unlimited quiescence search? If so, by which means?
- AZURUS41
- Scratcher
57 posts
Scratch Chess Engine - Game of Kings
PyChess 3 - Destructor : https://lichess.org/Fiy7LIwR
Both engines are making good progress, it was an alomst equal game until Destructor let me take his king for no reason after 40.Qe8+
How could I make my bot putting his rooks on open file more often ?
Both engines are making good progress, it was an alomst equal game until Destructor let me take his king for no reason after 40.Qe8+
How could I make my bot putting his rooks on open file more often ?
- -089-
- Scratcher
14 posts
Scratch Chess Engine - Game of Kings
(I'm talking about this project.)
I just added a highest and average move time variable to the debug menu, if you want to you can just try out some different settings and
have SB play on automatic for a couple moves (for example until it has developed all the minor pieces for both sides).
to do that, just go to settings, set “engine” to 2 and then change the turn, after that it'll start playing against itself. to stop it, press and hold x.
and well after that just press r to show move rankings & debug, it'll show the total time it has spent, the highest time and the average time it spent to make a move.
besides that, since I know that your system is faster than mine, my best guess would be 4+1. anything above that probably isn't really an option
oh also, even if dynamic search depth can in theory achieve all the things quiescence can, it is not a real quiescence search. it's just a 1 ply extension of the regular search for some of the nodes. it is comically slow sometimes.
like really slow.
as an example, here's the first one of the ‘mate-in-scenarios’ from 2 days ago
r2qr1k1/pp3p1p/1b3p1B/2p1p3/2B1P3/2PP1P1b/P4P1P/R2QR2K w - - 3 16
it finds M7 with 1+13 in 7.5s, as compared to GoK with 0.06s
I'm really not sure, it depends a lot on your system… even 4+0 sometimes takes 10 seconds for me in extreme cases. What depth setting do you recommend for 10sec think time on TurboWarp?
I just added a highest and average move time variable to the debug menu, if you want to you can just try out some different settings and
have SB play on automatic for a couple moves (for example until it has developed all the minor pieces for both sides).
to do that, just go to settings, set “engine” to 2 and then change the turn, after that it'll start playing against itself. to stop it, press and hold x.
and well after that just press r to show move rankings & debug, it'll show the total time it has spent, the highest time and the average time it spent to make a move.
besides that, since I know that your system is faster than mine, my best guess would be 4+1. anything above that probably isn't really an option
no way. Do you think it could get to depth 4 or 5 AND quasi-unlimited quiescence search? If so, by which means?
oh also, even if dynamic search depth can in theory achieve all the things quiescence can, it is not a real quiescence search. it's just a 1 ply extension of the regular search for some of the nodes. it is comically slow sometimes.
like really slow.
as an example, here's the first one of the ‘mate-in-scenarios’ from 2 days ago
r2qr1k1/pp3p1p/1b3p1B/2p1p3/2B1P3/2PP1P1b/P4P1P/R2QR2K w - - 3 16
it finds M7 with 1+13 in 7.5s, as compared to GoK with 0.06s
- ababoin07
- Scratcher
100+ posts
Scratch Chess Engine - Game of Kings
In reality, I resumed the courses and I do not have too much time to update m'y chess engine, I think I would check on the old versions if there is the bug and I would advise accordingly wednesday if I have the Time else friday (I don't use a translator so m'y english is Bad)I read a few pages about the CPW, and I can say that I learned a lot, which will help me for my bot
Have you verified this one?GoK Blitz 2 (black) vs. Destructor, at move 18 GoK is up 6.6, and Destructor did not move any more (was checked at the time): https://lichess.org/vLuZ1jwy#36
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
I just managed to run GoK as an Android app on my mobile phone (via TurboWarp packager, then open it as embedded .html in Android WebViewer). It might even end up on Google PlayStore.
- birdracerthree
- Scratcher
500+ posts
Scratch Chess Engine - Game of Kings
That would be incredible! Just make sure GoK is ready for human opponents . We don’t need GoK playing Nf3-Ng1-Nf3-Ng1 I just managed to run GoK as an Android app on my mobile phone (via TurboWarp packager, then open it as embedded .html in Android WebViewer). It might even end up on Google PlayStore.
Are you planning to do this?
Last edited by birdracerthree (May 15, 2024 20:43:44)