Discuss Scratch

AZURUS41
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

Remastered leaderboard with feedback from y'll :

1 - GoK NNUE (Difficult)
2 - GoK Classic (Difficult)
3 - Delta (depth9 or 15sec think time)
4 - White Dove (P4/5)
5 - Element (6+8)
6 - Shallow Blue (4+3)
(7) - Destructor 2 (5+2)
8 - Scurious (Depth5)
9 - Bonsai Chess (Blue Belt)
(10) - Miniment (6+0)
(11) - LA Chess Engine (Perf 6)
12 - Leo's AI (4+0)
13 - LowDoor (Depth 5)
Below - HarleyK / Wolverine Chess
birdracerthree
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

chessconscarth wrote:

chessconscarth wrote:

how about tablebases or are they just to large?
The only tablebase needed is KR vs KN, KR vs KB of 4 man table base.
Yes, those and possible KQvKP and KRvKP. KQvKR is optional. All of these can definitely fit into a project. However, I don’t know how Syzygy stores their tablebases.
ScratchChessChampion
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

birdracerthree wrote:

ScratchChessChampion wrote:

How do you all implement endgame detection? I’m looking to add an endgame tablebase to MiniMate, bcause it’s struggling to convert winning endgames
Element takes the material value of the position and it checks if it is less than 27 (excluding pawns). Element also has an except that allows QRRvQRR to be an endgame (that is up to you to add).
This is not really relevant for tablebases as you will only be able to add 4 or 5 man tablebases into a Scratch project.

Okay thx
ababoin07
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

AZURUS41 wrote:

Remastered leaderboard with feedback from y'll :

1 - GoK NNUE (Difficult)
2 - GoK Classic (Difficult)
3 - Delta (depth9 or 15sec think time)
4 - White Dove (P4/5)
5 - Element (6+8)
6 - Shallow Blue (4+3)
(7) - Destructor 2 (5+2)
8 - Scurious (Depth5)
9 - Bonsai Chess (Blue Belt)
(10) - Miniment (6+0)
(11) - LA Chess Engine (Perf 6)
12 - Leo's AI (4+0)
13 - LowDoor (Depth 5)
Below - HarleyK / Wolverine Chess
LowDoor is not stronger than Leo's Ai?
AZURUS41
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

AZURUS41 wrote:

Remastered leaderboard with feedback from y'll :

1 - GoK NNUE (Difficult)
2 - GoK Classic (Difficult)
3 - Delta (depth9 or 15sec think time)
4 - White Dove (P4/5)
5 - Element (6+8)
6 - Shallow Blue (4+3)
(7) - Destructor 2 (5+2)
8 - Scurious (Depth5)
9 - Bonsai Chess (Blue Belt)
(10) - Miniment (6+0)
(11) - LA Chess Engine (Perf 6)
12 - Leo's AI (4+0)
13 - LowDoor (Depth 5)
Below - HarleyK / Wolverine Chess
LowDoor is not stronger than Leo's Ai?
Idk, I need self-games… Most of the ranking still comes from SCC program

https://scratch.mit.edu/projects/1061850388/
If someone wants to lose itself in LA's code to try to understand why does qsearch makes LA crash, you're welcome
ababoin07
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

AZURUS41 wrote:

ababoin07 wrote:

AZURUS41 wrote:

Remastered leaderboard with feedback from y'll :

1 - GoK NNUE (Difficult)
2 - GoK Classic (Difficult)
3 - Delta (depth9 or 15sec think time)
4 - White Dove (P4/5)
5 - Element (6+8)
6 - Shallow Blue (4+3)
(7) - Destructor 2 (5+2)
8 - Scurious (Depth5)
9 - Bonsai Chess (Blue Belt)
(10) - Miniment (6+0)
(11) - LA Chess Engine (Perf 6)
12 - Leo's AI (4+0)
13 - LowDoor (Depth 5)
Below - HarleyK / Wolverine Chess
LowDoor is not stronger than Leo's Ai?
Idk, I need self-games… Most of the ranking still comes from SCC program

https://scratch.mit.edu/projects/1061850388/
If someone wants to lose itself in LA's code to try to understand why does qsearch makes LA crash, you're welcome
Sorry, for me LA is Leo's AI, I know LA is stronger than Lowdoor
HasiLover_Test
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

Because Scurious uses custom blocks for every ply, its very possible to pass AB Values through the blocks without using a List, is it worth it to recode the complete Pruning to try?
AZURUS41
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

https://turbowarp.org/1061850388/fullscreen?stuck&turbo
Can someone check how better it plays, and if it plays legal moves only ?
Thanks !
birdracerthree
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

HasiLover_Test wrote:

