Discuss Scratch

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

-089- wrote:

aaaand here I go again, missing out on all the fun… I got an uncanny ability to miss big events, especially if they're something I'm interested in

ArnoHu wrote:

I invited all of you as contributors, well those were I remembered the lichess.org username. @-089- please tell me yours if I should add you.
I see you did actually add me.
but just for future reference; my lichess username is cs6667.

I admit I conducted it on short notice, as I had some time to spare today. Shallow Blue was strong!
Arekkkkkk
Scratcher
30 posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

-089- wrote:

aaaand here I go again, missing out on all the fun… I got an uncanny ability to miss big events, especially if they're something I'm interested in

ArnoHu wrote:

I invited all of you as contributors, well those were I remembered the lichess.org username. @-089- please tell me yours if I should add you.
I see you did actually add me.
but just for future reference; my lichess username is cs6667.

I admit I conducted it on short notice, as I had some time to spare today. Shallow Blue was strong!
Cool tournament. New engines are too strong for bonsai I guess.
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

ababoin07 wrote:

Good news, the ‘dev’ version of Destructor (not shared) is moving fast! Some notable improvements have been made.

Great, will check it out soon again.

GoK (Medium) vs. Destructor (Dev), GoK wins in 26 moves, 98% vs 81% accuracy. Destructor played well, except for one major blunder. Its think time sometimes went beyond a minute (fast system): https://lichess.org/uD0nwEEK#51

Last edited by ArnoHu (May 26, 2024 17:32:45)

ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

ArnoHu wrote:

ababoin07 wrote:

Good news, the ‘dev’ version of Destructor (not shared) is moving fast! Some notable improvements have been made.

Great, will check it out soon again.

GoK (Medium) vs. Destructor (Dev), GoK wins in 26 moves, 98% vs 81% accuracy. Destructor played well, except for one major blunder. Its think time sometimes went beyond a minute (fast system): https://lichess.org/uD0nwEEK#51
lol, I haven’t shared the version I’m developing yet (it’s neither the dev version nor the stable version I was talking about ^^), I had made small changes but well…
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

ArnoHu wrote:

ArnoHu wrote:

ababoin07 wrote:

Good news, the ‘dev’ version of Destructor (not shared) is moving fast! Some notable improvements have been made.

Great, will check it out soon again.

GoK (Medium) vs. Destructor (Dev), GoK wins in 26 moves, 98% vs 81% accuracy. Destructor played well, except for one major blunder. Its think time sometimes went beyond a minute (fast system): https://lichess.org/uD0nwEEK#51
lol, I haven’t shared the version I’m developing yet (it’s neither the dev version nor the stable version I was talking about ^^), I had made small changes but well…

OK…
birdracerthree
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

-089- wrote:

aaaand here I go again, missing out on all the fun… I got an uncanny ability to miss big events, especially if they're something I'm interested in

ArnoHu wrote:

I invited all of you as contributors, well those were I remembered the lichess.org username. @-089- please tell me yours if I should add you.
I see you did actually add me.
but just for future reference; my lichess username is cs6667.

I admit I conducted it on short notice, as I had some time to spare today. Shallow Blue was strong!
Same thing here, I wasn’t able to view the tournament. It’s a shame as well; White Dove blundered another opposite bishop endgame and the GoK match was interesting. I will have to look into the king safety issue; Element should never play like that. I was able to produce the move g5 after making the moves in the game (the FEN import produced Qe8). (Eval -4/3 for IID move, +1/3 for g5).
ScratchChessChampion
Scratcher
95 posts

Scratch Chess Engine - Game of Kings

Just for fun, I tested a game between GoK Medium and Stockfish Level 8. Stockfish started without a rook, so GoK had a +5 advantage. However, the game quickly became very sharp and complex.

https://lichess.org/FmPELlk4
ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

Remember when transposition tables didn’t work on Destructor? I just found out why, they worked it’s just that since I’m a huge idiot, I saved the evaluations only at the last depth and not at all depths…, which made it slow down the system more than anything else…
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

ScratchChessChampion wrote:

Just for fun, I tested a game between GoK Medium and Stockfish Level 8. Stockfish started without a rook, so GoK had a +5 advantage. However, the game quickly became very sharp and complex.

https://lichess.org/FmPELlk4

Thanks, the blunder at move 16 is quite a pity, GoK sees the mistake at 18 seconds, but does not find a solution within think time limit.
birdracerthree
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

Remember when transposition tables didn’t work on Destructor? I just found out why, they worked it’s just that since I’m a huge idiot, I saved the evaluations only at the last depth and not at all depths…, which made it slow down the system more than anything else…
I apologize for not mentioning another issue in the Transposition Table; you need to keep track of bounds. Bounds are used because you cannot use the evaluation given from the search. This is due to alpha-beta pruning. Alpha and beta cutoffs need to be handled.
ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

