Discuss Scratch

ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

And my engine can goes in your studio ‘chess engines’?
(I think I added the fact that the AI plays and I uploaded it on scratch… Currently I’m on my phone and with the time difference it is 22h at home…)
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

And my engine can goes in your studio ‘chess engines’?

I added it already earlier today.
MoosenMooALot
Scratcher
46 posts

Scratch Chess Engine - Game of Kings

MoosenMooALot wrote:

Here's a couple games between Element (SelectedDepth 6, QuiescenceDepth 8, Turbowarp, usually 5-30 seconds per turn) and GoK v. 6.495 (Difficult, Turbowarp):
Element white, GoK black:
Draw by repetition in 21 moves. Not much happened in the game itself. GoK perceived itself to have a slight disadvantage and thus allowed the draw to happen.
1. e2e4 e7e5 2. Ng1f3 Nb8c6 3. d2d4 e5xd4 4. Nf3xd4 Bf8c5 5. Nd4xc6 Qd8f6 6. Qd1f3 Qf6xf3 7. g2xf3 b7xc6 8. Nb1c3 Ra8b8 9. Nc3a4 Bc5d4 10. Bc1f4 d7d6 11. Ra1d1 Bd4f6 12. Bf4d2 c6c5 13. Bd2a5 Bf6d8 14. Ba5c3 Bd8f6 15. Bc3a5 Bc8d7 16. b2b3 Bf6d8 17. Rh1g1 g7g6 18. Ba5c3 Bd8f6 19. Bc3a5 Bf6d8 20. Ba5c3 Bd8f6 21. Bc3a5 Bf6d8
GoK white, Element black:
GoK wins. I misclicked one of GoK's moves on Element, and there isn't an undo button there, but it's pretty clear GoK would've won since it had a BestMinMaxRes value of over 800 and had both of Element's rooks immobilized.
1. e2e4 e7e5 2. f2f4 e5xf4 3. Ng1f3 d7d5 4. Nb1c3 d5xe4 5. Nc3xe4 Qd8e7 6. Qd1e2 Nb8c6 7. d2d3 f7f5 8. Ne4c3 g7g5 9. Nc3d5 Qe7xe2 10. Bf1xe2 Bf8d6 11. Nf3xg5 Nc6d4 12. Be2h5 Ke8d7 13. Bh5d1 Ng8e7 14. Nd5xf4 Bd6c5 15. c2c3 Nd4b5 16. a2a4 Nb5d6 17. d3d4 Bc5b6 18. a4a5 Bb6xa5 19. Ra1xa5 Kd7d8 20. O-O Bc8d7 21. Ra5c5 Kd8c8 22. Bd1f3 Kc8b8 23. Nf4e6 Rh8c8 24. Bc1f4 Nd6e8 25. Ne6f8 Bd7a4 26. Rf1a1
Here's another game with the same demographics:
Element played as white, GoK as black. GoK won by checkmate in 38 moves.
1. e2e4 c7c6 2. d2d4 d7d5 3. e4xd5 Qd8a5 4. Bc1d2 Qa5xd5 5. Ng1f3 Bc8g4 6. Nb1c3 Qd5e6 7. Bf1e2 Bg4xf3 8. g2xf3 Nb8d7 9. O-O Qe6h3 10. f3f4 Ng8f6 11. Be2f3 e7e6 12. Nc3e4 Bf8e7 13. c2c3 O-O 14. Bf3g2 Qh3d3 15. Ne4xf6 Nd7xf6 16. Qd1c1 Be7d6 17. c3c4 Nf6h5 18. Rf1e1 Ra8d8 19. Re1e4 Nh5f6 20. Re4e1 Qd3xd4 21. Bd2e3 Qd4d3 22. Be3xa7 Qd3f5 23. Ba7e3 Nf6h5 24. c4c5 Bd6xf4 25. Qc1b1 Rd8d3 26. Bg2f1 Bf4xe3 27. Re1xe3 Qf5g5 28. Re3g3 Nh5xg3 29. h2xg3 Rd3d2 30. Qb1c1 Rf8d8 31. Qc1c3 Qg5f5 32. f2f4 Qf5h5 33. Bf1g2 Rd8d3 34. Qc3b4 Qh5e2 35. Qb4e4 Rd3e3 36. a2a4 Re3xe4 37. Bg2xe4 Qe2f2 38. Kg1h1 Qf2h2
birdracerthree
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

MoosenMooALot wrote:

