| --- |
| license: |
| - cc-by-4.0 |
| - odbl |
| task_categories: |
| - reinforcement-learning |
| tags: |
| - chess |
| - training-data |
| - mcts |
| pretty_name: Stoofvlees Training Data |
| --- |
| |
| # Stoofvlees Training Data |
|
|
| Chess training data produced for Stoofvlees, winner of the 2023 World Computer |
| Chess Championship (Valencia) and 2024 (Santiago de Compostela). |
|
|
| This dataset corresponds to the training data described in: |
|
|
| > Pascutto, G. (2025). *Sin Dolor No Hay Gloria: On Conquering 2 World Computer Chess |
| > Championships in Spain*. ICGA Journal, 47(3), 136–156. |
| > https://doi.org/10.1177/13896911251360654 |
|
|
| ## Dataset contents |
|
|
| | File(s) | Size | Contents | |
| |---|---|---| |
| | `train_fullgame.zdat` (+`.idx`) | ~356 MB | Games played to completion, without early adjudication/resignation | |
| | `train_fullgame1.zdat` (+`.idx`) | ~3.9 GB | Games played to completion, without early adjudication/resignation | |
| | `train_all.zdat` (+`.idx`) | ~109 GB | Training data | |
| | `train_early.zdat` (+`.idx`) | ~120 GB | Training data | |
| | `test80-2024-{mar,apr,may,jun,jul,aug,sep}.zdat` (+`.idx`) | ~72–176 GB each | Leela Chess Zero training data, converted to this format for data-mix experiments | |
| | `sample/sample.zdat` (+`.idx`) | ~25 GB | ~150M positions randomly sampled from the entire set, plus validation set | |
|
|
| Positions are subsampled rather than exhaustive; long endgames and drawn games are |
| under-represented relative to their share of full games. |
|
|
| ## File format |
|
|
| ### `.zdat` / `.zdat.idx` |
|
|
| `.zdat` files hold variable-length zstd-compressed groups of fixed-size position records, |
| compressed against a shared dictionary embedded in the file. `.zdat.idx` is a companion |
| index giving byte offsets for random access. |
|
|
| - **`.zdat` header:** magic `SJNGDAT1` (8 bytes) + `entry_size` (u32) + `batch` (u32, records |
| per group) + `level` (u32, zstd compression level) + `dict_len` (u32) + a zstd dictionary |
| blob of `dict_len` bytes, followed by a sequence of zstd frames — one frame per group of |
| `batch` positions, each frame compressed against the dictionary. |
| - **`.zdat.idx` header:** magic `SJNGIDX1` (8 bytes) + record count (u64) + `count + 1` |
| absolute byte offsets (u64 each) into the corresponding `.zdat` file — offset `i` is the |
| start of frame `i`, offset `count` is the end of the file. |
|
|
| ### Per-position record (uncompressed, decoded from each `.zdat` group) |
|
|
| Each record is a fixed 4545-byte struct, `<368s4096B18fffB` in Python `struct` notation: |
|
|
| | Field | Size | Description | |
| |---|---|---| |
| | bitplanes | 368 bytes | 46 bit-packed 8×8 boards, 1 byte per row, MSB-first files a–h. Always oriented from the side-to-move's perspective (board flipped if black to move). See layout below. | |
| | policy | 4096 bytes | MCTS visit-count policy target, one byte per (from, to) move (`index = from_square * 64 + to_square`). `0` = illegal move; otherwise the value is `1 + round(p * 254)` for policy probability `p` (decode: `p = (value - 1) / 254`). | |
| | scalars | 18 × float32 (72 bytes) | Auxiliary position/game-state features. See layout below. | |
| | score | float32 | Search/eval score for the position. | |
| | outcome | float32 | Final game outcome from the position's side to move: -1 (loss), 0 (draw), +1 (win). | |
| | moves_to_go | uint8 | Plies remaining until game end, clamped to 255. `0` means unknown/not recorded. | |
|
|
| Total: 368 + 4096 + 72 + 4 + 4 + 1 = 4545 bytes. |
|
|
| #### Bitplane layout (planes 0–45) |
|
|
| | Planes | Content | |
| |---|---| |
| | 0–5 | Own pawns, knights, bishops, rooks, queens, king | |
| | 6–11 | Opponent pawns, knights, bishops, rooks, queens, king | |
| | 12–21 | Attack maps for both sides across piece types | |
| | 22–27 | Reserved / engine-internal | |
| | 28 | Open files | |
| | 29 | Own half-open files | |
| | 30 | Own passed pawns | |
| | 31–33 | Reserved / engine-internal | |
| | 34 | Opponent half-open files | |
| | 35 | Opponent passed pawns | |
| | 36–38 | Reserved / engine-internal | |
| | 39–43 | Reserved / engine-internal | |
| | 44 | En passant target square (all-zero if none) | |
| | 45 | Light/dark square color mask (constant, not side-relative) | |
|
|
| #### Scalar layout (scalars 0–17) |
|
|
| | Index | Content | |
| |---|---| |
| | 0 | Static evaluation score, converted from centipawns to a win-probability-style value and rescaled to [-1, 1] | |
| | 1 | Quiescence-search score, converted the same way | |
| | 2–5 | Castling rights: own kingside, own queenside, opponent kingside, opponent queenside | |
| | 6 | Position has occurred before this game (repetition flag) | |
| | 7 | Fifty-move-rule counter, normalized to [0, 1] | |
| | 8–17 | Reserved / engine-internal | |
|
|
| ## License |
|
|
| - `train_fullgame.zdat`, `train_fullgame1.zdat`, `train_all.zdat`, `train_early.zdat`: CC-BY-4.0 |
| - `test80-2024-*`: ODbL 1.0 / DbCL 1.0 (converted from Leela Chess Zero training data, |
| provided for ease of use when experimenting with data mixing) |
|
|
| ## Citation |
|
|
| ```bibtex |
| @article{pascutto2025sindolor, |
| author = {Pascutto, Gian-Carlo}, |
| title = {Sin Dolor No Hay Gloria: On Conquering 2 World Computer Chess Championships in Spain}, |
| journal = {ICGA Journal}, |
| volume = {47}, |
| number = {3}, |
| pages = {136--156}, |
| year = {2025}, |
| doi = {10.1177/13896911251360654} |
| } |
| ``` |
|
|