|
--- |
|
license: cc0-1.0 |
|
size_categories: |
|
- 100M<n<1B |
|
dataset_info: |
|
features: |
|
- name: fen |
|
dtype: string |
|
- name: line |
|
dtype: string |
|
- name: depth |
|
dtype: int64 |
|
- name: knodes |
|
dtype: int64 |
|
- name: cp |
|
dtype: int64 |
|
- name: mate |
|
dtype: int64 |
|
splits: |
|
- name: train |
|
num_bytes: 86266003148 |
|
num_examples: 618678212 |
|
download_size: 30329004321 |
|
dataset_size: 86266003148 |
|
configs: |
|
- config_name: default |
|
data_files: |
|
- split: train |
|
path: data/train-* |
|
tags: |
|
- chess |
|
- stockfish |
|
- lichess |
|
- games |
|
--- |
|
# Dataset Card for the Lichess Evaluations dataset |
|
|
|
<!-- Provide a quick summary of the dataset. --> |
|
## Dataset Description |
|
|
|
**247,858,650 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 **618,678,212 rows**. |
|
|
|
This dataset is updated monthly, and was last updated on June 11th, 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. |