Update README.md
Browse files
README.md
CHANGED
|
@@ -5,11 +5,32 @@ viewer: false
|
|
| 5 |
|
| 6 |
# Aix-compatible Lichess database
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
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.
|
| 11 |
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.
|
| 12 |
|
| 13 |
Generated using [pgn-to-aix](https://github.com/thomas-daniels/aix/tree/main/pgn-to-aix).
|
| 14 |
|
| 15 |
-
See [my blog post](https://thomasd.be/2026/02/01/aix-storing-querying-chess-games.html) for more details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
# Aix-compatible Lichess database
|
| 7 |
|
| 8 |
+
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).
|
|
|
|
|
|
|
| 9 |
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.
|
| 10 |
|
| 11 |
Generated using [pgn-to-aix](https://github.com/thomas-daniels/aix/tree/main/pgn-to-aix).
|
| 12 |
|
| 13 |
+
See [my blog post](https://thomasd.be/2026/02/01/aix-storing-querying-chess-games.html) for more details.
|
| 14 |
+
|
| 15 |
+
Example DuckDB commands:
|
| 16 |
+
```sql
|
| 17 |
+
INSTALL aixchess FROM community;
|
| 18 |
+
LOAD aixchess;
|
| 19 |
+
|
| 20 |
+
-- Count en passant moves played in Lichess games from January 2013
|
| 21 |
+
|
| 22 |
+
WITH lichess_2013_01 AS (
|
| 23 |
+
FROM 'hf://datasets/thomasd1/aix-lichess-database/low_compression/aix_lichess_2013-01_low.parquet'
|
| 24 |
+
),
|
| 25 |
+
en_passant_move_count AS (
|
| 26 |
+
SELECT
|
| 27 |
+
SUM(
|
| 28 |
+
move_details(movedata).filter(lambda m: m.is_en_passant).length()
|
| 29 |
+
) AS nb_ep_moves
|
| 30 |
+
FROM lichess_2013_01
|
| 31 |
+
)
|
| 32 |
+
|
| 33 |
+
FROM en_passant_move_count;
|
| 34 |
+
|
| 35 |
+
-- Result: 3496
|
| 36 |
+
```
|