|
--- |
|
license: cc0-1.0 |
|
size_categories: |
|
- 1K<n<10K |
|
pretty_name: Chess Openings |
|
dataset_info: |
|
features: |
|
- name: eco-volume |
|
dtype: string |
|
- name: eco |
|
dtype: string |
|
- name: name |
|
dtype: string |
|
- name: img |
|
dtype: image |
|
- name: pgn |
|
dtype: string |
|
- name: uci |
|
dtype: string |
|
- name: epd |
|
dtype: string |
|
splits: |
|
- name: train |
|
num_bytes: 215781488.706 |
|
num_examples: 3522 |
|
download_size: 215237282 |
|
dataset_size: 215781488.706 |
|
configs: |
|
- config_name: default |
|
data_files: |
|
- split: train |
|
path: data/train-* |
|
tags: |
|
- chess |
|
- lichess |
|
- games |
|
- game |
|
--- |
|
|
|
# Dataset Card for Lichess Puzzles |
|
|
|
<!-- Provide a quick summary of the dataset. --> |
|
## Dataset Description |
|
|
|
3522 chess openings with their [Encyclopaedia of Chess Openings (ECO)](https://en.wikipedia.org/wiki/Encyclopaedia_of_Chess_Openings) classification. |
|
|
|
### Dataset Creation |
|
Creating this dataset is detailed in its original [GitHub repository](https://github.com/lichess-org/chess-openings). |
|
|
|
Updates to the original repo will also be reflected in this version. Dataset last updated on June 10th, 2025. |
|
|
|
### Dataset Usage |
|
|
|
Using the `datasets` library: |
|
|
|
```python |
|
from datasets import load_dataset |
|
|
|
dset = load_dataset("Lichess/chess-openings", split="train") |
|
``` |
|
Using the `pandas` library: |
|
|
|
```python |
|
import pandas as pd |
|
|
|
df = pd.read_parquet("hf://datasets/Lichess/chess-openings/data/train-00000-of-00001.parquet") |
|
``` |
|
|
|
Using the `polars` library: |
|
|
|
```python |
|
import polars as pl |
|
|
|
df = pl.read_parquet('hf://datasets/Lichess/chess-openings/data/train-00000-of-00001.parquet') |
|
``` |
|
|
|
## Dataset Details |
|
|
|
### Dataset Sample |
|
|
|
One row of the dataset looks like this: |
|
|
|
```python |
|
{ |
|
'eco-volume': 'B', |
|
'eco': 'B31', |
|
'name': 'Sicilian Defense: Nyezhmetdinov-Rossolimo Attack, Fianchetto Variation, Totsky Attack', |
|
'pgn': '1. e4 c5 2. Nf3 Nc6 3. Bb5 g6 4. O-O Bg7 5. c3 Nf6 6. Qa4', |
|
'uci': 'e2e4 c7c5 g1f3 b8c6 f1b5 g7g6 e1g1 f8g7 c2c3 g8f6 d1a4', |
|
'epd': 'r1bqk2r/pp1pppbp/2n2np1/1Bp5/Q3P3/2P2N2/PP1P1PPP/RNB2RK1 b kq -'} |
|
} |
|
``` |
|
### Dataset Fields |
|
|
|
Every row of the dataset contains the following fields: |
|
|
|
- **`eco-volume`**: `string`, the ECO parent category. Can be either `A`, `B`, `C`, `D`, or `E`. |
|
- **`eco`**: `string`, the ECO. |
|
- **`name`**: `string`, the name of the opening in English. |
|
- **`pgn`**: `int`, the sequence of moves leading to the opening position. If not unique, the moves are the most common ones leading to that opening. |
|
- **`uci`**: `int`, the same moves described by the `pgn` field in [UCI notation](https://backscattering.de/chess/uci/#move). |
|
- **`epd`**: `int`, the [EPD](https://www.chessprogramming.org/Extended_Position_Description) ([FEN](https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation) without move numbers) of the opening position, en passant field only if legal |
|
|
|
### Dataset Conventions |
|
|
|
* Title case is used for opening names. |
|
* Names are structured like `Opening family: Variation, Subvariation, ...`, |
|
e.g., `Sicilian Defense: Najdorf Variation, English Attack`. |
|
* The suggested way to classify games is to play moves backwards until |
|
a named position is found. To make this work well with common transpositions, |
|
multiple entries for a single opening may be added. |
|
* However, each name has a unique *shortest* line. If necessary, |
|
a distinguishing move is appended, e.g., |
|
`King's Gambit Accepted: Schurig Gambit, with Bb5`. |
|
|
|
## Additional Information |
|
|
|
- To contribute to the dataset, send a PR on the [dataset's GitHub repository](https://github.com/lichess-org/chess-openings/blob/master/CONTRIBUTING.md). |