Discuss Scratch

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Hello everyone,

I am happy to announce the Winter 2017 Scratch Chess Engine Tournament. The five most widely used Scratch chess engines will take part, namely:


Bonsai and Archimedes are both capable to play white and black. The Turk and Game of Kings are designed to play black only, but can be tricked into playing white virtually by importing inverse board definitions (The Turk might reject castling, but this can hopefully be worked-around by importing the resulting board; same for GoK, and alternatively “inverse” castling can be adapted there by altering two lines of code as well). Which leaves Midecah Chess - it will simply always play black.

I want to run the games on Phosphorus in order to save time, and place something like a 1 minute think time limit per move (Phosphorus is fast and should allow every engine to stay below that limit). If a project has Phosphorus-specific problems, I will switch back to the Scratch runtime. Bugs that lead to invalid moves or boards will trigger a penalty result.

The plan is to have a game played every two or three days. I will publish the results here, using lichess game protocols.

Please feel free to add your comments and questions to this discussion thread. Thank you and I hope you enjoy watching the games!

Last edited by ArnoHu (Dec. 26, 2017 23:24:27)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Game #1: Bonsai (white) vs. Game of Kings (black) 0-1

1. e4 c5 2. b3 { B20 Sicilian Defense: Snyder Variation } e6 3. Bb5 a6 4. Bd3 Nc6 5. Bb2 b5 6. c4 bxc4 7. bxc4 Nb4 8. Bc2 Nxc2+ 9. Qxc2 Bb7 10. Nc3 Qg5 11. Kf1 O-O-O 12. Nf3 Qf4 13. Rb1 Nf6 14. d3 Bd6 15. Kg1 Qg4 16. h3 Qh5 17. a4 Ba8 18. Ba3 Bc6 19. Rb6 Bf4 20. Rxa6 Kb7 21. Ra5 Bd6 22. g4 Qh6 23. Qb1+ Kc8 24. Bxc5 Bf4 25. Bb6 Rde8 26. d4 g6 27. Qc2 Qf8 28. g5 Ng8 29. Ne2 Qa3 30. Kg2 Bd6 31. c5 Bb8 32. Rb1 Ne7 33. Ba7 Bc7 34. Bb6 Bb8 35. Nc3 Bc7 36. Bxc7 Kxc7 37. Nb5+ Bxb5 38. Raxb5 Nc6 39. Rb7+ Kc8 40. e5 Qxf3+ 41. Kxf3 Nxd4+ 42. Kg2 Nxc2 43. Rb8+ Kc7 44. R8b7+ Kc6 45. R1b5 Na3 46. R5b6+ Kxc5 47. Rb3 Nc4 48. R3b5+ Kc6 49. f4 Ra8 50. Kg1 Rxa4 51. Kh1 Rha8 52. Rb3 Ra1+ 53. Kg2 R1a2+ 54. Kh1 Re2 55. Rb8 Ra1+ 56. Rb1 Rxb1+ 57. Rxb1 Ne3 58. Rc1+ Nc2 59. Kg1 Kd5 60. Rb1 Ke4 61. Rf1 Nb4 62. Rb1 Nd3 63. Rb7 Kxf4 64. Rxd7 Nxe5 65. Rd4+ Ke3 66. Rd8 Nf3+ 67. Kf1 Rf2# { Black wins by checkmate. } 0-1

Game protocol and analysis on lichess.org

Last edited by ArnoHu (Dec. 23, 2017 23:36:23)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Tournament Crosstable

Game of Kings  - 1 ? ? ?  1.0
Bonsai 0 - ? ? ? 0.0
The Turk ? ? - ? ? 0.0
Archimedes ? ? ? - ? 0.0
Midecah ? ? ? ? - 0.0
FunnyAnimatorJimTV
Scratcher
69 posts

Scratch Chess Engine Tournament

Nice 1st game! But I think both engines need more positional understanding. For example, 14…0-0-0? Although this is the fastest castle for black, the black king is clearly weaker on the queenside. The computer can tell the a, b and c pawns should be on a7, b7 and c7 for the black king to be protected, somewhat. But also there is the open b-file for white to use to kerplonk. And we all like kerplonking on our opponent's king, don't we now?