Because Scurious uses custom blocks for every ply, its very possible to pass AB Values through the blocks without using a List, is it worth it to recode the complete Pruning to try?
I had to think about this, but it sounds doable to me. The less code you have to overhaul, the better
ababoin07
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

birdracerthree wrote:

HasiLover_Test wrote:

Because Scurious uses custom blocks for every ply, its very possible to pass AB Values through the blocks without using a List, is it worth it to recode the complete Pruning to try?
I had to think about this, but it sounds doable to me. The less code you have to overhaul, the better
No value would be overwritten, so normally no problems
chessconscarth
Scratcher
39 posts

Scratch Chess Engine - Game of Kings

can someone tell me how to make legal moves in chess.
the closest I have made to legal chess is this https://scratch.mit.edu/projects/1056738342 which is very bad.
(also, I am not expired boy ok.)
say [how to get legal moves in chess] for (2) secs
chessconscarth
Scratcher
39 posts

Scratch Chess Engine - Game of Kings

HasiLover_Test wrote:

chessconscarth wrote:

birdracerthree wrote:

ScratchChessChampion wrote:

How do you all implement endgame detection? I’m looking to add an endgame tablebase to MiniMate, bcause it’s struggling to convert winning endgames
Element takes the material value of the position and it checks if it is less than 27 (excluding pawns). Element also has an except that allows QRRvQRR to be an endgame (that is up to you to add).
This is not really relevant for tablebases as you will only be able to add 4 or 5 man tablebases into a Scratch project.
by adding a variable to cheak pawns and pieces.
when green flag clicked
set [pawns] to [8]
forever
if <[pawns] < [4]> then
broadcast [IS endgame]
end

end
extremely unefficient example lol
that is how GoK NNUE cheaks for endgame.

Last edited by chessconscarth (Sept. 12, 2024 05:58:14)

birdracerthree
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

chessconscarth wrote:

HasiLover_Test wrote:

chessconscarth wrote:

birdracerthree wrote:

ScratchChessChampion wrote:

How do you all implement endgame detection? I’m looking to add an endgame tablebase to MiniMate, bcause it’s struggling to convert winning endgames
Element takes the material value of the position and it checks if it is less than 27 (excluding pawns). Element also has an except that allows QRRvQRR to be an endgame (that is up to you to add).
This is not really relevant for tablebases as you will only be able to add 4 or 5 man tablebases into a Scratch project.
by adding a variable to cheak pawns and pieces.
when green flag clicked
set [pawns] to [8]
forever
if <[pawns] < [4]> then
broadcast [IS endgame]
end

end
extremely unefficient example lol
that is how GoK NNUE cheaks for endgame.
This is not how GoK NNUE checks for an endgame.
chessconscarth
Scratcher
39 posts

Scratch Chess Engine - Game of Kings

birdracerthree wrote:

chessconscarth wrote:

HasiLover_Test wrote:

chessconscarth wrote:

birdracerthree wrote:

ScratchChessChampion wrote:

How do you all implement endgame detection? I’m looking to add an endgame tablebase to MiniMate, bcause it’s struggling to convert winning endgames
Element takes the material value of the position and it checks if it is less than 27 (excluding pawns). Element also has an except that allows QRRvQRR to be an endgame (that is up to you to add).
This is not really relevant for tablebases as you will only be able to add 4 or 5 man tablebases into a Scratch project.
by adding a variable to cheak pawns and pieces.
when green flag clicked
set [pawns] to [8]
forever
if <[pawns] < [4]> then
broadcast [IS endgame]
end

end
extremely unefficient example lol
that is how GoK NNUE cheaks for endgame.
This is not how GoK NNUE checks for an endgame.
oh I cheaked and ur right var is end changed by countouter 1
AZURUS41
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

https://lichess.org/4YF0PI8m#0
LA qdepth (black, 4+2) wins against LA regular(4+0)
I'm still trying to figure out why quiescence only works as black yet, but anyways I'm very happy that quiescence works finally !
It played a lot of games wothout doing any illegal moves yet, and I'll make it face some other engines in the day to see how good it is for now.

4+8 is recommended so far, making qDepth much higher doesn't change a lot the think time yet.
An example, nodes analysed after 1.c4 (to be out of book early) :
4+0 : 1…Nc6 in 6804 nodes
4+1 : 1…d5 in 94566 nodes
4+2 : 1…d5 in 94594 nodes
4+3 : 1…d5 in 96713 nodes
4+4 : 1…d5 in 96741 nodes
4+5 : 1…d5 in 97704 nodes
4+6 : 1…d5 in 97728 nodes
4+7 : 1…d5 in 98462 nodes
4+8 : 1…d5 in 98462 nodes (we staying still ?)
4+30 : 1…d5 in 98462 nodes (yeah we staying still…)

Does the results makes sense ?
How much nodes fo you have at 4+? for 1.c4 (when no book) ?
AZURUS41
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