Here's a couple games between Element (SelectedDepth 6, QuiescenceDepth 8, Turbowarp, usually 5-30 seconds per turn) and GoK v. 6.495 (Difficult, Turbowarp):
Element white, GoK black:
Draw by repetition in 21 moves. Not much happened in the game itself. GoK perceived itself to have a slight disadvantage and thus allowed the draw to happen.
1. e2e4 e7e5 2. Ng1f3 Nb8c6 3. d2d4 e5xd4 4. Nf3xd4 Bf8c5 5. Nd4xc6 Qd8f6 6. Qd1f3 Qf6xf3 7. g2xf3 b7xc6 8. Nb1c3 Ra8b8 9. Nc3a4 Bc5d4 10. Bc1f4 d7d6 11. Ra1d1 Bd4f6 12. Bf4d2 c6c5 13. Bd2a5 Bf6d8 14. Ba5c3 Bd8f6 15. Bc3a5 Bc8d7 16. b2b3 Bf6d8 17. Rh1g1 g7g6 18. Ba5c3 Bd8f6 19. Bc3a5 Bf6d8 20. Ba5c3 Bd8f6 21. Bc3a5 Bf6d8
GoK white, Element black:
GoK wins. I misclicked one of GoK's moves on Element, and there isn't an undo button there, but it's pretty clear GoK would've won since it had a BestMinMaxRes value of over 800 and had both of Element's rooks immobilized.
1. e2e4 e7e5 2. f2f4 e5xf4 3. Ng1f3 d7d5 4. Nb1c3 d5xe4 5. Nc3xe4 Qd8e7 6. Qd1e2 Nb8c6 7. d2d3 f7f5 8. Ne4c3 g7g5 9. Nc3d5 Qe7xe2 10. Bf1xe2 Bf8d6 11. Nf3xg5 Nc6d4 12. Be2h5 Ke8d7 13. Bh5d1 Ng8e7 14. Nd5xf4 Bd6c5 15. c2c3 Nd4b5 16. a2a4 Nb5d6 17. d3d4 Bc5b6 18. a4a5 Bb6xa5 19. Ra1xa5 Kd7d8 20. O-O Bc8d7 21. Ra5c5 Kd8c8 22. Bd1f3 Kc8b8 23. Nf4e6 Rh8c8 24. Bc1f4 Nd6e8 25. Ne6f8 Bd7a4 26. Rf1a1
Element has a FEN import you can use if you misclick. I really need better King’s Gambit play, but I don’t know what to do regarding the opening.
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

Scratch Chess Engine Ranking 11.04.2024 (Scratch 3 Runtime)

Rank	Name		Elo	+	-	games	score	oppo.	draws
1 GoK 1742 144 113 33 97% 55 0%
2 Element 1540 167 188 11 36% 271 0%
3 Bonsai 1520 173 168 11 55% 160 0%
4 White Dove 1466 146 155 16 38% 226 0%
5 Archimedes 1361 178 177 9 44% 95 22%
6 The Turk 1344 208 243 7 29% 143 0%
7 HarleyK 1342 266 316 4 25% 196 0%
8 LowDoor 1336 223 231 5 40% 71 0%
9 Shallow Blue 1312 204 204 5 50% -11 20%
10 Frenchgamerlol 1300 244 250 4 38% 45 25%
11 Chip 1296 200 232 6 25% 95 17%
12 Wolverine 1295 308 475 3 0% 257 0%
13 Scurious 1278 189 189 5 50% -69 60%
14 Pseudo 1259 342 482 2 0% 177 0%
15 U0 1257 345 484 2 0% 189 0%
16 Mystery 1179 277 404 3 0% 111 0%
17 Midecah 1122 255 410 4 0% 81 0%

White Dove moves up…

All engines can be found in this studio: https://scratch.mit.edu/studios/15896412/

Last edited by ArnoHu (April 12, 2024 02:29:20)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

Epic Scratch 3 battle between GoK (Medium, white) and Element (3+8): https://lichess.org/study/3UC5y4H9/yL5kHoOc

GoK (Medium, white) wins against Scurious 2.2 (Ply4) in 18 moves, 97% accuracy, on Scratch 3: https://lichess.org/study/3UC5y4H9/PlCZVKW0

At the last move before checkmate, Scurious played invalid Rg2. Seems it tried to counter being in check, by checking as well. I remember that bug from the first GoK version; on a virtual king capture, MiniMax must return immediately with checkmate evaluation, not search the next ply.

Last edited by ArnoHu (April 12, 2024 09:03:37)

ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

ababoin07 wrote:

And my engine can goes in your studio ‘chess engines’?

I added it already earlier today.
Sorry but I hadn’t seen
HasiLover_Test
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

