Discuss Scratch
- Discussion Forums
- » Show and Tell
- » Scratch Chess Engine - Game of Kings
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
I just wanted to Inform I wont be active alot this and next week because I am preparing for a Chess Tournament over the Board.
All the best for the tournament!
- HasiLover
-
100+ posts
Scratch Chess Engine - Game of Kings
Thanks! I will release Scurious 3 as another version without quiescence or SSE, since its positional play has Improved alot.I just wanted to Inform I wont be active alot this and next week because I am preparing for a Chess Tournament over the Board.
All the best for the tournament!
Also congrats to shallow Blue as it has officialy taken #4 on the scurious ranklist with 1793 elo
Last edited by HasiLover (April 30, 2024 21:17:17)
- HasiLover_Test
-
100+ posts
Scratch Chess Engine - Game of Kings
I uploaded the current dev version of scurious 3 on my DEV Project.Thanks! I will release Scurious 3 as another version without quiescence or SSE, since its positional play has Improved alot.I just wanted to Inform I wont be active alot this and next week because I am preparing for a Chess Tournament over the Board.
All the best for the tournament!
Also congrats to shallow Blue as it has officialy taken #4 on the scurious ranklist with 1793 elo
#3484May 1, 2024 07:09:40
- ababoin07
-
100+ posts
Scratch Chess Engine - Game of Kings
What it's?Did you add Standpat?You are not the only one, I added the search for quiescence and the AI seems to be weakened (I checked, the code seems correct)… So I have good news and bad news, so it turned out Scurious accidentsly overwrite the PST in the move ordering, so I fixed it. But nothing changed /:
#3485May 1, 2024 07:12:42
- HasiLover_Test
-
100+ posts
Scratch Chess Engine - Game of Kings
To be honet, I still havent figured Stand pat out, but its very importantWhat it's?Did you add Standpat?You are not the only one, I added the search for quiescence and the AI seems to be weakened (I checked, the code seems correct)… So I have good news and bad news, so it turned out Scurious accidentsly overwrite the PST in the move ordering, so I fixed it. But nothing changed /:
#3486May 1, 2024 07:23:15
- ababoin07
-
100+ posts
Scratch Chess Engine - Game of Kings
I still don't understand, sorryTo be honet, I still havent figured Stand pat out, but its very importantWhat it's?Did you add Standpat?You are not the only one, I added the search for quiescence and the AI seems to be weakened (I checked, the code seems correct)… So I have good news and bad news, so it turned out Scurious accidentsly overwrite the PST in the move ordering, so I fixed it. But nothing changed /:
#3487May 1, 2024 10:23:56
- HasiLover
-
100+ posts
Scratch Chess Engine - Game of Kings
I am thinking about holding a Blitz tournament for Scratch chess Engines, in the elimination based format.(4 games for 1 match)
#3488May 1, 2024 11:00:48
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
I still don't understand, sorryTo be honet, I still havent figured Stand pat out, but its very importantWhat it's?Did you add Standpat?You are not the only one, I added the search for quiescence and the AI seems to be weakened (I checked, the code seems correct)… So I have good news and bad news, so it turned out Scurious accidentsly overwrite the PST in the move ordering, so I fixed it. But nothing changed /:
Before entering the next depth of quiescence search, one must evaluate the current board, and establish this as baseline evaluation. Because if applying the next capture (and counter-captures beyond) does not improve the result, that baseline is the evaluation we must return. That is necessary, as a player always has the choice to go for non-capture move instead, which makes the position quiet. Standing pat is a precondition for quiescence search to work.
You can see GoK's implementation here:
https://github.com/ArnoHue/scratch/blob/ea7fbe950003f101d1fc80cecd94bedc18c96204/chess/Engine.scratch#L1487
Last edited by ArnoHu (May 1, 2024 11:01:42)
#3489May 1, 2024 11:05:06
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
I am thinking about holding a Blitz tournament for Scratch chess Engines, in the elimination based format.(4 games for 1 match)
Cool! What is the think time limit?
#3490May 1, 2024 13:14:39
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
High quality 10sec think-time game between GoK (tapered eval prototype, white) and WD, 97% vs. 93% accuracy: https://lichess.org/VQxjlQpF#143
Game #2 was even until move 26, when WD (white) blundered, causing an immediate mate-in-6, which GoK saw (92% vs. 78% accuracy): https://lichess.org/sRyvgmOn#62
While tapered eval is costly due to double-evaluations, GoK seems to play more creatively, as it is not strictly bound to discrete game stage strategies.
Game #2 was even until move 26, when WD (white) blundered, causing an immediate mate-in-6, which GoK saw (92% vs. 78% accuracy): https://lichess.org/sRyvgmOn#62
While tapered eval is costly due to double-evaluations, GoK seems to play more creatively, as it is not strictly bound to discrete game stage strategies.
Last edited by ArnoHu (May 1, 2024 16:59:00)
#3491May 1, 2024 13:55:33
- HasiLover
-
100+ posts
Scratch Chess Engine - Game of Kings
https://lichess.org/VQxjlQpF#143I knew that tapered Eval would be a good Implementation, GoK played very good in those Games. High quality 10sec think-time game between GoK (tapered eval prototype, white) and WD, 97% vs. 93% accuracy:
Game #2 was even until move 26, when WD (white) blundered, causing an immediate mate-in-6, which GoK saw (92% vs. 78% accuracy): https://lichess.org/sRyvgmOn#62
While tapered eval is costly due to double-evaluations, GoK seems to play more creatively, as it is not bound strictly bound to discrete game stage strategies.
#3492May 1, 2024 13:56:37
- HasiLover
-
100+ posts
Scratch Chess Engine - Game of Kings
5 or maybe 10 minutes for each side.I am thinking about holding a Blitz tournament for Scratch chess Engines, in the elimination based format.(4 games for 1 match)
Cool! What is the think time limit?
#3493May 1, 2024 14:01:12
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
https://lichess.org/VQxjlQpF#143I knew that tapered Eval would be a good Implementation, GoK played very good in those Games. High quality 10sec think-time game between GoK (tapered eval prototype, white) and WD, 97% vs. 93% accuracy:
Game #2 was even until move 26, when WD (white) blundered, causing an immediate mate-in-6, which GoK saw (92% vs. 78% accuracy): https://lichess.org/sRyvgmOn#62
While tapered eval is costly due to double-evaluations, GoK seems to play more creatively, as it is not bound strictly bound to discrete game stage strategies.
Thanks for input, yes, but I must admit the current implementation is really quick & dirty, just what I could do short-term. You can see the github commit here:
https://github.com/ArnoHue/scratch/commit/7a999dd5ecc11e14ecaf267a129bc4d713279890
It also does not include PST interpolation, as that will be a much larger change, due to all the incremental evaluation tunings, lookup-tables, etc.
Last edited by ArnoHu (May 1, 2024 14:03:26)
#3494May 1, 2024 15:30:35
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
https://lichess.org/VQxjlQpF#143High quality 10sec think-time game between GoK (tapered eval prototype, white) and WD, 97% vs. 93% accuracy:
Game #2 was even until move 26, when WD (white) blundered, causing an immediate mate-in-6, which GoK saw (92% vs. 78% accuracy): https://lichess.org/sRyvgmOn#62
While tapered eval is costly due to double-evaluations, GoK seems to play more creatively, as it is not strictly bound to discrete game stage strategies.
Against a strong 92% Element (6+8), GoK (Medium, white) played another 97% game and won in 49 moves: https://lichess.org/MqzALdTP#97
Rematch, GoK (black) once more 97% against a 93% Element: https://lichess.org/2SjyLujf#152
Those were incredible games, congrats to Element! One thing to note though, at move 8 Element castled through check, so I let it play the best legal move instead.
GoK 3x at 97%, and the 92% game would likely have ended with a higher accuracy, had it taken longer than 31 moves.
Last edited by ArnoHu (May 1, 2024 17:05:05)
#3495May 1, 2024 16:25:29
- ababoin07
-
100+ posts
Scratch Chess Engine - Game of Kings
I added the move repetition detection and I refined the evaluation function
#3496May 1, 2024 16:54:30
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
I added the move repetition detection and I refined the evaluation function
Destructor looks pretty good, at PerfMode=0 it played without blunders at 89% accuracy against a 97% GoK (Medium, white), game lasted 31 moves: https://lichess.org/OJ1AmycB#61
#3497May 1, 2024 17:03:07
- HasiLover
-
100+ posts
Scratch Chess Engine - Game of Kings
destructoe blundered a fork on move 4 against me when I was experimenting; 1. e4 e6 2. f4 Bd6 3. d4 Nf6 4. e5
#3498May 1, 2024 17:16:17
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
destructoe blundered a fork on move 4 against me when I was experimenting; 1. e4 e6 2. f4 Bd6 3. d4 Nf6 4. e5
Fork detection can be quite challenging, on Scratch 3 with limited search depth, and especially when the inevitable capture might be moved behind the horizon with delaying moves, e.g. checks/evasions, or other captures.
GoK has early fork detection logic on Scratch 3, triggering search extensions:
https://github.com/ArnoHue/scratch/blob/7a999dd5ecc11e14ecaf267a129bc4d713279890/chess/Engine.scratch#L1690
Still for “rnbqk1nr/pppp1ppp/3bp3/8/3PPP2/8/PPP3PP/RNBQKBNR b KQkq - 0 3” on Scratch 3 this takes GoK 4 seconds to detect, and 5 seconds to find an alternative move:
1.215: 3 : Search start, depth = 3
1.238: 3 : 0440 : -49
1.738: 3 : 0722 : -38
2.861: 4 : Search start, depth = 4
4.080: 4 : 0722 : -298
5.303: 4 : 0440 : -114
7.300: 4 : 0925 : -82
10.781: 4 : 0219 : -59
Element detects it at ply 5 (90 seconds on S3).
Last edited by ArnoHu (May 1, 2024 17:52:38)
#3499May 1, 2024 17:42:10
- ArnoHu
-
1000+ posts
Scratch Chess Engine - Game of Kings
GoK (Medium, white) vs. Scurious 2.2, GoK wins in 21 moves, 94% vs. 82% accuracy: https://lichess.org/eO3Ta93Y#41 (Scurious did not allow for en-passant, so I had to re-import board).
GoK (Medium, white) vs. Shallow Blue (D5), GoK wins in 43 moves 95% vs. 87% accuracy: https://lichess.org/8O4Y52jt#85
GoK (Medium, white) vs. Shallow Blue (D5), GoK wins in 43 moves 95% vs. 87% accuracy: https://lichess.org/8O4Y52jt#85
Last edited by ArnoHu (May 1, 2024 18:32:31)
#3500May 1, 2024 18:04:39
- ababoin07
-
100+ posts
Scratch Chess Engine - Game of Kings
Yes, I will see where is the problem, thanks you for the game destructoe blundered a fork on move 4 against me when I was experimenting; 1. e4 e6 2. f4 Bd6 3. d4 Nf6 4. e5