sumeet9 commited on
Commit
86afc32
·
verified ·
1 Parent(s): 2d38535

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +434 -339
README.md CHANGED
@@ -1,341 +1,436 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: id
5
- dtype: string
6
- - name: game_id
7
- dtype: string
8
- - name: source
9
- dtype: string
10
- - name: source_type
11
- dtype: string
12
- - name: fen
13
- dtype: string
14
- - name: board_utf8
15
- dtype: string
16
- - name: board_ascii
17
- dtype: string
18
- - name: side_to_move
19
- dtype: string
20
- - name: ply
21
- dtype: int64
22
- - name: game_phase
23
- dtype: string
24
- - name: fullmove_number
25
- dtype: int64
26
- - name: legal_moves_uci
27
- dtype: string
28
- - name: legal_moves_san
29
- dtype: string
30
- - name: num_legal_moves
31
- dtype: int64
32
- - name: material_white
33
- dtype: int64
34
- - name: material_black
35
- dtype: int64
36
- - name: material_diff
37
- dtype: int64
38
- - name: material_total
39
- dtype: int64
40
- - name: white_pawns
41
- dtype: int64
42
- - name: white_knights
43
- dtype: int64
44
- - name: white_bishops
45
- dtype: int64
46
- - name: white_rooks
47
- dtype: int64
48
- - name: white_queens
49
- dtype: int64
50
- - name: black_pawns
51
- dtype: int64
52
- - name: black_knights
53
- dtype: int64
54
- - name: black_bishops
55
- dtype: int64
56
- - name: black_rooks
57
- dtype: int64
58
- - name: black_queens
59
- dtype: int64
60
- - name: has_bishop_pair_white
61
- dtype: bool
62
- - name: has_bishop_pair_black
63
- dtype: bool
64
- - name: is_queenless
65
- dtype: bool
66
- - name: white_king_castled_short
67
- dtype: bool
68
- - name: white_king_castled_long
69
- dtype: bool
70
- - name: white_king_in_center
71
- dtype: bool
72
- - name: white_king_zone_attacks
73
- dtype: int64
74
- - name: black_king_castled_short
75
- dtype: bool
76
- - name: black_king_castled_long
77
- dtype: bool
78
- - name: black_king_in_center
79
- dtype: bool
80
- - name: black_king_zone_attacks
81
- dtype: int64
82
- - name: is_check
83
- dtype: bool
84
- - name: num_checkers
85
- dtype: int64
86
- - name: num_checking_moves
87
- dtype: int64
88
- - name: num_capture_moves
89
- dtype: int64
90
- - name: max_capture_value
91
- dtype: int64
92
- - name: white_doubled_pawns
93
- dtype: int64
94
- - name: white_passed_pawns
95
- dtype: int64
96
- - name: black_doubled_pawns
97
- dtype: int64
98
- - name: black_passed_pawns
99
- dtype: int64
100
- - name: white_center_control
101
- dtype: int64
102
- - name: black_center_control
103
- dtype: int64
104
- - name: is_stalemate
105
- dtype: bool
106
- - name: is_insufficient_material
107
- dtype: bool
108
- - name: can_claim_draw
109
- dtype: bool
110
- - name: halfmove_clock
111
- dtype: int64
112
- - name: is_fifty_move_possible
113
- dtype: bool
114
- - name: board_tension
115
- dtype: int64
116
- - name: current_cp
117
- dtype: int64
118
- - name: current_mate
119
- dtype: int64
120
- - name: current_eval_desc
121
- dtype: string
122
- - name: current_eval_category
123
- dtype: string
124
- - name: best_move_uci
125
- dtype: string
126
- - name: best_move_san
127
- dtype: string
128
- - name: best_move_cp
129
- dtype: int64
130
- - name: best_move_mate
131
- dtype: int64
132
- - name: best_move_is_capture
133
- dtype: bool
134
- - name: best_move_captured_piece
135
- dtype: string
136
- - name: best_move_captured_value
137
- dtype: int64
138
- - name: best_move_is_check
139
- dtype: bool
140
- - name: best_move_is_checkmate
141
- dtype: bool
142
- - name: best_move_is_castling
143
- dtype: bool
144
- - name: best_move_is_promotion
145
- dtype: bool
146
- - name: best_move_promotion_piece
147
- dtype: string
148
- - name: best_move_piece_moved
149
- dtype: string
150
- - name: best_move_from
151
- dtype: string
152
- - name: best_move_to
153
- dtype: string
154
- - name: best_move_category
155
- dtype: string
156
- - name: best_move_is_sacrifice
157
- dtype: bool
158
- - name: best_move_sacrifice_type
159
- dtype: 'null'
160
- - name: best_move_material_sacrificed
161
- dtype: int64
162
- - name: best_move_creates_threats
163
- dtype: bool
164
- - name: best_move_num_new_attacks
165
- dtype: int64
166
- - name: best_move_total_threat_value
167
- dtype: int64
168
- - name: best_move_attacks_queen
169
- dtype: bool
170
- - name: best_move_attacks_rook
171
- dtype: bool
172
- - name: best_move_attacks_minor
173
- dtype: bool
174
- - name: best_move_new_attacks_json
175
- dtype: string
176
- - name: best_move_creates_fork
177
- dtype: bool
178
- - name: best_move_creates_pin
179
- dtype: bool
180
- - name: best_move_pinned_piece
181
- dtype: string
182
- - name: best_move_creates_skewer
183
- dtype: bool
184
- - name: best_move_is_discovered_attack
185
- dtype: bool
186
- - name: position_had_hanging_piece
187
- dtype: bool
188
- - name: position_hanging_piece_value
189
- dtype: int64
190
- - name: best_move_saves_hanging
191
- dtype: bool
192
- - name: best_move_saved_piece
193
- dtype: string
194
- - name: best_move_saved_piece_value
195
- dtype: int64
196
- - name: best_move_is_developing
197
- dtype: bool
198
- - name: best_move_improves_center
199
- dtype: bool
200
- - name: best_move_center_control_change
201
- dtype: int64
202
- - name: best_move_increases_king_pressure
203
- dtype: bool
204
- - name: best_move_king_attack_change
205
- dtype: int64
206
- - name: best_move_creates_passed_pawn
207
- dtype: bool
208
- - name: best_move_advances_passed_pawn
209
- dtype: bool
210
- - name: mobility_before
211
- dtype: int64
212
- - name: mobility_after_opponent
213
- dtype: int64
214
- - name: our_mobility_after
215
- dtype: int64
216
- - name: after_best_cp
217
- dtype: int64
218
- - name: after_best_mate
219
- dtype: int64
220
- - name: eval_change
221
- dtype: int64
222
- - name: pv_uci
223
- dtype: string
224
- - name: pv_san
225
- dtype: string
226
- - name: pv_length
227
- dtype: int64
228
- - name: candidates_json
229
- dtype: string
230
- - name: num_candidates
231
- dtype: int64
232
- - name: second_move_uci
233
- dtype: string
234
- - name: second_move_san
235
- dtype: string
236
- - name: second_move_cp
237
- dtype: int64
238
- - name: second_move_cp_loss
239
- dtype: int64
240
- - name: third_move_uci
241
- dtype: string
242
- - name: third_move_san
243
- dtype: string
244
- - name: third_move_cp
245
- dtype: int64
246
- - name: third_move_cp_loss
247
- dtype: int64
248
- - name: num_good_moves
249
- dtype: int64
250
- - name: num_ok_moves
251
- dtype: int64
252
- - name: num_mistake_moves
253
- dtype: int64
254
- - name: num_blunder_moves
255
- dtype: int64
256
- - name: gap_1_2
257
- dtype: int64
258
- - name: gap_1_3
259
- dtype: int64
260
- - name: gap_1_worst
261
- dtype: int64
262
- - name: is_clear_best
263
- dtype: bool
264
- - name: is_only_move
265
- dtype: bool
266
- - name: is_critical
267
- dtype: bool
268
- - name: is_tactical
269
- dtype: bool
270
- - name: is_forcing
271
- dtype: bool
272
- - name: is_quiet
273
- dtype: bool
274
- - name: is_winning
275
- dtype: bool
276
- - name: is_losing
277
- dtype: bool
278
- - name: is_equal
279
- dtype: bool
280
- - name: is_sharp
281
- dtype: bool
282
- - name: interesting_score
283
- dtype: int64
284
- - name: analysis_depth
285
- dtype: int64
286
- - name: analysis_multipv
287
- dtype: int64
288
- - name: white_elo
289
- dtype: int64
290
- - name: black_elo
291
- dtype: int64
292
- - name: avg_elo
293
- dtype: int64
294
- - name: elo_bucket
295
- dtype: string
296
- - name: time_control
297
- dtype: string
298
- - name: result
299
- dtype: string
300
- - name: puzzle_rating
301
- dtype: int64
302
- - name: puzzle_rating_deviation
303
- dtype: int64
304
- - name: puzzle_themes
305
- list: string
306
- - name: puzzle_solution_uci
307
- dtype: string
308
- - name: puzzle_popularity
309
- dtype: int64
310
- - name: puzzle_nb_plays
311
- dtype: int64
312
- - name: filter_reason
313
- dtype: string
314
- - name: in_100
315
- dtype: bool
316
- - name: in_500
317
- dtype: bool
318
- - name: in_1000
319
- dtype: bool
320
- - name: in_2000
321
- dtype: bool
322
- - name: in_5000
323
- dtype: bool
324
- - name: in_10000
325
- dtype: bool
326
- - name: in_20000
327
- dtype: bool
328
- - name: in_50000
329
- dtype: bool
330
- splits:
331
- - name: train
332
- num_bytes: 382924226
333
- num_examples: 100000
334
- download_size: 94131876
335
- dataset_size: 382924226
336
- configs:
337
- - config_name: default
338
- data_files:
339
- - split: train
340
- path: data/train-*
341
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: mit
3
+ task_categories:
4
+ - text-generation
5
+ language:
6
+ - en
7
+ tags:
8
+ - chess
9
+ - stockfish
10
+ - sft
11
+ - fine-tuning
12
+ - game-playing
13
+ pretty_name: Chess SFT Training Dataset
14
+ size_categories:
15
+ - 10K<n<100K
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  ---
17
+
18
+ # Chess SFT Training Dataset
19
+
20
+ A curated dataset of chess positions with deep Stockfish analysis, designed for supervised fine-tuning (SFT) of language models to play and understand chess.
21
+
22
+ ## Dataset Description
23
+
24
+ This dataset contains chess positions extracted from multiple high-quality sources, each analyzed with Stockfish at depth 20 with MultiPV 3 (top 3 candidate moves). The positions are carefully filtered for quality and diversity across game phases, player skill levels, and position types.
25
+
26
+ ### Sources
27
+
28
+ | Source | Description | Proportion |
29
+ |--------|-------------|------------|
30
+ | **lichess-puzzles** | Tactical puzzles from Lichess with clear best moves | 30% |
31
+ | **lichess-elite** | Elite games (2400+ vs 2300+ rated) from [nikonoel.fr](https://database.nikonoel.fr/) | 25% |
32
+ | **lichess-tournament** | Competitive tournament games | 20% |
33
+ | **lichess-standard** | Standard rated games across all ELO ranges | 25% |
34
+
35
+ ### Key Features
36
+
37
+ - **Deep analysis**: Stockfish depth 20, MultiPV 3
38
+ - **Rich annotations**: 100+ fields including evaluation, move quality, tactics, and positional factors
39
+ - **Balanced phases**: ~10% opening, ~65% middlegame, ~25% endgame (for game sources)
40
+ - **Quality filtered**: Positions selected for interesting decisions
41
+ - **Diverse skill levels**: From novice (<1600) to expert (2400+) play
42
+
43
+ ---
44
+
45
+ ## Complete Schema
46
+
47
+ ### Identification & Source
48
+
49
+ | Field | Type | Description |
50
+ |-------|------|-------------|
51
+ | `id` | string | Unique identifier: `{source}_{game_id}_{ply}` |
52
+ | `game_id` | string | Original game or puzzle ID |
53
+ | `source` | string | Data source (lichess-puzzles, lichess-elite, lichess-tournament, lichess-standard) |
54
+ | `source_type` | string | "puzzle" or "game" |
55
+
56
+ ### Position Representation
57
+
58
+ | Field | Type | Description |
59
+ |-------|------|-------------|
60
+ | `fen` | string | FEN notation of the position |
61
+ | `board_utf8` | string | Unicode board visualization |
62
+ | `board_ascii` | string | ASCII board visualization |
63
+ | `side_to_move` | string | "white" or "black" |
64
+ | `ply` | int | Half-move number in the game |
65
+ | `fullmove_number` | int | Full move number |
66
+ | `game_phase` | string | "opening", "middlegame", or "endgame" |
67
+
68
+ ### Legal Moves
69
+
70
+ | Field | Type | Description |
71
+ |-------|------|-------------|
72
+ | `legal_moves_uci` | string | Space-separated legal moves in UCI notation |
73
+ | `legal_moves_san` | string | Space-separated legal moves in SAN notation |
74
+ | `num_legal_moves` | int | Count of legal moves |
75
+
76
+ ### Current Position Evaluation
77
+
78
+ | Field | Type | Description |
79
+ |-------|------|-------------|
80
+ | `current_cp` | int | Centipawn evaluation (+ favors side to move) |
81
+ | `current_mate` | int/null | Mate distance if forced mate exists |
82
+ | `current_eval_desc` | string | Human-readable eval ("White is winning +3.5") |
83
+ | `current_eval_category` | string | "winning", "slightly_better", "equal", "slightly_worse", "losing" |
84
+
85
+ ### Best Move Analysis
86
+
87
+ | Field | Type | Description |
88
+ |-------|------|-------------|
89
+ | `best_move_uci` | string | Best move in UCI notation |
90
+ | `best_move_san` | string | Best move in SAN notation |
91
+ | `best_move_cp` | int | Evaluation after best move |
92
+ | `best_move_mate` | int/null | Mate distance after best move |
93
+ | `best_move_is_capture` | bool | Move captures a piece |
94
+ | `best_move_captured_piece` | string/null | Name of captured piece |
95
+ | `best_move_captured_value` | int | Material value of capture |
96
+ | `best_move_is_check` | bool | Move gives check |
97
+ | `best_move_is_checkmate` | bool | Move is checkmate |
98
+ | `best_move_is_castling` | bool | Move is castling |
99
+ | `best_move_is_promotion` | bool | Move is pawn promotion |
100
+ | `best_move_promotion_piece` | string/null | Promotion piece type |
101
+ | `best_move_piece_moved` | string | Type of piece moved |
102
+ | `best_move_from` | string | Origin square (e.g., "e2") |
103
+ | `best_move_to` | string | Destination square (e.g., "e4") |
104
+
105
+ ### Move Purpose Analysis (Why the move is good)
106
+
107
+ | Field | Type | Description |
108
+ |-------|------|-------------|
109
+ | `best_move_category` | string | Primary purpose: "tactic", "attack", "defense", "positional", "developing", "escape" |
110
+ | `best_move_is_sacrifice` | bool | Move sacrifices material |
111
+ | `best_move_sacrifice_type` | string/null | "queen_sac", "rook_sac", "piece_sac", "exchange_sac", "pawn_sac" |
112
+ | `best_move_material_sacrificed` | int | Material value sacrificed |
113
+
114
+ ### Threats Created
115
+
116
+ | Field | Type | Description |
117
+ |-------|------|-------------|
118
+ | `best_move_creates_threats` | bool | Move creates new threats |
119
+ | `best_move_num_new_attacks` | int | Number of new piece attacks |
120
+ | `best_move_total_threat_value` | int | Total value of threatened pieces |
121
+ | `best_move_attacks_queen` | bool | Threatens enemy queen |
122
+ | `best_move_attacks_rook` | bool | Threatens enemy rook |
123
+ | `best_move_attacks_minor` | bool | Threatens knight or bishop |
124
+ | `best_move_new_attacks_json` | string/null | JSON array of attack details |
125
+ | `best_move_creates_fork` | bool | Creates a fork |
126
+ | `best_move_creates_pin` | bool | Creates a pin |
127
+ | `best_move_pinned_piece` | string/null | Pinned piece type |
128
+ | `best_move_creates_skewer` | bool | Creates a skewer |
129
+ | `best_move_is_discovered_attack` | bool | Is a discovered attack |
130
+
131
+ ### Defensive Aspects
132
+
133
+ | Field | Type | Description |
134
+ |-------|------|-------------|
135
+ | `position_had_hanging_piece` | bool | Position had undefended piece |
136
+ | `position_hanging_piece_value` | int | Value of hanging piece |
137
+ | `best_move_saves_hanging` | bool | Move saves the hanging piece |
138
+ | `best_move_saved_piece` | string/null | Type of saved piece |
139
+ | `best_move_saved_piece_value` | int | Value of saved piece |
140
+
141
+ ### Positional Improvements
142
+
143
+ | Field | Type | Description |
144
+ |-------|------|-------------|
145
+ | `best_move_is_developing` | bool | Develops a piece |
146
+ | `best_move_improves_center` | bool | Improves center control |
147
+ | `best_move_center_control_change` | int | Change in center control |
148
+ | `best_move_increases_king_pressure` | bool | Increases attack on enemy king |
149
+ | `best_move_king_attack_change` | int | Change in king zone attacks |
150
+ | `best_move_creates_passed_pawn` | bool | Creates a passed pawn |
151
+ | `best_move_advances_passed_pawn` | bool | Advances existing passed pawn |
152
+
153
+ ### Mobility
154
+
155
+ | Field | Type | Description |
156
+ |-------|------|-------------|
157
+ | `mobility_before` | int | Our legal moves before |
158
+ | `mobility_after_opponent` | int | Opponent's moves after our move |
159
+ | `our_mobility_after` | int | Our moves after opponent replies |
160
+
161
+ ### Evaluation After Best Move
162
+
163
+ | Field | Type | Description |
164
+ |-------|------|-------------|
165
+ | `after_best_cp` | int | Eval after best move (from opponent's view) |
166
+ | `after_best_mate` | int/null | Mate distance after best move |
167
+ | `eval_change` | int | Change in evaluation |
168
+
169
+ ### Principal Variation
170
+
171
+ | Field | Type | Description |
172
+ |-------|------|-------------|
173
+ | `pv_uci` | string | Best line in UCI (up to 10 moves) |
174
+ | `pv_san` | string | Best line in SAN |
175
+ | `pv_length` | int | Length of principal variation |
176
+
177
+ ### Alternative Moves (2nd and 3rd Best)
178
+
179
+ | Field | Type | Description |
180
+ |-------|------|-------------|
181
+ | `second_move_uci` | string/null | 2nd best move UCI |
182
+ | `second_move_san` | string/null | 2nd best move SAN |
183
+ | `second_move_cp` | int/null | 2nd best move evaluation |
184
+ | `second_move_cp_loss` | int/null | Centipawn loss vs best |
185
+ | `third_move_uci` | string/null | 3rd best move UCI |
186
+ | `third_move_san` | string/null | 3rd best move SAN |
187
+ | `third_move_cp` | int/null | 3rd best move evaluation |
188
+ | `third_move_cp_loss` | int/null | Centipawn loss vs best |
189
+
190
+ ### All Candidates (JSON)
191
+
192
+ | Field | Type | Description |
193
+ |-------|------|-------------|
194
+ | `candidates_json` | string | Full JSON array of all analyzed moves with complete data |
195
+ | `num_candidates` | int | Number of candidates analyzed (typically 3) |
196
+
197
+ ### Move Quality Distribution
198
+
199
+ | Field | Type | Description |
200
+ |-------|------|-------------|
201
+ | `num_good_moves` | int | Moves within 30cp of best |
202
+ | `num_ok_moves` | int | Moves 30-100cp worse |
203
+ | `num_mistake_moves` | int | Moves 100-200cp worse |
204
+ | `num_blunder_moves` | int | Moves 200+cp worse |
205
+
206
+ ### Evaluation Gaps
207
+
208
+ | Field | Type | Description |
209
+ |-------|------|-------------|
210
+ | `gap_1_2` | int | Centipawn gap: best vs 2nd best |
211
+ | `gap_1_3` | int | Centipawn gap: best vs 3rd best |
212
+ | `gap_1_worst` | int | Centipawn gap: best vs worst candidate |
213
+
214
+ ### Position Type Flags
215
+
216
+ | Field | Type | Description |
217
+ |-------|------|-------------|
218
+ | `is_clear_best` | bool | Best move is clearly superior (gap > 50cp) |
219
+ | `is_only_move` | bool | Only one reasonable move (gap > 150cp) |
220
+ | `is_critical` | bool | Large eval swing based on move choice |
221
+ | `is_tactical` | bool | Position involves tactics |
222
+ | `is_forcing` | bool | Few good options, forcing sequence |
223
+ | `is_quiet` | bool | Calm positional position |
224
+ | `is_winning` | bool | Side to move is winning |
225
+ | `is_losing` | bool | Side to move is losing |
226
+ | `is_equal` | bool | Position is roughly equal |
227
+ | `is_sharp` | bool | High tension, big eval swings possible |
228
+
229
+ ### Quality Score
230
+
231
+ | Field | Type | Description |
232
+ |-------|------|-------------|
233
+ | `interesting_score` | int | Composite score for position quality (higher = more interesting) |
234
+ | `filter_reason` | string | Why position was kept: "puzzle", "critical", "very_interesting", "interesting", "standard", "boring" |
235
+
236
+ ### Material Count
237
+
238
+ | Field | Type | Description |
239
+ |-------|------|-------------|
240
+ | `material_white` | int | White's material value |
241
+ | `material_black` | int | Black's material value |
242
+ | `material_diff` | int | Material difference (+ favors white) |
243
+ | `material_total` | int | Total material on board |
244
+ | `white_pawns` | int | White pawn count |
245
+ | `white_knights` | int | White knight count |
246
+ | `white_bishops` | int | White bishop count |
247
+ | `white_rooks` | int | White rook count |
248
+ | `white_queens` | int | White queen count |
249
+ | `black_pawns` | int | Black pawn count |
250
+ | `black_knights` | int | Black knight count |
251
+ | `black_bishops` | int | Black bishop count |
252
+ | `black_rooks` | int | Black rook count |
253
+ | `black_queens` | int | Black queen count |
254
+ | `has_bishop_pair_white` | bool | White has bishop pair |
255
+ | `has_bishop_pair_black` | bool | Black has bishop pair |
256
+ | `is_queenless` | bool | Neither side has a queen |
257
+
258
+ ### King Safety
259
+
260
+ | Field | Type | Description |
261
+ |-------|------|-------------|
262
+ | `white_king_castled_short` | bool | White castled kingside |
263
+ | `white_king_castled_long` | bool | White castled queenside |
264
+ | `white_king_in_center` | bool | White king still in center |
265
+ | `white_king_zone_attacks` | int | Attacks on white king zone |
266
+ | `black_king_castled_short` | bool | Black castled kingside |
267
+ | `black_king_castled_long` | bool | Black castled queenside |
268
+ | `black_king_in_center` | bool | Black king still in center |
269
+ | `black_king_zone_attacks` | int | Attacks on black king zone |
270
+
271
+ ### Checks and Threats
272
+
273
+ | Field | Type | Description |
274
+ |-------|------|-------------|
275
+ | `is_check` | bool | Side to move is in check |
276
+ | `num_checkers` | int | Number of checking pieces |
277
+ | `num_checking_moves` | int | Legal moves that give check |
278
+ | `num_capture_moves` | int | Legal capturing moves |
279
+ | `max_capture_value` | int | Highest value capture available |
280
+
281
+ ### Pawn Structure
282
+
283
+ | Field | Type | Description |
284
+ |-------|------|-------------|
285
+ | `white_doubled_pawns` | int | White's doubled pawns |
286
+ | `black_doubled_pawns` | int | Black's doubled pawns |
287
+ | `white_passed_pawns` | int | White's passed pawns |
288
+ | `black_passed_pawns` | int | Black's passed pawns |
289
+
290
+ ### Center Control
291
+
292
+ | Field | Type | Description |
293
+ |-------|------|-------------|
294
+ | `white_center_control` | int | White's attacks on d4,d5,e4,e5 |
295
+ | `black_center_control` | int | Black's attacks on d4,d5,e4,e5 |
296
+
297
+ ### Board State Flags
298
+
299
+ | Field | Type | Description |
300
+ |-------|------|-------------|
301
+ | `is_stalemate` | bool | Position is stalemate |
302
+ | `is_insufficient_material` | bool | Draw by insufficient material |
303
+ | `can_claim_draw` | bool | Draw can be claimed |
304
+ | `halfmove_clock` | int | Moves since pawn move/capture |
305
+ | `is_fifty_move_possible` | bool | 50-move rule applicable |
306
+ | `board_tension` | int | Sum of attacked piece values |
307
+
308
+ ### Player Ratings
309
+
310
+ | Field | Type | Description |
311
+ |-------|------|-------------|
312
+ | `white_elo` | int | White player's rating |
313
+ | `black_elo` | int | Black player's rating |
314
+ | `avg_elo` | int | Average rating |
315
+ | `elo_bucket` | string | "novice" (<1600), "club" (1600-2000), "strong" (2000-2400), "expert" (2400+) |
316
+
317
+ ### Game Metadata
318
+
319
+ | Field | Type | Description |
320
+ |-------|------|-------------|
321
+ | `time_control` | string | Time control of the game |
322
+ | `result` | string | Game result (1-0, 0-1, 1/2-1/2) |
323
+
324
+ ### Analysis Metadata
325
+
326
+ | Field | Type | Description |
327
+ |-------|------|-------------|
328
+ | `analysis_depth` | int | Stockfish search depth used |
329
+ | `analysis_multipv` | int | Number of lines analyzed |
330
+
331
+ ### Puzzle-Specific Fields (only for lichess-puzzles)
332
+
333
+ | Field | Type | Description |
334
+ |-------|------|-------------|
335
+ | `puzzle_rating` | int | Puzzle difficulty rating |
336
+ | `puzzle_rating_deviation` | int | Rating uncertainty |
337
+ | `puzzle_themes` | string | Space-separated puzzle themes |
338
+ | `puzzle_solution_uci` | string | Puzzle solution moves in UCI |
339
+ | `puzzle_popularity` | int | Puzzle popularity score |
340
+ | `puzzle_nb_plays` | int | Number of times puzzle was played |
341
+
342
+ ### Subset Flags
343
+
344
+ | Field | Type | Description |
345
+ |-------|------|-------------|
346
+ | `in_100` | bool | Included in 100-sample subset |
347
+ | `in_500` | bool | Included in 500-sample subset |
348
+ | `in_1000` | bool | Included in 1000-sample subset |
349
+ | `in_2000` | bool | Included in 2000-sample subset |
350
+ | ... | ... | Additional subset flags as available |
351
+
352
+ ---
353
+
354
+ ## Position Quality Distribution
355
+
356
+ Positions are categorized by why they were kept:
357
+
358
+ - **puzzle**: From the puzzles dataset (tactical training)
359
+ - **critical**: Large evaluation swing based on move choice
360
+ - **very_interesting**: High composite interest score (score >= 30)
361
+ - **interesting**: Good interest score (score >= 15)
362
+ - **standard**: Baseline interesting positions (score >= 0)
363
+ - **boring**: Lower interest but included for diversity
364
+
365
+ ## Intended Uses
366
+
367
+ - **SFT for chess LLMs**: Train language models to suggest good chess moves
368
+ - **Move quality prediction**: Predict evaluation changes from moves
369
+ - **Position understanding**: Train models to describe chess positions
370
+ - **Chess tutoring**: Generate explanations for why moves are good/bad
371
+ - **Move purpose classification**: Classify moves as tactical/positional/defensive
372
+
373
+ ## Example Usage
374
+
375
+ ```python
376
+ from datasets import load_dataset
377
+
378
+ dataset = load_dataset("agi-noobs/chess-sft-20k")
379
+
380
+ # Get a position
381
+ pos = dataset["train"][0]
382
+
383
+ # Basic info
384
+ print(f"FEN: {pos['fen']}")
385
+ print(f"Best move: {pos['best_move_san']}")
386
+ print(f"Evaluation: {pos['current_cp']} cp")
387
+
388
+ # Move characteristics
389
+ print(f"Is tactical: {pos['is_tactical']}")
390
+ print(f"Is sacrifice: {pos['best_move_is_sacrifice']}")
391
+ print(f"Creates fork: {pos['best_move_creates_fork']}")
392
+
393
+ # Position insights
394
+ print(f"Material diff: {pos['material_diff']}")
395
+ print(f"Board tension: {pos['board_tension']}")
396
+
397
+ # Alternative moves
398
+ print(f"2nd best: {pos['second_move_san']} ({pos['second_move_cp_loss']}cp worse)")
399
+ ```
400
+
401
+ ## Generation Details
402
+
403
+ - **Stockfish version**: Latest (via Homebrew)
404
+ - **Analysis depth**: 20 ply
405
+ - **MultiPV**: 3 (top 3 moves analyzed)
406
+ - **Hash**: 128 MB per instance
407
+ - **Workers**: 8 parallel Stockfish instances
408
+
409
+ ## Limitations
410
+
411
+ - Evaluations are Stockfish's assessment, not ground truth
412
+ - Some positions may have multiple equally good moves not captured by MultiPV 3
413
+ - Puzzle positions are pre-solution (the position before the winning tactic)
414
+ - ELO ratings are from Lichess, which may differ from FIDE ratings
415
+
416
+ ## License
417
+
418
+ MIT License
419
+
420
+ ## Citation
421
+
422
+ ```bibtex
423
+ @dataset{chess_sft_2024,
424
+ title={Chess SFT Training Dataset},
425
+ author={AGI Noobs},
426
+ year={2024},
427
+ publisher={Hugging Face},
428
+ url={https://huggingface.co/datasets/agi-noobs/chess-sft-20k}
429
+ }
430
+ ```
431
+
432
+ ## Acknowledgments
433
+
434
+ - [Lichess](https://lichess.org/) for the open game and puzzle databases
435
+ - [nikonoel.fr](https://database.nikonoel.fr/) for the curated elite games database
436
+ - [Stockfish](https://stockfishchess.org/) for the chess engine