Maybe something to consider is for the engine to castle on the same side the opponent has. Because computers can't see long term patterns and plans for attack, it's probably safer for the computer to castle the same side because it's generally harder to attack by thrusting on your own king's side by pushing the front pawns and opening up your OWN king. So the computer can cold-bloodedly castle on the same side and both computers can fiddle around in the center and find tactics. It is my suggestion.

As for the players before either has castled…Well, one player is just going to have to make that decision based on capabilities.

Also you can put all the games in this study I created: https://lichess.org/study/MSjgYtQd A collection of the Scratch engine games we play, since most of us Scratch chess players have lichess accounts.

Good luck to the other engines and Merry Christmas!

Last edited by FunnyAnimatorJimTV (Dec. 26, 2017 19:04:08)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Game #2: Archimedes Chess (white) vs. Midecah Chess (black) 1-0

1. Nf3 { A04 Réti Opening } h5 2. Ne5 d6 3. Nd3 h4 4. Na3 g5 5. Nb5 d5 6. f3 a5 7. Ne5 f5 8. Ng6 Rh7 9. d4 Bh6 10. Bd2 a4 11. Qc1 c6 12. Bxg5 Bxg5 13. Qxg5 cxb5 14. Nxe7 Nxe7 15. b4 h3 16. gxh3 Nd7 17. Kf2 a3 18. Bg2 Ra4 19. Rhb1 Rf7 20. Qh4 Rf6 21. Qh8+ Rf8 22. Qg7 Rf7 23. Qg5 Rf6 24. Bh1 Nc6 25. Rg1 Nxb4 26. Kf1 Nxc2 27. Rc1 Nxd4 28. Kf2 Ne6 29. Qh5+ Ke7 30. Kf1 f4 31. Qxd5 Nef8 32. Qg5 b4 33. Ke1 *

At this point Midecah's knight on f8 simply disappeared and the game had to be stopped. According to our tournament rules, the game counts as a win for Archimedes Chess.

Game protocol and analysis on lichess.org

Last edited by ArnoHu (Dec. 24, 2017 22:49:19)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Tournament Crosstable

Game of Kings  - 1 ? ? ?  1.0
Bonsai 0 - ? ? ? 0.0
The Turk ? ? - ? ? 0.0
Archimedes ? ? ? - 1 1.0
Midecah ? ? ? 0 - 0.0
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

FunnyAnimatorJimTV wrote:

Nice 1st game! But I think both engines need more positional understanding. For example, 14…0-0-0? Although this is the fastest castle for black, the black king is clearly weaker on the queenside. The computer can tell the a, b and c pawns should be on a7, b7 and c7 for the black king to be protected, somewhat. But also there is the open b-file for white to use to kerplonk. And we all like kerplonking on our opponent's king, don't we now?

Maybe something to consider is for the engine to castle on the same side the opponent has. Because computers can't see long term patterns and plans for attack, it's probably safer for the computer to castle the same side because it's generally harder to attack by thrusting on your own king's side by pushing the front pawns and opening up your OWN king. So the computer can cold-bloodedly castle on the same side and both computers can fiddle around in the center and find tactics. It is my suggestion.

As for the players before either has castled…Well, one player is just going to have to make that decision based on capabilities.

Also you can put all the games in this study I created: lichess.org/study/MSjgYtQd A collection of the Scratch engine games we play, since most of us Scratch chess players have lichess accounts.

Good luck to the other engines and Merry Christmas!

Very true, when I saw the board before black's queenside castling, I knew already this would happen, and it would be disastrous. After this blunder, I was pretty sure Bonsai would win, but GoK fought on and was somehow able to turn the game around.

GoK castles as soon as it is possible, and as long as this is not causing any material loss or piece-squaretable position / mobility disadvantage greater than the castling value (which is high at 60). Most of the time this was no problem, as it often led to kingside castling, where the pawn structure was stronger. Good point, I can actually add a simple pawn structure check there.

Thanks for your offer to add the games to your collection, I will definitely do that at the end of the tournament.

