thomasd1's picture
Update README.md
995cafe verified
---
license: cc0-1.0
viewer: false
---
# Aix-compatible Lichess database
This dataset contains the [Lichess database](https://database.lichess.org/) of 7+ billion chess games, but in a format queryable using [Aix](https://github.com/thomas-daniels/aix), with the [`aixchess` extension for DuckDB](https://duckdb.org/community_extensions/extensions/aixchess).
Three compression levels (Low, Medium, and High) are offered for the chess game encoding, enabling a trade-off between decoding speed and size. The Parquet files themselves are all zstd-compressed at level 19.
Generated using [pgn-to-aix](https://github.com/thomas-daniels/aix/tree/main/pgn-to-aix).
See [my blog post](https://thomasd.be/2026/02/01/aix-storing-querying-chess-games.html) for more details.
Example DuckDB commands:
```sql
INSTALL aixchess FROM community;
LOAD aixchess;
-- Count en passant moves played in Lichess games from January 2013
WITH lichess_2013_01 AS (
FROM 'hf://datasets/thomasd1/aix-lichess-database/low_compression/aix_lichess_2013-01_low.parquet'
),
en_passant_move_count AS (
SELECT
SUM(
move_details(movedata).filter(lambda m: m.is_en_passant).length()
) AS nb_ep_moves
FROM lichess_2013_01
)
FROM en_passant_move_count;
-- Result: 3496
```