PS : still a very bad idea to plat 4+30, once queen is at the air you comptuer will suffer a lot
birdracerthree
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

chessconscarth wrote:

can someone tell me how to make legal moves in chess.
the closest I have made to legal chess is this https://scratch.mit.edu/projects/1056738342 which is very bad.
(also, I am not expired boy ok.)
say [how to get legal moves in chess] for (2) secs
I will have to think about the best way to explain this…
birdracerthree
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

AZURUS41 wrote:

https://lichess.org/4YF0PI8m#0
LA qdepth (black, 4+2) wins against LA regular(4+0)
I'm still trying to figure out why quiescence only works as black yet, but anyways I'm very happy that quiescence works finally !
It played a lot of games wothout doing any illegal moves yet, and I'll make it face some other engines in the day to see how good it is for now.

4+8 is recommended so far, making qDepth much higher doesn't change a lot the think time yet.
An example, nodes analysed after 1.c4 (to be out of book early) :
4+0 : 1…Nc6 in 6804 nodes
4+1 : 1…d5 in 94566 nodes
4+2 : 1…d5 in 94594 nodes
4+3 : 1…d5 in 96713 nodes
4+4 : 1…d5 in 96741 nodes
4+5 : 1…d5 in 97704 nodes
4+6 : 1…d5 in 97728 nodes
4+7 : 1…d5 in 98462 nodes
4+8 : 1…d5 in 98462 nodes (we staying still ?)
4+30 : 1…d5 in 98462 nodes (yeah we staying still…)

Does the results makes sense ?
How much nodes fo you have at 4+? for 1.c4 (when no book) ?
4+0: 3604
4+1: 4067
4+2: 1212
4+3: 1231
4+4: 1223
4+5: 1223
4+6: 1223
4+7: 1223
4+8: 1223
Once my laptop works again, I can increase the quiescence depth past 8. However, once I do get it to work (even if temporarily), I will prioritize a possible issue that may be ruining its NPS in endgames.
I believe you don’t have AB pruning in quiescence?

Last edited by birdracerthree (Sept. 12, 2024 08:32:06)

ababoin07
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

échecsconscarth wrote:

can someone tell me how to make legal moves in chess.
the closest I have made to legal chess is this https://scratch.mit.edu/projects/1056738342 which is very bad.
(also, I am not expired boy ok.)
say [how to get legal moves in chess] for (2) secs
Hi, first, before generating moves, you need to have an internal representation of the board, with a different value for each piece. Then, you create a pseudo-legal move generator, without considering checks. After that, you create a function to generate each pseudo-legal move after the initial move generation to see if the opponent can capture your king. If they can, the move is illegal; if not, it is legal. This technique is the ‘dumbest,’ but it allows for a first NON-OPTIMIZED implementation of a fully functional move generator.
-089-
Scratcher
50 posts

Scratch Chess Engine - Game of Kings

birdracerthree wrote:

AZURUS41 wrote:

https://lichess.org/4YF0PI8m#0
LA qdepth (black, 4+2) wins against LA regular(4+0)
I'm still trying to figure out why quiescence only works as black yet, but anyways I'm very happy that quiescence works finally !
It played a lot of games wothout doing any illegal moves yet, and I'll make it face some other engines in the day to see how good it is for now.

4+8 is recommended so far, making qDepth much higher doesn't change a lot the think time yet.
An example, nodes analysed after 1.c4 (to be out of book early) :
4+0 : 1…Nc6 in 6804 nodes
4+1 : 1…d5 in 94566 nodes
4+2 : 1…d5 in 94594 nodes
4+3 : 1…d5 in 96713 nodes
4+4 : 1…d5 in 96741 nodes
4+5 : 1…d5 in 97704 nodes
4+6 : 1…d5 in 97728 nodes
4+7 : 1…d5 in 98462 nodes
4+8 : 1…d5 in 98462 nodes (we staying still ?)
4+30 : 1…d5 in 98462 nodes (yeah we staying still…)

Does the results makes sense ?
How much nodes fo you have at 4+? for 1.c4 (when no book) ?
4+0: 3604
4+1: 4067
4+2: 1212
4+3: 1231
4+4: 1223
4+5: 1223
4+6: 1223
4+7: 1223
4+8: 1223
Once my laptop works again, I can increase the quiescence depth past 8. However, once I do get it to work (even if temporarily), I will prioritize a possible issue that may be ruining its NPS in endgames.
I believe you don’t have AB pruning in quiescence?
4+0  3796
4+1 3134
4+2 7603
4+3 9668
4+4 15445
4+5 21337
4+6 28937
4+7 37149
4+8 39537
this should be a decent comparison, these numbers are from main version SB which does not have standpat like LA (but then again I guess it also includes check extensions so idk)

Powered by DjangoBB