Epic Scratch 3 battle between GoK (Medium, white) and Element (3+8): https://lichess.org/study/3UC5y4H9/yL5kHoOc

GoK (Medium, white) wins against Scurious 2.2 (Ply4) in 18 moves, 97% accuracy, on Scratch 3: https://lichess.org/study/3UC5y4H9/PlCZVKW0

At the last move before checkmate, Scurious played invalid Rg2. Seems it tried to counter being in check, by checking as well. I remember that bug from the first GoK version; on a virtual king capture, MiniMax must return immediately with checkmate evaluation, not search the next ply.
Thanks, that is useful to know
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

Epic Scratch 3 battle between GoK (Medium, white) and Element (3+8): https://lichess.org/study/3UC5y4H9/yL5kHoOc

GoK (Medium, white) wins against Scurious 2.2 (Ply4) in 18 moves, 97% accuracy, on Scratch 3: https://lichess.org/study/3UC5y4H9/PlCZVKW0

At the last move before checkmate, Scurious played invalid Rg2. Seems it tried to counter being in check, by checking as well. I remember that bug from the first GoK version; on a virtual king capture, MiniMax must return immediately with checkmate evaluation, not search the next ply.

Tweaked LMR a bit more, Scratch 3 game GoK vs Element, this time over in 23 moves. I guess Element could improve king protection / shelter evaluation: https://lichess.org/study/3UC5y4H9/X7w04H4i

GoK vs White Dove on TW, interesting checkmate sequence, GoK wins in 40 moves: https://lichess.org/study/oWyPldeN/xGq6t3LF

Rematch, GoK white, similar result: https://lichess.org/Knj9MWX0#149 (I play these games on 10 sec think-time each, for that I configure GoK think time manually, as Medium runs on 15 sec during midgame)

GoK (Medium, black) vs. Element (6+8) on TW, 95% vs. 90% accuracy: https://lichess.org/ox1vzGRW#110

Last edited by ArnoHu (April 13, 2024 13:03:20)

ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

I looked, and I thought (yes, it happens to me sometimes…) and I said to myself that if I generated only the pseudo-legal movements for the AI, if it is in check, it can put the opponent in check since it will lose its king but also the opponent…
birdracerthree
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

I looked, and I thought (yes, it happens to me sometimes…) and I said to myself that if I generated only the pseudo-legal movements for the AI, if it is in check, it can put the opponent in check since it will lose its king but also the opponent…
You need to return a king score immediately after a king capture. Element used to prioritize its king over the opponent king. That caused issues in rare edge cases (fixed in v1.485).

Last edited by birdracerthree (April 12, 2024 17:15:03)

ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

O birdracerthree wrote:

ababoin07 wrote:

I looked, and I thought (yes, it happens to me sometimes…) and I said to myself that if I generated only the pseudo-legal movements for the AI, if it is in check, it can put the opponent in check since it will lose its king but also the opponent…
You need to return a king score immediately after a king capture. Element used to prioritize its king over the opponent king. That caused issues in rare edge cases (fixed in v1.485).
I’m currently working on it. And here is the one: my AI with white against gok blitz 1: 1. e2e4 c7c5 2. d2d4 c5xd4 3. c2c3 d4xc3 4. Nb1xc3 Nb8c6 5. Ng1f3 e7e5 6. Bf1c4 Bf8c5 7. Bc4d5 Ng8e7 8. Qd1d2 Ne7xd5 9. Qd2xd5 d7d6 10. Nc3e2 Bc8e6 11. Qd5d3 Qd8a5 12. Nf3d2 Be6xa2 13. h2h3 Ba2c4 14. Qd3d5 Qa5xa1 15. Nd2xc4 Bc5b4 16. Ke1d1 Qa1a4 17. b2b3 Qa4xb3
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

O birdracerthree wrote:

ababoin07 wrote:

I looked, and I thought (yes, it happens to me sometimes…) and I said to myself that if I generated only the pseudo-legal movements for the AI, if it is in check, it can put the opponent in check since it will lose its king but also the opponent…
You need to return a king score immediately after a king capture. Element used to prioritize its king over the opponent king. That caused issues in rare edge cases (fixed in v1.485).
I’m currently working on it. And here is the one: my AI with white against gok blitz 1: 1. e2e4 c7c5 2. d2d4 c5xd4 3. c2c3 d4xc3 4. Nb1xc3 Nb8c6 5. Ng1f3 e7e5 6. Bf1c4 Bf8c5 7. Bc4d5 Ng8e7 8. Qd1d2 Ne7xd5 9. Qd2xd5 d7d6 10. Nc3e2 Bc8e6 11. Qd5d3 Qd8a5 12. Nf3d2 Be6xa2 13. h2h3 Ba2c4 14. Qd3d5 Qa5xa1 15. Nd2xc4 Bc5b4 16. Ke1d1 Qa1a4 17. b2b3 Qa4xb3

