Discuss Scratch
- Discussion Forums
- » Show and Tell
- » Scratch Chess Engine - Game of Kings
- Duke9000
- Scratcher
8 posts
Scratch Chess Engine - Game of Kings
Scratch Chess - Game of Kings ONLINE within the first 2.5 weeks since its inception!Thanks for 1,000 multiplayer chess games played on
Scratch Chess - Game of Kings ONLINE
Can I set up a game with my friend that is reserved for us at a certain time and day?
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
Scratch Chess - Game of Kings ONLINE within the first 2.5 weeks since its inception!Thanks for 1,000 multiplayer chess games played on
Scratch Chess - Game of Kings ONLINE
Can I set up a game with my friend that is reserved for us at a certain time and day?
Not yet, right now it is “first come, first served”. Technically a reservation system is possible (but laborious). Anyway, you will find that you can get a free slot most of the time currently. And once usage really takes off, I can provide copies/remixes of the project, like a little online chess cluster.
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
Game of Kings draws against Leela Chess Zero neural network chess AI! More details: https://scratch.mit.edu/discuss/post/3099651/
Scratch Chess - Game of Kings
Scratch Chess - Game of Kings
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
Scratcher Grijfland raised the question how fast Game of Kings Chess can be defeated on level Easy. Remember, Easy just looks ahead two moves plus up to four followup captures. Congrats, Grijfland did it in 16 moves! Here is the game: https://lichess.org/mLmrWOjP - classic chess engine mistake, going for material only, and not noticing what looms behind the horizon.
How fast can you win against Easy? Copy and paste your PGN here or in the project comments at https://scratch.mit.edu/projects/148769358/
Scratch Chess - Game of Kings ONLINE
How fast can you win against Easy? Copy and paste your PGN here or in the project comments at https://scratch.mit.edu/projects/148769358/
Scratch Chess - Game of Kings ONLINE
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
Grijfland raised the question how fast Game of Kings Chess can be defeated on level Easy. Remember, Easy just looks ahead two moves plus up to four followup captures. Congrats, Grijfland did it in 16 moves! Here is the game: https://lichess.org/mLmrWOjP - classic chess engine mistake, going for material only, and not noticing what looms behind the horizon.Scratcher
How fast can you win against Easy? Copy and paste your PGN here or in the project comments at https://scratch.mit.edu/projects/148769358/
Scratch Chess - Game of Kings ONLINE
I have activated ply-extension-on-check also for level “Easy”, so this checkmate sequence is now prevented. GoK looks ahead an additional move when discovering a check situation at the leaf of the search tree.
Last edited by ArnoHu (June 16, 2018 08:21:11)
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
More than 15,000 Scratches have played Game of Kings and Game of Kings Online by now - thanks a lot!
BTW, GoK just scored its third draw against Leela Chess Zero Neural Network AI, recovering from the brink of defeat: https://lichess.org/6JKISxMN
Scratch Chess - Game of Kings
Scratch Chess - Game of Kings ONLINE
BTW, GoK just scored its third draw against Leela Chess Zero Neural Network AI, recovering from the brink of defeat: https://lichess.org/6JKISxMN
Scratch Chess - Game of Kings
Scratch Chess - Game of Kings ONLINE
Last edited by ArnoHu (July 4, 2018 23:21:38)
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
Two latest test games:
Game Of Kings - Level DIfficult (white) vs. Bonsai - Green Belt (black): GoK wins in 49 moves
Bonsai - Green Belt (white) vs. Game Of Kings - Level DIfficult (black): GoK wins in 56 moves
Game Of Kings - Level DIfficult (white) vs. Bonsai - Green Belt (black): GoK wins in 49 moves
Bonsai - Green Belt (white) vs. Game Of Kings - Level DIfficult (black): GoK wins in 56 moves
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
Another test game for the latest GoK incarnation - king safety wins games at Medium level (MIT Scratch engine):
Game Of Kings Level Medium (white) vs. Bonsai Green Belt (black): GoK wins in 62 moves
Game Of Kings Level Medium (white) vs. Bonsai Green Belt (black): GoK wins in 62 moves
Last edited by ArnoHu (July 14, 2018 15:37:41)
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
On the fast Phosphorus engine, GoK can reach better search depths (up to 10 moves):
Game Of Kings Level Medium (white) vs. Bonsai Green Belt (black): GoK wins in 37moves
Game Of Kings Level Medium (white) vs. Bonsai Green Belt (black): GoK wins in 37moves
Last edited by ArnoHu (July 15, 2018 16:25:07)
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
And finally the two best chess engines on the MIT Scratch runtime, where GoK cannot look as far ahead as on Phosphorus/Sulfurous:
Bonsai Green Belt (white) vs. Game Of Kings Level Difficult (black): GoK wins in 54 moves
Bonsai Green Belt (white) vs. Game Of Kings Level Difficult (black): GoK wins in 54 moves
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
This is a fun one - the current GoK version winning against the first published GoK version in 22 moves and by just losing 2 pieces: https://lichess.org/pd5oPbOt
Scratch Chess - Game of Kings ONLINE
Scratch Chess - Game of Kings ONLINE
Last edited by ArnoHu (July 19, 2018 22:03:16)
- Grijfland
- Scratcher
100+ posts
Scratch Chess Engine - Game of Kings
Something is wrong with the GoK engine (level Difficult)
Take a look at this game and be amazed.
GoK plays with white and with the compiler “Phosphorus”.
1 e4-e5 2 Nf3-Nf6 3 Nxe5-d6 4 Bb5 + -c6 5 Nxf7 ??? -Kxf7 6 Bd3 -Qc7 7 0-0? (Qf3) -d5 8 exd5? (Qf3) -cxd5 9 Bb5? (Qf3) -Bg4? F3 -Bf5? Nc3 -Bd6 12 g4 -Bxh2 + 13 Kf2? (Kg2! ) -Qg3 +14 Ke2-Nc6 15 gxf5-Rae8 + 16 Kd3-Nb4 + 17 Kd4-Bg1 + 18 Rxg1-Qf2 + # checkmate.
[b]How does GoK escape from this checkmate attack? 13 Kg2-Qg3 + 14 Kh1-Qh3 Rf2-Bg3 + 16 Kg1-Bxf2 + 17 Kxf2-Bxg4 18 Bf1-Qh4 + 19 Kg2-Bh3 + 20 Kg1-Qg3 + 21 Kh1-Re8 22 Bxh3-Qxh3 + 23 Kg1-Qg3+ 24 Kh1-Re5 …..
Take a look at this game and be amazed.
GoK plays with white and with the compiler “Phosphorus”.
1 e4-e5 2 Nf3-Nf6 3 Nxe5-d6 4 Bb5 + -c6 5 Nxf7 ??? -Kxf7 6 Bd3 -Qc7 7 0-0? (Qf3) -d5 8 exd5? (Qf3) -cxd5 9 Bb5? (Qf3) -Bg4? F3 -Bf5? Nc3 -Bd6 12 g4 -Bxh2 + 13 Kf2? (Kg2! ) -Qg3 +14 Ke2-Nc6 15 gxf5-Rae8 + 16 Kd3-Nb4 + 17 Kd4-Bg1 + 18 Rxg1-Qf2 + # checkmate.
[b]How does GoK escape from this checkmate attack? 13 Kg2-Qg3 + 14 Kh1-Qh3 Rf2-Bg3 + 16 Kg1-Bxf2 + 17 Kxf2-Bxg4 18 Bf1-Qh4 + 19 Kg2-Bh3 + 20 Kg1-Qg3 + 21 Kh1-Re8 22 Bxh3-Qxh3 + 23 Kg1-Qg3+ 24 Kh1-Re5 …..
Last edited by Grijfland (July 24, 2018 19:35:15)
- Grijfland
- Scratcher
100+ posts
Scratch Chess Engine - Game of Kings
Oh yeah.
In the endgame it is not wise, if you are behind in chess pieces, to take pieces with equal value.
In the endgame it is not wise, if you are behind in chess pieces, to take pieces with equal value.
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
Something is wrong with the GoK engine (level Difficult)
Take a look at this game and be amazed.
GoK plays with white and with the compiler “Phosphorus”.
1 e4-e5 2 Nf3-Nf6 3 Nxe5-d6 4 Bb5 + -c6 5 Nxf7 ??? -Kxf7 6 Bd3 -Qc7 7 0-0? (Qf3) -d5 8 exd5? (Qf3) -cxd5 9 Bb5? (Qf3) -Bg4? F3 -Bf5? Nc3 -Bd6 12 g4 -Bxh2 + 13 Kf2? (Kg2! ) -Qg3 +14 Ke2-Nc6 15 gxf5-Rae8 + 16 Kd3-Nb4 + 17 Kd4-Bg1 + 18 Rxg1-Qf2 + # checkmate.
[b]How does GoK escape from this checkmate attack? 13 Kg2-Qg3 + 14 Kh1-Qh3 Rf2-Bg3 + 16 Kg1-Bxf2 + 17 Kxf2-Bxg4 18 Bf1-Qh4 + 19 Kg2-Bh3 + 20 Kg1-Qg3 + 21 Kh1-Re8 22 Bxh3-Qxh3 + 23 Kg1-Qg3+ 24 Kh1-Re5 …..
Thanks, I wished I would have seen this posting before - I just found that bug myself yesterday, it is already fixed!
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
Oh yeah.
In the endgame it is not wise, if you are behind in chess pieces, to take pieces with equal value.
This is true as well, I am currently researching how to tackle that…
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
I have updated the stable Game of Kings version with the previous GoK development version. GoK can now look ahead up to 15 moves (but I limited it to 12, as a sequence of 8+ captures is unlikely to succeed, and is costly computationally). Iterative deepening / move ordering has been re-implemented for ply1, and some additional performance tunings are included too.
We have seen several successful test games against the previous version, as well as against Bonsai (https://scratch.mit.edu/projects/86498104/). Here is one example (GoK white, Bonsai black): https://lichess.org/DL7KbLUR
In addition, a profiler has been integrated. It displays performance metrics for each ply when pressing ‘p’ ('q' to hide).
During development I observed some strange editor behavior - a couple of blocks simply disappeared, and on another occasion custom blocks turned red as they didn't refer to existing functions any more (this usually only happens when copying custom blocks via backpack). So please leave me a note in case you notice any bugs. Thanks!
Scratch Chess - Game of Kings ONLINE
We have seen several successful test games against the previous version, as well as against Bonsai (https://scratch.mit.edu/projects/86498104/). Here is one example (GoK white, Bonsai black): https://lichess.org/DL7KbLUR
In addition, a profiler has been integrated. It displays performance metrics for each ply when pressing ‘p’ ('q' to hide).
During development I observed some strange editor behavior - a couple of blocks simply disappeared, and on another occasion custom blocks turned red as they didn't refer to existing functions any more (this usually only happens when copying custom blocks via backpack). So please leave me a note in case you notice any bugs. Thanks!
Scratch Chess - Game of Kings ONLINE
Last edited by ArnoHu (Aug. 21, 2018 21:07:55)
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
Testgame against Midecah Chess (https://scratch.mit.edu/projects/569176/), GoK (white) wins in 11 moves: https://lichess.org/SyYS68zr
That's quick, but not as quick as the 6 moves game of some weeks ago: https://lichess.org/IoGFuh8d
While several Scratchers noted that Midecah Chess falls for fool's mate against human players, that's not a result you will likely see against a chess engine, as chess engines expect the best possible opponent move, not the worst.
Scratch Chess - Game of Kings
That's quick, but not as quick as the 6 moves game of some weeks ago: https://lichess.org/IoGFuh8d
While several Scratchers noted that Midecah Chess falls for fool's mate against human players, that's not a result you will likely see against a chess engine, as chess engines expect the best possible opponent move, not the worst.
Scratch Chess - Game of Kings
Last edited by ArnoHu (Aug. 21, 2018 18:48:05)
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
Here are some fun games of Game of Kings (current development edition) against Bonsai:
Game #1: GoK Medium (white, Sulfurous) vs. Bonsai Green Belt (black, Sulfurous): https://lichess.org/aDxwmkHI (GoK wins in 84 moves)
Fun to watch, both engines running at around 1 second think time, so a very rapid game with several blunders due to horizon effects.
Game #2: GoK Difficult (white, Scratch 2.0) vs. Bonsai Green Belt (black, Scratch 2.0): https://lichess.org/xF9OEvNE (GoK wins in 47 moves)
Bonsai played very quickly at 9 seconds average think time, while GoK was at 27 seconds.
Game #3: GoK Difficult (white, Sulfurous) vs. Bonsai Blue Belt (black, Sulfurous): https://lichess.org/0zOZJD4Q (GoK wins in 37 moves)
Bonsai ran into an early horizon effect again I think.
Scratch Chess - Game of Kings ONLINE
Game #1: GoK Medium (white, Sulfurous) vs. Bonsai Green Belt (black, Sulfurous): https://lichess.org/aDxwmkHI (GoK wins in 84 moves)
Fun to watch, both engines running at around 1 second think time, so a very rapid game with several blunders due to horizon effects.
Game #2: GoK Difficult (white, Scratch 2.0) vs. Bonsai Green Belt (black, Scratch 2.0): https://lichess.org/xF9OEvNE (GoK wins in 47 moves)
Bonsai played very quickly at 9 seconds average think time, while GoK was at 27 seconds.
Game #3: GoK Difficult (white, Sulfurous) vs. Bonsai Blue Belt (black, Sulfurous): https://lichess.org/0zOZJD4Q (GoK wins in 37 moves)
Bonsai ran into an early horizon effect again I think.
Scratch Chess - Game of Kings ONLINE
Last edited by ArnoHu (Sept. 6, 2018 20:44:47)
- ArnoHu
- Scratcher
1000+ posts
Scratch Chess Engine - Game of Kings
And one more:
Game #4: GoK Difficult (white, Sulfurous) vs. Bonsai Green Belt (black, Sulfurous): https://lichess.org/QTq0tKdn (GoK wins in 14 moves)
Aggressive tactics and kind safety win the game.
Scratch Chess - Game of Kings ONLINE
Game #4: GoK Difficult (white, Sulfurous) vs. Bonsai Green Belt (black, Sulfurous): https://lichess.org/QTq0tKdn (GoK wins in 14 moves)
Aggressive tactics and kind safety win the game.
Scratch Chess - Game of Kings ONLINE
- Samueldora
- Scratcher
100+ posts
Scratch Chess Engine - Game of Kings
Here's the one and only match between Bonsai (green) and Game of Kings (medium) I played recently, using the Phosphorus player. Bonsai had white and won in 28 moves.
1.c4 e5 2.Nc3 Nf6 3.Nf3 Bd6 4.d4 e4 5.Ng5 Bb4 6.Bf4 O-O 7.a3 Bxc3+ 8.bxc3 h6 9.Nh3 Nc6 10.d5 Ne7 11.Rb1 c6 12.d6 Nf5 13.Qc2 a5 14.e3 Re8 15.a4 g5 16.Bg3 Nxg3 17.hxg3 Re6 18.Qd1 Qf8 19.c5 Nd5 20.Qc2 Qd8 21.Bc4 g4 22.Nf4 Nxf4 23.gxf4 Re8 24.Rxh6 Kg7 25.Rh5 f6 26.Qd1 Rb8 27.Qxg4+ Kf8 28.Qg8#
Bonsai (green) - GoK (medium)
If wonder, if there's some yet unknown AI in those engines or elsewhere which detects who's the tester and produces a result he likes.
1.c4 e5 2.Nc3 Nf6 3.Nf3 Bd6 4.d4 e4 5.Ng5 Bb4 6.Bf4 O-O 7.a3 Bxc3+ 8.bxc3 h6 9.Nh3 Nc6 10.d5 Ne7 11.Rb1 c6 12.d6 Nf5 13.Qc2 a5 14.e3 Re8 15.a4 g5 16.Bg3 Nxg3 17.hxg3 Re6 18.Qd1 Qf8 19.c5 Nd5 20.Qc2 Qd8 21.Bc4 g4 22.Nf4 Nxf4 23.gxf4 Re8 24.Rxh6 Kg7 25.Rh5 f6 26.Qd1 Rb8 27.Qxg4+ Kf8 28.Qg8#
Bonsai (green) - GoK (medium)
If wonder, if there's some yet unknown AI in those engines or elsewhere which detects who's the tester and produces a result he likes.