Discuss Scratch

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

HasiLover wrote:

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
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

HasiLover wrote:

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!
Thanks! I will release Scurious 3 as another version without quiescence or SSE, since its positional play has Improved alot.
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
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

HasiLover wrote:

ArnoHu wrote:

HasiLover wrote:

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!
Thanks! I will release Scurious 3 as another version without quiescence or SSE, since its positional play has Improved alot.
Also congrats to shallow Blue as it has officialy taken #4 on the scurious ranklist with 1793 elo
I uploaded the current dev version of scurious 3 on my DEV Project.
ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

HasiLover wrote:

ababoin07 wrote:

HasiLover wrote:

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 /:
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)…
Did you add Standpat?
What it's?
HasiLover_Test
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

HasiLover wrote:

ababoin07 wrote:

HasiLover wrote:

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 /:
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)…
Did you add Standpat?
What it's?
To be honet, I still havent figured Stand pat out, but its very important
ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

HasiLover_Test wrote:

ababoin07 wrote:

HasiLover wrote:

ababoin07 wrote:

HasiLover wrote:

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 /:
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)…
Did you add Standpat?
What it's?
To be honet, I still havent figured Stand pat out, but its very important
I still don't understand, sorry
HasiLover
Scratcher
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)
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

HasiLover_Test wrote:

ababoin07 wrote:

HasiLover wrote:

ababoin07 wrote:

HasiLover wrote:

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 /:
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)…
Did you add Standpat?
What it's?
To be honet, I still havent figured Stand pat out, but its very important
I still don't understand, sorry

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)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

HasiLover wrote:

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?
ArnoHu
Scratcher
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.

Last edited by ArnoHu (May 1, 2024 16:59:00)

HasiLover
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

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 bound strictly bound to discrete game stage strategies.
I knew that tapered Eval would be a good Implementation, GoK played very good in those Games.
HasiLover
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

HasiLover wrote:

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?
5 or maybe 10 minutes for each side.
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

HasiLover wrote:

ArnoHu wrote:

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 bound strictly bound to discrete game stage strategies.
I knew that tapered Eval would be a good Implementation, GoK played very good in those Games.

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)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

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.

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)

ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

I added the move repetition detection and I refined the evaluation function
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

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
HasiLover
Scratcher
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
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

HasiLover wrote:

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)

ArnoHu
Scratcher
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

Last edited by ArnoHu (May 1, 2024 18:32:31)

ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

HasiLover wrote:

destructoe blundered a fork on move 4 against me when I was experimenting; 1. e4 e6 2. f4 Bd6 3. d4 Nf6 4. e5
Yes, I will see where is the problem, thanks you for the game

Powered by DjangoBB