birdracerthree wrote:

ababoin07 wrote:

Remember when transposition tables didn’t work on Destructor? I just found out why, they worked it’s just that since I’m a huge idiot, I saved the evaluations only at the last depth and not at all depths…, which made it slow down the system more than anything else…
I apologize for not mentioning another issue in the Transposition Table; you need to keep track of bounds. Bounds are used because you cannot use the evaluation given from the search. This is due to alpha-beta pruning. Alpha and beta cutoffs need to be handled.
This also I did not know, I saw it at the same time as the rest…
ScratchChessChampion
Scratcher
95 posts

Scratch Chess Engine - Game of Kings

Self play game between Element 5+8. Element plays well with black and has good strategies in the KID. On move 12, it doesn't play a4, likely because there's no en passant. Instead, it plays Rb8, which is still a okay move (plan to play c6 and push b5).

https://lichess.org/0cdAajbG
birdracerthree
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

ScratchChessChampion wrote:

Self play game between Element 5+8. Element plays well with black and has good strategies in the KID. On move 12, it doesn't play a4, likely because there's no en passant. Instead, it plays Rb8, which is still a okay move (plan to play c6 and push b5).

https://lichess.org/0cdAajbG
Rb8 is not to play c6 and b5 (there is a pawn on d5). Rb8 is played because Element has no idea what to do.

I’m surprised Element played the opening that well. How did you set the opening?

You can turn on self-play by setting the AiOn? variable to 2.
FastSkript
Scratcher
29 posts

Scratch Chess Engine - Game of Kings

This is not a hoax. NNUE is here

Ive been developing my Engine a lot: It could in theory reach 80k nodes per second. Now with NNUE it can reach up to 40k nodes per second. I will be making follow up posts in case anyone is interested and I will certainly release the project within the next time period. For now I do not want to share the project because I break everything once in a while and while developing its hard to keep the code clean and easy to release. In short: The project is nowhere I want it to be.

Lets address the elephant in the room: NNUE? In scratch? Yes, I got it working as described in the stockfish github repo. It currently has a 64*12 = 768 feature set. While the second layer only consists of 69 neurons . Last layer got 4 neurons and then the output is scaled between -410 and 410 centipawns.

Most of the time I spent getting gradient descent working. Then replaying pgns and extracting the evaluation of quiet positions. I check if the next move was a capture and if not I add the position and its evaluation to the training dataset. I squeeze the evaluation of the position with a sigmoid function, (read more on the stockfish github.)

The network directly learns from stockfish NNUE! Its impossible to evaluate this many positions with a scratch engine in a reasonable amount of time, without bugs!

Lets address the game played between GOK (difficult) and my Engine (Name to be decided yet).
To understand the trolling in the opening by White: The Network does not meet the required knowledge in the opening phase of the game. It is trained on around 400 thousand positions right now. It seems that learning the intricacies of opening theory does not pay off. I will have a look. This game was played on a whim and is the first game between a different scratch engine since my last post.

The project is a mess right now. I will likely upload some sort of youtube video using the project and describing my progress in the next days if its interesting to yall!

Here is the game between GOK and my Engine, again I am not joking and I dont get how the evaluation got so good myself:

https://lichess.org/Wu6uGuqo#167
S_P_A_R_T
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

FastSkript wrote:

This is not a hoax. NNUE is here

Ive been developing my Engine a lot: It could in theory reach 80k nodes per second. Now with NNUE it can reach up to 40k nodes per second. I will be making follow up posts in case anyone is interested and I will certainly release the project within the next time period. For now I do not want to share the project because I break everything once in a while and while developing its hard to keep the code clean and easy to release. In short: The project is nowhere I want it to be.

Lets address the elephant in the room: NNUE? In scratch? Yes, I got it working as described in the stockfish github repo. It currently has a 64*12 = 768 feature set. While the second layer only consists of 69 neurons . Last layer got 4 neurons and then the output is scaled between -410 and 410 centipawns.

Most of the time I spent getting gradient descent working. Then replaying pgns and extracting the evaluation of quiet positions. I check if the next move was a capture and if not I add the position and its evaluation to the training dataset. I squeeze the evaluation of the position with a sigmoid function, (read more on the stockfish github.)

The network directly learns from stockfish NNUE! Its impossible to evaluate this many positions with a scratch engine in a reasonable amount of time, without bugs!

Lets address the game played between GOK (difficult) and my Engine (Name to be decided yet).
To understand the trolling in the opening by White: The Network does not meet the required knowledge in the opening phase of the game. It is trained on around 400 thousand positions right now. It seems that learning the intricacies of opening theory does not pay off. I will have a look. This game was played on a whim and is the first game between a different scratch engine since my last post.

The project is a mess right now. I will likely upload some sort of youtube video using the project and describing my progress in the next days if its interesting to yall!

