File size: 2,013 Bytes
8083cbb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
license: cc0-1.0
task_categories:
- reinforcement-learning
- tabular-classification
language:
- en
tags:
- chess
- opening-theory
- lichess
- elite-games
- gambitflow
size_categories:
- 1M<n<10M
pretty_name: 'GambitFlow: Elite Chess Opening Theory'
---

# ♟️ GambitFlow: Elite Opening Theory (2000+ Elo)

## 📊 Dataset Overview
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.

The goal is to provide the AI with Grandmaster-level intuition during the opening phase, preventing early positional disadvantages.

- **Source:** Lichess Standard Rated Games (Jan 2017 - Apr 2024)
- **Filter:** White & Black Elo ≥ 2000
- **Depth:** First 35 plies (moves)
- **Format:** SQLite Database (`.db`)

## 📂 Dataset Structure

The data is stored in a `positions` table with the following schema:

| Column | Type | Description |
| :--- | :--- | :--- |
| `fen` | TEXT (PK) | The board position in Forsyth–Edwards Notation (Cleaned: no move counters). |
| `move_stats` | JSON | Aggregated statistics of moves played in this position by elite players. |

### Example `move_stats` JSON:
```json
{
  "e4": 15400,
  "d4": 12300,
  "Nf3": 5000
}
```

## 🛠️ Usage

```python
import sqlite3
import json

conn = sqlite3.connect("opening_theory_v1.db")
cursor = conn.cursor()

# Get stats for the starting position
start_fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPP1PPP/RNBQKBNR w KQkq - -"
cursor.execute("SELECT move_stats FROM opening_book WHERE fen=?", (start_fen,))
stats = json.loads(cursor.fetchone()[0])

print("Most popular elite move:", max(stats, key=stats.get))
```

## ⚖️ Credits & License
- **Raw Data:** [Lichess Open Database](https://database.lichess.org/)
- **Processed By:** GambitFlow Team
- **License:** CC0 1.0 Universal (Public Domain)

*We gratefully acknowledge Lichess.org for providing open access to millions of chess games.*