--- license: cc0-1.0 size_categories: - 100M ## Dataset Description **173,866,932 chess positions** evaluated with Stockfish at various depths and node count. Produced by, and for, the [Lichess analysis board](https://lichess.org/analysis), running various flavours of Stockfish within user browsers. This version of the dataset is a de-normalized version of [the original dataset](https://database.lichess.org/#evals) and contains **442,684,690 rows**. This dataset is updated monthly, and was last updated on January 5th, 2025. ### Dataset Creation ```python from datasets import load_dataset dset = load_dataset("json", data_files="lichess_db_eval.jsonl", split="train") def batch_explode_rows(batch): exploded = {"fen": [], "line": [], "depth": [], "knodes": [], "cp": [], "mate": []} for fen, evals in zip(batch["fen"], batch["evals"]): for eval_ in evals: for pv in eval_["pvs"]: exploded["fen"].append(fen) exploded["line"].append(pv["line"]) exploded["depth"].append(eval_["depth"]) exploded["knodes"].append(eval_["knodes"]) exploded["cp"].append(pv["cp"]) exploded["mate"].append(pv["mate"]) return exploded dset = dset.map(batch_explode_rows, batched=True, batch_size=64, num_proc=12, remove_columns=dset.column_names) dset.push_to_hub("Lichess/chess-evaluations") ``` ### Dataset Usage Using the `datasets` library: ```python from datasets import load_dataset dset = load_dataset("Lichess/chess-evaluations", split="train") ``` ## Dataset Details ### Dataset Sample One row of the dataset looks like this: ```python { "fen": "2bq1rk1/pr3ppn/1p2p3/7P/2pP1B1P/2P5/PPQ2PB1/R3R1K1 w - -", "line": "g2e4 f7f5 e4b7 c8b7 f2f3 b7f3 e1e6 d8h4 c2h2 h4g4", "depth": 36, "knodes": 206765, "cp": 311, "mate": None } ``` ### Dataset Fields Every row of the dataset contains the following fields: - **`fen`**: `string`, the position FEN only contains pieces, active color, castling rights, and en passant square. - **`line`**: `string`, the principal variation, in UCI format. - **`depth`**: `string`, the depth reached by the engine. - **`knodes`**: `int`, the number of kilo-nodes searched by the engine. - **`cp`**: `int`, the position's centipawn evaluation. This is `None` if mate is certain. - **`mate`**: `int`, the position's mate evaluation. This is `None` if mate is not certain.