Here is the game between GOK and my Engine, again I am not joking and I dont get how the evaluation got so good myself:

https://lichess.org/Wu6uGuqo#167

Cool stuff! I understand that the code can potentially be buggy and unreliable, but it still would be really cool to see the project on Scratch!

(Esp. the version which won against GoK, but I totally understand if you would like to wait. Also, what search depth does it reach, as obviously evaluation is a huge part of playing skill, but the search depth is crucial for tactics and such.)

Check out Space Program Simulator!





In it, you can build your own rockets from a variety of parts!
Then fly it with realistic orbital mechanics.

Go to orbit, explore different planets, share your save codes, and do so much more!

If you would like to help out on the project or chat about space or really anything else, check out the offical SPS Studio!

For more information & tutorials, check out the offical forum post!

FastSkript
Scratcher
29 posts

Scratch Chess Engine - Game of Kings

S_P_A_R_T wrote:

FastSkript wrote:

This is not a hoax. NNUE is here

Ive been developing my Engine a lot: It could in theory reach 80k nodes per second. Now with NNUE it can reach up to 40k nodes per second. I will be making follow up posts in case anyone is interested and I will certainly release the project within the next time period. For now I do not want to share the project because I break everything once in a while and while developing its hard to keep the code clean and easy to release. In short: The project is nowhere I want it to be.

Lets address the elephant in the room: NNUE? In scratch? Yes, I got it working as described in the stockfish github repo. It currently has a 64*12 = 768 feature set. While the second layer only consists of 69 neurons . Last layer got 4 neurons and then the output is scaled between -410 and 410 centipawns.

Most of the time I spent getting gradient descent working. Then replaying pgns and extracting the evaluation of quiet positions. I check if the next move was a capture and if not I add the position and its evaluation to the training dataset. I squeeze the evaluation of the position with a sigmoid function, (read more on the stockfish github.)

The network directly learns from stockfish NNUE! Its impossible to evaluate this many positions with a scratch engine in a reasonable amount of time, without bugs!

Lets address the game played between GOK (difficult) and my Engine (Name to be decided yet).
To understand the trolling in the opening by White: The Network does not meet the required knowledge in the opening phase of the game. It is trained on around 400 thousand positions right now. It seems that learning the intricacies of opening theory does not pay off. I will have a look. This game was played on a whim and is the first game between a different scratch engine since my last post.

The project is a mess right now. I will likely upload some sort of youtube video using the project and describing my progress in the next days if its interesting to yall!

Here is the game between GOK and my Engine, again I am not joking and I dont get how the evaluation got so good myself:

https://lichess.org/Wu6uGuqo#167

Cool stuff! I understand that the code can potentially be buggy and unreliable, but it still would be really cool to see the project on Scratch!

(Esp. the version which won against GoK, but I totally understand if you would like to wait. Also, what search depth does it reach, as obviously evaluation is a huge part of playing skill, but the search depth is crucial for tactics and such.)

The Game the engine played against GOK was played at depth 6 - 7 in the middle game and depth 8-9 in the endgame! Had to change it manually. I will soon let it play against GOK again… But as of now I am dealing with some bugs in search. I am not releasing the project for its impossible to get working right if you dont know your way around it. The Engine itself is very clean and small with only around 4k blocks.
ScratchChessChampion
Scratcher
95 posts

Scratch Chess Engine - Game of Kings

birdracerthree wrote:

ScratchChessChampion wrote:

Self play game between Element 5+8. Element plays well with black and has good strategies in the KID. On move 12, it doesn't play a4, likely because there's no en passant. Instead, it plays Rb8, which is still a okay move (plan to play c6 and push b5).

https://lichess.org/0cdAajbG
Rb8 is not to play c6 and b5 (there is a pawn on d5). Rb8 is played because Element has no idea what to do.

I’m surprised Element played the opening that well. How did you set the opening?

You can turn on self-play by setting the AiOn? variable to 2.

Yes. I started with opening moves set to 0 and only switched to 2 later on.
ScratchChessChampion
Scratcher
95 posts

Scratch Chess Engine - Game of Kings

birdracerthree
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

ScratchChessChampion wrote:

Rematch:
https://lichess.org/nwgxhtwI
Why this opening over a different opening? Element will never play a KID well (no f5 pawn break).

I will have to add material scaling to prevent Element from trading while down material.
birdracerthree
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

FastSkript wrote:

This is not a hoax. NNUE is here
*snip*
Here is the game between GOK and my Engine, again I am not joking and I dont get how the evaluation got so good myself:

https://lichess.org/Wu6uGuqo#167
This is an absolutely incredible achievement. Congratulations on the NNUE! You have also defeated GoK Difficult without abusing an opening bug! Is there a timeline for the release?

Einhorn is coming for the top

Last edited by birdracerthree (May 30, 2024 06:02:59)

Powered by DjangoBB