Blitz 1 on Scratch 3 or TurboWarp? Because these are completely different levels. On Scratch 3 “Chess engine v7.2” has about 100x the think time of GoK Blitz 1.

Last edited by ArnoHu (April 12, 2024 20:09:56)

ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

ababoin07 wrote:

O birdracerthree wrote:

ababoin07 wrote:

I looked, and I thought (yes, it happens to me sometimes…) and I said to myself that if I generated only the pseudo-legal movements for the AI, if it is in check, it can put the opponent in check since it will lose its king but also the opponent…
You need to return a king score immediately after a king capture. Element used to prioritize its king over the opponent king. That caused issues in rare edge cases (fixed in v1.485).
I’m currently working on it. And here is the one: my AI with white against gok blitz 1: 1. e2e4 c7c5 2. d2d4 c5xd4 3. c2c3 d4xc3 4. Nb1xc3 Nb8c6 5. Ng1f3 e7e5 6. Bf1c4 Bf8c5 7. Bc4d5 Ng8e7 8. Qd1d2 Ne7xd5 9. Qd2xd5 d7d6 10. Nc3e2 Bc8e6 11. Qd5d3 Qd8a5 12. Nf3d2 Be6xa2 13. h2h3 Ba2c4 14. Qd3d5 Qa5xa1 15. Nd2xc4 Bc5b4 16. Ke1d1 Qa1a4 17. b2b3 Qa4xb3

Blitz 1 on Scratch 3 or TurboWarp? Because these are completely different levels. On Scratch 3 “Chess engine v7.2” has about 100x the think time of GoK Blitz 1.
I know you’re defending your beloved little engine, but don’t worry, even if my AI had beaten it, I would have known the win was unfair…(Both were on turbowarp).

Last edited by ababoin07 (April 13, 2024 08:30:45)

ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

ArnoHu wrote:

ababoin07 wrote:

O birdracerthree wrote:

ababoin07 wrote:

I looked, and I thought (yes, it happens to me sometimes…) and I said to myself that if I generated only the pseudo-legal movements for the AI, if it is in check, it can put the opponent in check since it will lose its king but also the opponent…
Cut
Cut

Blitz 1 on Scratch 3 or TurboWarp? Because these are completely different levels. On Scratch 3 “Chess engine v7.2” has about 100x the think time of GoK Blitz 1.
I know you’re defending your beloved little engine, but don’t worry, even if my AI had beaten it, I would have known the win was unfair…(Both were on turbowarp).
And I introduced a bug, my AI no longer sees the masts in one shot…
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

ababoin07 wrote:

ArnoHu wrote:

ababoin07 wrote:

O birdracerthree wrote:

ababoin07 wrote:

I looked, and I thought (yes, it happens to me sometimes…) and I said to myself that if I generated only the pseudo-legal movements for the AI, if it is in check, it can put the opponent in check since it will lose its king but also the opponent…
You need to return a king score immediately after a king capture. Element used to prioritize its king over the opponent king. That caused issues in rare edge cases (fixed in v1.485).
I’m currently working on it. And here is the one: my AI with white against gok blitz 1: 1. e2e4 c7c5 2. d2d4 c5xd4 3. c2c3 d4xc3 4. Nb1xc3 Nb8c6 5. Ng1f3 e7e5 6. Bf1c4 Bf8c5 7. Bc4d5 Ng8e7 8. Qd1d2 Ne7xd5 9. Qd2xd5 d7d6 10. Nc3e2 Bc8e6 11. Qd5d3 Qd8a5 12. Nf3d2 Be6xa2 13. h2h3 Ba2c4 14. Qd3d5 Qa5xa1 15. Nd2xc4 Bc5b4 16. Ke1d1 Qa1a4 17. b2b3 Qa4xb3

Blitz 1 on Scratch 3 or TurboWarp? Because these are completely different levels. On Scratch 3 “Chess engine v7.2” has about 100x the think time of GoK Blitz 1.
I know you’re defending your beloved little engine, but don’t worry, even if my AI had beaten it, I would have known the win was unfair…(Both were on turbowarp).

Thanks for your interpretation of the underlying motives when asking which runtime the game was run on, and when stating the simple fact that it was played among two engines with a 100-fold think-time difference. Epistemologically there are not a lot of things we can really “know”, and my intention for sure is not among them, not for you, probably not even for myself.

