Rafs-an09002 commited on
Commit
e7199e6
ยท
verified ยท
1 Parent(s): 516d460

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +77 -29
README.md CHANGED
@@ -8,63 +8,111 @@ language:
8
  tags:
9
  - chess
10
  - gambitflow
11
- - big-data
 
12
  - elite
13
  - sqlite
 
14
  size_categories:
15
- - 1M<n<10M
16
- pretty_name: GambitFlow Elite Training Data
17
  ---
18
 
19
- # ๐Ÿ“š GambitFlow Elite Training Data
20
 
21
  <div align="center">
22
 
23
- ![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=5%20Million%2B%20Master%20Level%20Positions%20(ELO%202000%2B)&descAlignY=60)
24
  [![License: CC0-1.0](https://img.shields.io/badge/License-CC0%201.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/)
25
  ![Format](https://img.shields.io/badge/Format-SQLite3-green)
26
- ![Volume](https://img.shields.io/badge/Size-882MB-blue)
27
- ![Quality](https://img.shields.io/badge/Quality-Filtered%202000%2B%20ELO-red)
28
 
29
- [**View on GitHub**](https://github.com/GambitFlow/GambitFlow) โ€ข [**Source Model: Nexus-core CE**](https://huggingface.co/GambitFlow/gambitflow-nexus-core)
30
 
31
  </div>
32
 
33
- ## ๐Ÿ“– Dataset Description
 
 
34
 
35
- This dataset is the highly curated input required to train **strong, club-level chess evaluation models** like the **Nexus-core CE**. It is designed to maximize the signal-to-noise ratio in chess data by removing moves made by lower-rated players.
 
36
 
37
- By exclusively training on **Elite-level games**, the resulting AI avoids learning common amateur mistakes and focuses on solid positional principles.
 
 
38
 
39
- ## ๐Ÿ› ๏ธ Data Engineering & Filtering
40
 
41
- The database was created through a multi-stage, streaming pipeline to handle the massive volume efficiently without memory overflow.
42
 
43
- 1. **Source:** Lichess Public Database (January 2017).
44
- 2. **CRITICAL FILTER:** Only games where **White ELO > 2000 AND Black ELO > 2000** were accepted.
45
- 3. **Extraction:** Positions (FENs) were extracted only up to the first **20 moves** of each filtered game (the Opening/Early Middlegame phase).
46
- 4. **Optimization:** The data was aggregated by unique FEN and stored in a compressed **SQLite** file.
 
 
 
47
 
48
- - **Final Volume:** Over **5,000,000 Total Positions** processed, resulting in **2,488,753 Unique Positions**.
49
- - **File Size:** **882 MB**.
 
 
 
 
 
 
 
 
50
 
51
- ## ๐Ÿ“‚ File Structure & Schema
52
 
53
- The main file is `chess_stats_v2.db`.
54
 
55
- ### Table: `positions`
 
 
 
 
 
56
 
 
57
  | Column | Type | Description |
58
  |--------|------|-------------|
59
- | `fen` | **TEXT (Primary Key)** | The board position. **Truncated to 4 parts** (Position, Turn, Castling, En Passant) for maximum data aggregation across transpositions. |
60
- | `stats` | **TEXT (JSON)** | JSON string containing aggregated move counts and game outcomes (W/D/L) for subsequent training. |
61
 
62
- ## ๐Ÿš€ Usage (Model Training)
 
 
 
 
 
 
 
 
63
 
64
- This database is meant to be read by the **`SQLiteIterableDataset`** class in PyTorch, ensuring only small batches of data are streamed at a time, preventing RAM crashes even with large datasets.
 
 
 
 
 
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
  ---
68
- <div align="center">
69
- <p>Curated by <a href="https://github.com/GambitFlow">GambitFlow</a></p>
70
- </div>
 
8
  tags:
9
  - chess
10
  - gambitflow
11
+ - synapse-base
12
+ - nexus-core
13
  - elite
14
  - sqlite
15
+ - big-data
16
  size_categories:
17
+ - 10M<n<100M # Updated to reflect total size
18
+ pretty_name: GambitFlow Elite Training Data (Unified)
19
  ---
20
 
21
+ # ๐Ÿ“š GambitFlow Elite Training Data (Unified)
22
 
23
  <div align="center">
24
 
25
+ ![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)
26
  [![License: CC0-1.0](https://img.shields.io/badge/License-CC0%201.0-lightgrey.svg)](http://creativecommons.org/publicdomain/zero/1.0/)
27
  ![Format](https://img.shields.io/badge/Format-SQLite3-green)
28
+ ![Total Size](https://img.shields.io/badge/Total%20Size-~1GB-blue)
 
29
 
30
+ [**View on GitHub**](https://github.com/GambitFlow/GambitFlow) โ€ข [**Target Models: Nexus-Core & Synapse-Base**](https://huggingface.co/GambitFlow)
31
 
32
  </div>
33
 
34
+ ## ๐Ÿ“– Dataset Overview
35
+
36
+ This repository hosts the **foundational knowledge bases** for the GambitFlow chess engines. It consolidates two distinct, powerful datasets:
37
 
38
+ 1. **`chess_stats_v2.db`**: The original, large-scale dataset used to train the **Nexus-Core** engine.
39
+ 2. **`match_positions_v2.db`**: A new, ultra-high-quality dataset specifically curated for the next-generation **Synapse-Base** engine.
40
 
41
+ Together, they provide a comprehensive training resource covering different eras of chess theory and rating levels.
42
+
43
+ ---
44
 
45
+ ## ๐Ÿ’Ž Dataset 1: Synapse-Base Match Data (`match_positions_v2.db`)
46
 
47
+ This is the **newly added**, highly-focused dataset designed to teach **Synapse-Base** advanced middlegame strategy and endgame technique. It prioritizes quality over quantity.
48
 
49
+ ### Data Engineering & Filtering
50
+ * **Source:** Lichess Elite Database (2024-2025 monthly archives).
51
+ * **Critical Filters:**
52
+ * **Player Rating:** Both players must have an ELO of **2400 or higher**.
53
+ * **Game Phase:** Skips the first 10 moves of every game to focus on non-theoretical positions.
54
+ * **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).
55
+ * **Final Volume:** A dense collection of approximately **3,000,000** strategically rich positions.
56
 
57
+ ### Schema: `positions` table
58
+ | Column | Type | Description |
59
+ |--------|------|-------------|
60
+ | `fen` | TEXT | The board position (FEN). |
61
+ | `phase` | TEXT | 'midgame' or 'endgame'. |
62
+ | `value_target` | REAL | The game's outcome scored from -1.0 (loss) to 1.0 (win) from the current player's perspective. |
63
+ | `move_played` | TEXT | The move played by the 2400+ ELO human in that position. |
64
+ | `avg_elo` | INTEGER | The average rating of the two players. |
65
+
66
+ ---
67
 
68
+ ## ๐Ÿ•ฐ๏ธ Dataset 2: Nexus-Core Legacy Data (`chess_stats_v2.db`)
69
 
70
+ This is the **original, large-scale dataset** that powered the **Nexus-Core** engine. It provides a broad foundation of solid, club-level chess knowledge.
71
 
72
+ ### Data Engineering & Filtering
73
+ * **Source:** Lichess Public Database (January 2017).
74
+ * **Critical Filter:** Only games where both players had an ELO **greater than 2000** were accepted.
75
+ * **Extraction:** Positions were extracted up to the first **20 moves** (Opening/Early Middlegame).
76
+ * **Final Volume:** Over 5,000,000 total positions processed, resulting in **2,488,753 unique positions**.
77
+ * **File Size:** **882 MB**.
78
 
79
+ ### Schema: `positions` table
80
  | Column | Type | Description |
81
  |--------|------|-------------|
82
+ | `fen` | TEXT (PK) | The board position, truncated to 4 parts (Position, Turn, Castling, En Passant). |
83
+ | `stats` | TEXT (JSON) | A JSON string containing aggregated move counts and game outcomes (Win/Draw/Loss). |
84
 
85
+ ---
86
+
87
+ ## ๐Ÿš€ Usage Example (Python)
88
+
89
+ This example shows how to load and sample the **new Synapse-Base data**.
90
+
91
+ ```python
92
+ import sqlite3
93
+ from huggingface_hub import hf_hub_download
94
 
95
+ # Download the new Match Data
96
+ db_path = hf_hub_download(
97
+ repo_id="GambitFlow/Elite-Data",
98
+ filename="match_positions_v2.db",
99
+ repo_type="dataset"
100
+ )
101
 
102
+ # Connect and sample data
103
+ conn = sqlite3.connect(db_path)
104
+ cursor = conn.cursor()
105
+
106
+ # Get 5 random middlegame positions
107
+ cursor.execute("SELECT fen, move_played, value_target FROM positions WHERE phase='midgame' ORDER BY RANDOM() LIMIT 5")
108
+
109
+ for row in cursor.fetchall():
110
+ print(f"FEN: {row}")
111
+ print(f"Grandmaster Move: {row} | Outcome Score: {row}")
112
+ print("-" * 30)
113
+
114
+ conn.close()
115
+ ```
116
 
117
  ---
118
+ <div align-center