File size: 4,679 Bytes
400a551
f4c6c11
32842f8
 
 
 
 
 
 
 
e7199e6
 
32842f8
 
e7199e6
32842f8
e7199e6
 
32842f8
 
e7199e6
32842f8
 
 
e7199e6
f4c6c11
32842f8
d3a7577
32842f8
e7199e6
32842f8
 
 
e7199e6
 
 
32842f8
e7199e6
 
32842f8
e7199e6
 
 
32842f8
e7199e6
32842f8
e7199e6
32842f8
e7199e6
 
 
 
 
 
d3a7577
32842f8
e7199e6
 
 
 
 
 
 
 
 
 
32842f8
e7199e6
32842f8
e7199e6
32842f8
e7199e6
 
 
 
 
 
32842f8
e7199e6
32842f8
 
e7199e6
 
32842f8
e7199e6
 
 
 
 
 
 
 
 
32842f8
e7199e6
 
 
 
 
 
32842f8
e7199e6
 
 
 
 
 
 
 
 
 
 
 
 
 
32842f8
 
e7199e6
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
license: cc0-1.0
task_categories:
- reinforcement-learning
- tabular-classification
language:
- en
tags:
- chess
- gambitflow
- synapse-base
- nexus-core
- elite
- sqlite
- big-data
size_categories:
- 10M<n<100M # Updated to reflect total size
pretty_name: GambitFlow Elite Training Data (Unified)
---

# 📚 GambitFlow Elite Training Data (Unified)

<div align="center">

![Dataset Banner](https://capsule-render.vercel.app/api?type=waving&color=0:27ae60,100:2c3e50&height=200&section=header&text=Elite%20Training%20Data&fontSize=50&animation=fadeIn&fontAlignY=35&desc=Unified%20Master%20Collections%20(Legacy%20Core%20+%20Modern%20Synapse)&descAlignY=60)
[![License: CC0-1.0](https://img.shields.io/badge/License-CC0%201.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/) 
![Format](https://img.shields.io/badge/Format-SQLite3-green)
![Total Size](https://img.shields.io/badge/Total%20Size-~2.1GB-blue)

[**View on GitHub**](https://github.com/GambitFlow/GambitFlow) • [**Target Models: Nexus-Core & Synapse-Base**](https://huggingface.co/GambitFlow)

</div>

## 📖 Dataset Overview

This repository hosts the **foundational knowledge bases** for the GambitFlow chess engines. It consolidates two distinct, powerful datasets:

1.  **`chess_stats_v2.db`**: The original, large-scale dataset used to train the **Nexus-Core** engine.
2.  **`match_positions_v2.db`**: A new, ultra-high-quality dataset specifically curated for the next-generation **Synapse-Base** engine.

Together, they provide a comprehensive training resource covering different eras of chess theory and rating levels.

---

## 💎 Dataset 1: Synapse-Base Match Data (`match_positions_v2.db`)

This is the **newly added**, highly-focused dataset designed to teach **Synapse-Base** advanced middlegame strategy and endgame technique. It prioritizes quality over quantity.

### Data Engineering & Filtering
*   **Source:** Lichess Elite Database (2024-2025 monthly archives).
*   **Critical Filters:**
    *   **Player Rating:** Both players must have an ELO of **2400 or higher**.
    *   **Game Phase:** Skips the first 10 moves of every game to focus on non-theoretical positions.
    *   **Position Selection:** An intelligent filtering algorithm was used to select only "interesting" positions (e.g., positions with material imbalance, tactical complexity, or critical endgame structures).
*   **Final Volume:** A dense collection of approximately **10,000,000** strategically rich positions.

### Schema: `positions` table
| Column | Type | Description |
|--------|------|-------------|
| `fen` | TEXT | The board position (FEN). |
| `phase` | TEXT | 'midgame' or 'endgame'. |
| `value_target` | REAL | The game's outcome scored from -1.0 (loss) to 1.0 (win) from the current player's perspective. |
| `move_played` | TEXT | The move played by the 2400+ ELO human in that position. |
| `avg_elo` | INTEGER | The average rating of the two players. |

---

## 🕰️ Dataset 2: Nexus-Core Legacy Data (`chess_stats_v2.db`)

This is the **original, large-scale dataset** that powered the **Nexus-Core** engine. It provides a broad foundation of solid, club-level chess knowledge.

### Data Engineering & Filtering
*   **Source:** Lichess Public Database (January 2017).
*   **Critical Filter:** Only games where both players had an ELO **greater than 2000** were accepted.
*   **Extraction:** Positions were extracted up to the first **20 moves** (Opening/Early Middlegame).
*   **Final Volume:** Over 5,000,000 total positions processed, resulting in **2,488,753 unique positions**.
*   **File Size:** **882 MB**.

### Schema: `positions` table
| Column | Type | Description |
|--------|------|-------------|
| `fen` | TEXT (PK) | The board position, truncated to 4 parts (Position, Turn, Castling, En Passant). |
| `stats` | TEXT (JSON) | A JSON string containing aggregated move counts and game outcomes (Win/Draw/Loss). |

---

## 🚀 Usage Example (Python)

This example shows how to load and sample the **new Synapse-Base data**.

```python
import sqlite3
from huggingface_hub import hf_hub_download

# Download the new Match Data
db_path = hf_hub_download(
    repo_id="GambitFlow/Elite-Data",
    filename="match_positions_v2.db",
    repo_type="dataset"
)

# Connect and sample data
conn = sqlite3.connect(db_path)
cursor = conn.cursor()

# Get 5 random middlegame positions
cursor.execute("SELECT fen, move_played, value_target FROM positions WHERE phase='midgame' ORDER BY RANDOM() LIMIT 5")

for row in cursor.fetchall():
    print(f"FEN: {row}")
    print(f"Grandmaster Move: {row} | Outcome Score: {row}")
    print("-" * 30)

conn.close()
```

---
<div align-center