Last edited by ArnoHu (April 13, 2024 11:31:15)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine - Game of Kings

GoK (TW, Difficult, white) draws against Stockfish 16 level 7 (lichess.org), at 95% vs. 96% accuracy. The two small inaccuracies won't happen on competition mode (means they are search depth related): https://lichess.org/U4jZM7kl#111

You cannot offer draw against the lichess.org engine, but result was clear with interlocked position, same material, no pawn moves, repetitive moves during endgame, and confirmed by Stockfish's own evaluation.

Most games between the two opponents have been draws lately, in former times it was more like 1 out of 10, and for that GoK always required competition mode.

Last edited by ArnoHu (April 13, 2024 14:53:21)

birdracerthree
Scratcher
500+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

GoK (TW, Difficult, white) draws against Stockfish 16 level 7 (lichess.org), at 95% vs. 96% accuracy. The two small inaccuracies won't happen on competition mode (means they are search depth related): https://lichess.org/U4jZM7kl#111

You cannot offer draw against the lichess.org engine, but result was clear with interlocked position, same material, no pawn moves, repetitive moves during endgame, and confirmed by Stockfish's own evaluation.

Most games between the two opponents have been draws lately, in former times it was more like 1 out of 10, and for that GoK always required competition mode.
Most games have been draws? That’s great! The ELO of level 7 is 2600 lichess (2300-2400 FIDE) correct?

I think some games against high rated human opponents or different high rated bots would be interesting. Maybe some games against bots on the CCRL rating list (they also use BayesElo)?
ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

ArnoHu wrote:

ababoin07 wrote:

ArnoHu wrote:

ababoin07 wrote:

O birdracerthree wrote:

ababoin07 wrote:

I looked, and I thought (yes, it happens to me sometimes…) and I said to myself that if I generated only the pseudo-legal movements for the AI, if it is in check, it can put the opponent in check since it will lose its king but also the opponent…
You need to return a king score immediately after a king capture. Element used to prioritize its king over the opponent king. That caused issues in rare edge cases (fixed in v1.485).
I’m currently working on it. And here is the one: my AI with white against gok blitz 1: 1. e2e4 c7c5 2. d2d4 c5xd4 3. c2c3 d4xc3 4. Nb1xc3 Nb8c6 5. Ng1f3 e7e5 6. Bf1c4 Bf8c5 7. Bc4d5 Ng8e7 8. Qd1d2 Ne7xd5 9. Qd2xd5 d7d6 10. Nc3e2 Bc8e6 11. Qd5d3 Qd8a5 12. Nf3d2 Be6xa2 13. h2h3 Ba2c4 14. Qd3d5 Qa5xa1 15. Nd2xc4 Bc5b4 16. Ke1d1 Qa1a4 17. b2b3 Qa4xb3

Blitz 1 on Scratch 3 or TurboWarp? Because these are completely different levels. On Scratch 3 “Chess engine v7.2” has about 100x the think time of GoK Blitz 1.
I know you’re defending your beloved little engine, but don’t worry, even if my AI had beaten it, I would have known the win was unfair…(Both were on turbowarp).

Thanks for your interpretation of the underlying motives when asking which runtime the game was run on, and when stating the simple fact that it was played among two engines with a 100-fold think-time difference. Epistemologically there are not a lot of things we can really “know”, and my intention for sure is not among them, not for you, probably not even for myself.
Sorry but I’m terrible in English (it’s not my language…) and I do not understand despite the translator what you say, these have their limits… sorry…
ababoin07
Scratcher
100+ posts

Scratch Chess Engine - Game of Kings

birdracerthree wrote:

ArnoHu wrote:

GoK (TW, Difficult, white) draws against Stockfish 16 level 7 (lichess.org), at 95% vs. 96% accuracy. The two small inaccuracies won't happen on competition mode (means they are search depth related): https://lichess.org/U4jZM7kl#111

You cannot offer draw against the lichess.org engine, but result was clear with interlocked position, same material, no pawn moves, repetitive moves during endgame, and confirmed by Stockfish's own evaluation.

Most games between the two opponents have been draws lately, in former times it was more like 1 out of 10, and for that GoK always required competition mode.
Most games have been draws? That’s great! The ELO of level 7 is 2600 lichess (2300-2400 FIDE) correct?

I think some games against high rated human opponents or different high rated bots would be interesting. Maybe some games against bots on the CCRL rating list (they also use BayesElo)?
I have 1589 F, and I did not think that the AI of chess on scrath could one day exceed 2000 F…

Powered by DjangoBB