Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc0-1.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- reinforcement-learning
|
| 5 |
+
- tabular-classification
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- chess
|
| 10 |
+
- opening-theory
|
| 11 |
+
- lichess
|
| 12 |
+
- elite-games
|
| 13 |
+
- gambitflow
|
| 14 |
+
size_categories:
|
| 15 |
+
- 1M<n<10M
|
| 16 |
+
pretty_name: 'GambitFlow: Elite Chess Opening Theory'
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# ♟️ GambitFlow: Elite Opening Theory (2000+ Elo)
|
| 20 |
+
|
| 21 |
+
## 📊 Dataset Overview
|
| 22 |
+
This dataset serves as the **"Opening Memory"** for the GambitFlow AI project (Synapse-Edge). It contains millions of chess positions extracted exclusively from **Elite Level Games (Elo 2000+)** played on Lichess.
|
| 23 |
+
|
| 24 |
+
The goal is to provide the AI with Grandmaster-level intuition during the opening phase, preventing early positional disadvantages.
|
| 25 |
+
|
| 26 |
+
- **Source:** Lichess Standard Rated Games (Jan 2017 - Apr 2024)
|
| 27 |
+
- **Filter:** White & Black Elo ≥ 2000
|
| 28 |
+
- **Depth:** First 35 plies (moves)
|
| 29 |
+
- **Format:** SQLite Database (`.db`)
|
| 30 |
+
|
| 31 |
+
## 📂 Dataset Structure
|
| 32 |
+
|
| 33 |
+
The data is stored in a `positions` table with the following schema:
|
| 34 |
+
|
| 35 |
+
| Column | Type | Description |
|
| 36 |
+
| :--- | :--- | :--- |
|
| 37 |
+
| `fen` | TEXT (PK) | The board position in Forsyth–Edwards Notation (Cleaned: no move counters). |
|
| 38 |
+
| `move_stats` | JSON | Aggregated statistics of moves played in this position by elite players. |
|
| 39 |
+
|
| 40 |
+
### Example `move_stats` JSON:
|
| 41 |
+
```json
|
| 42 |
+
{
|
| 43 |
+
"e4": 15400,
|
| 44 |
+
"d4": 12300,
|
| 45 |
+
"Nf3": 5000
|
| 46 |
+
}
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
## 🛠️ Usage
|
| 50 |
+
|
| 51 |
+
```python
|
| 52 |
+
import sqlite3
|
| 53 |
+
import json
|
| 54 |
+
|
| 55 |
+
conn = sqlite3.connect("opening_theory_v1.db")
|
| 56 |
+
cursor = conn.cursor()
|
| 57 |
+
|
| 58 |
+
# Get stats for the starting position
|
| 59 |
+
start_fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPP1PPP/RNBQKBNR w KQkq - -"
|
| 60 |
+
cursor.execute("SELECT move_stats FROM opening_book WHERE fen=?", (start_fen,))
|
| 61 |
+
stats = json.loads(cursor.fetchone()[0])
|
| 62 |
+
|
| 63 |
+
print("Most popular elite move:", max(stats, key=stats.get))
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## ⚖️ Credits & License
|
| 67 |
+
- **Raw Data:** [Lichess Open Database](https://database.lichess.org/)
|
| 68 |
+
- **Processed By:** GambitFlow Team
|
| 69 |
+
- **License:** CC0 1.0 Universal (Public Domain)
|
| 70 |
+
|
| 71 |
+
*We gratefully acknowledge Lichess.org for providing open access to millions of chess games.*
|