Merry Christmas from Austria!

Last edited by ArnoHu (Dec. 24, 2017 23:08:00)

Samueldora
Scratcher
100+ posts

Scratch Chess Engine Tournament

ArnoHu wrote:

Game #1: Bonsai (white) vs. Game of Kings (black) 0-1

1. e4 c5 2. b3 { B20 Sicilian Defense: Snyder Variation } e6 (..) 67. Kf1 Rf2# { Black wins by checkmate. } 0-1

Game protocol and analysis on lichess.org

A thrilling game. Congratulations to Game of Kings! The horizon effect provides a lot of surprises for both engines in this game.

Last edited by Samueldora (Dec. 25, 2017 08:12:14)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Samueldora wrote:

ArnoHu wrote:

Game #1: Bonsai (white) vs. Game of Kings (black) 0-1

1. e4 c5 2. b3 { B20 Sicilian Defense: Snyder Variation } e6 (..) 67. Kf1 Rf2# { Black wins by checkmate. } 0-1

Game protocol and analysis on lichess.org

A thrilling game. Congratulations to Game of Kings! The horizon effect provides a lot of surprises for both engines in this game.

Thanks, it was really fun to watch. Nice thing we have lichess for replay.

I noticed you just added another level “blue belt” to Bonsai? I will apply it in Bonsai's next tournament games. I am curious, did you increase search depth, or is it something else? Maybe GoK was lucky that blue belt Bonsai did not exist two days ago, who knows if it could have turned around that one otherwise.

Last edited by ArnoHu (Dec. 25, 2017 13:55:00)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Game #3: Bonsai (white) vs. The Turk (black) 1-0

