--- license: apache-2.0 task_categories: - text-generation - question-answering pretty_name: Checkmate in one --- # Dataset Card for BIG-Bench Checkmate In One Move This is an adapted version of the [BIG-Bench Checkmate in One Move](https://github.com/google/BIG-bench/tree/092b196c1f8f14a54bbc62f24759d43bde46dd3b/bigbench/benchmark_tasks/checkmate_in_one) task originally made by Nitish Keskar (nkeskar@salesforce.com). There also exists a dataset with the [image representation of the board positions before the checkmate move](DylanASHillier/chess_checkmate_images_big_bench). The original task description is the following: > The goal of this task is to probe the ability of language models to play chess in [standard algebraic notation (SAN)](https://en.wikipedia.org/wiki/Algebraic_notation_(chess)). The input to the model is a sequence of moves such that a next possible move is a checkmate. We curated 3,500 games and measured the performance of the system in exact match accuracy. ``` 1. e4 e6 2. Ke2 d5 3. e5 c5 4. f4 Nc6 5. Nf3 Qb6 6. g4 Bd7 7. h4 Nge7 8. c3 Ng6 9. d4 cxd4 10. cxd4 Be7 11. Kf2 O-O 12. h5 Nh8 -----------> Bxh7# 13. Be3 Qxb2+ 14. Kg3 Qxa1 15. Bd3 Qxa2 16. Rh2 Qa1 17. Qc2 Nb4 18. ``` This version adds different text representations of the board positions as well as the legal moves before the checkmate move. ## Example Original representation: ``` 1. d4 d5 2. Nf3 Nf6 3. e3 a6 4. Nc3 e6 5. Bd3 h6 6. e4 dxe4 7. Bxe4 Nxe4 8. Nxe4 Bb4+ 9. c3 Ba5 10. Qa4+ Nc6 11. Ne5 Qd5 12. f3 O-O 13. Nxc6 bxc6 14. Bf4 Ra7 15. Qb3 Qb5 16. Qxb5 cxb5 17. a4 bxa4 18. Rxa4 Bb6 19. Kf2 Bd7 20. Ke3 Bxa4 21. Ra1 Bc2 22. c4 Bxe4 23. fxe4 c5 24. d5 exd5 25. exd5 Re8+ 26. Kf3 Rae7 27. Rxa6 Bc7 28. Bd2 Re2 29. Bc3 R8e3+ 30. Kg4 Rxg2+ 31. Kf5 ``` Turn: black **Target:** Rg5# Image representation: ![Chess Game State](0.png) Legal moves: Kh8 Kf8 Kh7 Bd8 Bb8 Bd6 Bb6 Be5 Ba5 Bf4 Bg3 Bxh2 Re8 Re7 Re6 Re5+ Re4 Rh3 Reg3 Rf3+ Rd3 Rxc3 Ree2 Re1 Rg6 Rg5# Rg4 Rgg3 Rxh2 Rf2+ Rge2 Rd2 Rc2 Rxb2 Rg1 g6+ f6 h5 g5 Text representation: ``` a b c d e f g h ┌────┬────┬────┬────┬────┬────┬────┬────┐ 8 │ │ │ │ │ │ │ k │ │ 8 ├────┼────┼────┼────┼────┼────┼────┼────┤ 7 │ │ │ b │ │ │ p │ p │ │ 7 ├────┼────┼────┼────┼────┼────┼────┼────┤ 6 │ R │ │ │ │ │ │ │ p │ 6 ├────┼────┼────┼────┼────┼────┼────┼────┤ 5 │ │ │ p │ P │ │ K │ │ │ 5 ├────┼────┼────┼────┼────┼────┼────┼────┤ 4 │ │ │ P │ │ │ │ │ │ 4 ├────┼────┼────┼────┼────┼────┼────┼────┤ 3 │ │ │ B │ │ r │ │ │ │ 3 ├────┼────┼────┼────┼────┼────┼────┼────┤ 2 │ │ P │ │ │ │ │ r │ P │ 2 ├────┼────┼────┼────┼────┼────┼────┼────┤ 1 │ │ │ │ │ │ │ │ │ 1 └────┴────┴────┴────┴────┴────┴────┴────┘ a b c d e f g h ``` Icon representation: ``` a b c d e f g h ┌────┬────┬────┬────┬────┬────┬────┬────┐ 8 │ │ │ │ │ │ │ ♚ │ │ 8 ├────┼────┼────┼────┼────┼────┼────┼────┤ 7 │ │ │ ♝ │ │ │ ♟ │ ♟ │ │ 7 ├────┼────┼────┼────┼────┼────┼────┼────┤ 6 │ ♖ │ │ │ │ │ │ │ ♟ │ 6 ├────┼────┼────┼────┼────┼────┼────┼────┤ 5 │ │ │ ♟ │ ♙ │ │ ♔ │ │ │ 5 ├────┼────┼────┼────┼────┼────┼────┼────┤ 4 │ │ │ ♙ │ │ │ │ │ │ 4 ├────┼────┼────┼────┼────┼────┼────┼────┤ 3 │ │ │ ♗ │ │ ♜ │ │ │ │ 3 ├────┼────┼────┼────┼────┼────┼────┼────┤ 2 │ │ ♙ │ │ │ │ │ ♜ │ ♙ │ 2 ├────┼────┼────┼────┼────┼────┼────┼────┤ 1 │ │ │ │ │ │ │ │ │ 1 └────┴────┴────┴────┴────┴────┴────┴────┘ a b c d e f g h ``` ## Generation Code The code to generate this dataset can be found in the [Checkmate in one](https://github.com/alonsosilvaallende/create_chess_checkmate_in_one_dataset/) repo.