1. c4 e5 { A20 English Opening: King's English Variation } 2. d3 Bb4+ 3. Bd2 Bc5 4. Nf3 d6 5. b4 Bb6 6. c5 dxc5 7. bxc5 Bxc5 8. Bc3 Nd7 9. Bxe5 Bb4+ 10. Bc3 Qf6 11. d4 Bxc3+ 12. Nxc3 Qc6 13. Rc1 Ne7 14. e4 Rb8 15. Nd5 Qh6 16. Nxc7+ Kd8 17. Qc2 Rg8 18. Nb5 a6 19. Qc7+ Ke8 20. Nd6+ Kf8 21. Qd8# { White wins by checkmate. } 1-0

Game protocol and analysis on lichess.org

Last edited by ArnoHu (Dec. 25, 2017 18:50:46)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Tournament Crosstable

Game of Kings  - 1 ? ? ?  1.0
Bonsai 0 - 1 ? ? 1.0
The Turk ? 0 - ? ? 0.0
Archimedes ? ? ? - 1 1.0
Midecah ? ? ? 0 - 0.0
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Game #4: Archimedes Chess (white) vs. Game of Kings (black) 0-1

1. Nh3 { E00 Amar Opening } e6 2. e3 Nc6 3. Bc4 d5 4. Bb5 a6 5. Ba4 b5 6. Bb3 Na5 7. Nc3 Nxb3 8. axb3 b4 9. Ne2 Bb7 10. Ng3 Bc5 11. Qf3 Bc6 12. d3 Qf6 13. Qe2 O-O-O 14. Kd1 Bb7 15. Nf4 g5 16. Nfh5 Qg6 17. Bd2 d4 18. Ra5 Bb6 19. Ra4 Bxg2 20. Rg1 dxe3 21. Bxb4 Bc6 22. Rxa6 exf2 23. Rf1 Bg2 24. Bc3 Ne7 25. Bxh8 Rxh8 26. Qe5 Re8 27. Nf4 gxf4 28. Qh5 fxg3 29. Ra8+ Bxa8 30. Qxg6 hxg6 31. hxg3 Bg2 32. Ke2 Nf5 33. Rc1 Nxg3+ 34. Kd1 Be3 35. c3 f1=Q+ 36. Kc2 Qxc1# { Black wins by checkmate. } 0-1

Game protocol and analysis on lichess.org

Last edited by ArnoHu (Dec. 25, 2017 18:51:30)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Tournament Crosstable

Game of Kings  - 1 ? 1 ?  2.0
Bonsai 0 - 1 ? ? 1.0
The Turk ? 0 - ? ? 0.0
Archimedes 0 ? ? - 1 1.0
Midecah ? ? ? 0 - 0.0
scratching2x
Scratcher
40 posts

Scratch Chess Engine Tournament

I beat GoK Difficult!
FInally
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

scratching2x wrote:

I beat GoK Difficult!
FInally

Congrats! On Scratch or on Phosphorus? On Phosphorus level Difficult is even more, well, difficult (due to better performance it can increase search depth).

Last edited by ArnoHu (Dec. 26, 2017 01:37:56)

ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Game #5: The Turk (white) vs. Midecah Chess (black) 1-0

1. d4 g6 { A40 Modern Defense } 2. Bf4 d6 3. e3 f5 4. Ne2 e6 5. Nd2 Be7 6. Rg1 h5 7. Rh1 Rh7 8. Rg1 d5 9. Rh1 Bb4 10. Rg1 b6 11. Rh1 h4 12. Rg1 a5 13. Rh1 Re7 14. c3 *

At this point Midecah's knight moved from e7 to e8, capturing its own king. According to our tournament rules, the game counts as a win for The Turk.

Game protocol and analysis on lichess.org

Please note: The Turk was playing “virtual white”, by importing an inverted FEN game board at the beginning of the game.
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Tournament Crosstable

Game of Kings  - 1 ? 1 ?  2.0
Bonsai 0 - 1 ? ? 1.0
The Turk ? 0 - ? 1 1.0
Archimedes 0 ? ? - 1 1.0
Midecah ? ? 0 0 - 0.0
Samueldora
Scratcher
100+ posts

Scratch Chess Engine Tournament

ArnoHu wrote:

I noticed you just added another level “blue belt” to Bonsai? I will apply it in Bonsai's next tournament games. I am curious, did you increase search depth, or is it something else? Maybe GoK was lucky that blue belt Bonsai did not exist two days ago, who knows if it could have turned around that one otherwise.

14 days ago I changed the positional evaluation, but expectedly GoK still had a decisive edge in tactics due to deeper search. The major change for Bonsai Blue Belt now was an increase in search depth. I hope it is now able to keep up with GoK.
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Game #6: Archimedes Chess (white) vs. Bonsai (black) 0-1

1. Nf3 d6 { A04 Zukertort Opening: Pirc Invitation } 2. Ng5 h6 3. Ne4 d5 4. Ng3 e5 5. h4 c6 6. a4 Qa5 7. f3 b5 8. Nc3 d4 9. b4 Bxb4 10. Na2 Qxa4 11. e3 dxe3 12. Bxb5 cxb5 13. Ke2 exd2 14. Bb2 Ba5 15. Nc3 Qb4 16. Kxd2 Qd4+ 17. Ke2 Bxc3 18. Qxd4 Bxd4 19. c3 Bc5 20. Rh2 Nd7 21. Ne4 Ngf6 22. Nxc5 Nxc5 23. g4 Na4 24. Ra2 Be6 25. c4 Bxc4+ 26. Kd2 Bxa2 27. Bxe5 Kd7 28. Ke1 Rhe8 29. Rd2+ Bd5 30. f4 Nc5 31. Rd4 Kc6 32. g5 hxg5 33. hxg5 Ng4 34. Rb4 Nd3+ 35. Kf1 Nxb4 36. Bxg7 Nd3 37. Be5 Ngxe5 38. fxe5 Rxe5 39. Kg1 Rh8 40. g6 Re1# { Black wins by checkmate. } 0-1

Game protocol and analysis on lichess.org
ArnoHu
Scratcher
1000+ posts

Scratch Chess Engine Tournament

Tournament Crosstable

Game of Kings  - 1 ? 1 ?  2.0
Bonsai 0 - 1 1 ? 2.0
The Turk ? 0 - ? 1 1.0
Archimedes 0 0 ? - 1 1.0
Midecah ? ? 0 0 - 0.0

Powered by DjangoBB