metadata license: mit
task_categories:
- text-generation
language:
- en
tags:
- chess
- stockfish
- sft
- fine-tuning
- game-playing
pretty_name: Chess SFT Training Dataset
size_categories:
- 10K<n<100K
Chess SFT Training Dataset
A curated dataset of chess positions with deep Stockfish analysis, designed for supervised fine-tuning (SFT) of language models to play and understand chess.
Dataset Description
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.
Sources
Source
Description
Proportion
lichess-puzzles
Tactical puzzles from Lichess with clear best moves
30%
lichess-elite
Elite games (2400+ vs 2300+ rated) from nikonoel.fr
25%
lichess-tournament
Competitive tournament games
20%
lichess-standard
Standard rated games across all ELO ranges
25%
Key Features
Deep analysis : Stockfish depth 20, MultiPV 3
Rich annotations : 100+ fields including evaluation, move quality, tactics, and positional factors
Balanced phases : ~10% opening, ~65% middlegame, ~25% endgame (for game sources)
Quality filtered : Positions selected for interesting decisions
Diverse skill levels : From novice (<1600) to expert (2400+) play
Complete Schema
Identification & Source
Field
Type
Description
id
string
Unique identifier: {source}_{game_id}_{ply}
game_id
string
Original game or puzzle ID
source
string
Data source (lichess-puzzles, lichess-elite, lichess-tournament, lichess-standard)
source_type
string
"puzzle" or "game"
Position Representation
Field
Type
Description
fen
string
FEN notation of the position
board_utf8
string
Unicode board visualization
board_ascii
string
ASCII board visualization
side_to_move
string
"white" or "black"
ply
int
Half-move number in the game
fullmove_number
int
Full move number
game_phase
string
"opening", "middlegame", or "endgame"
Legal Moves
Field
Type
Description
legal_moves_uci
string
Space-separated legal moves in UCI notation
legal_moves_san
string
Space-separated legal moves in SAN notation
num_legal_moves
int
Count of legal moves
Current Position Evaluation
Field
Type
Description
current_cp
int
Centipawn evaluation (+ favors side to move)
current_mate
int/null
Mate distance if forced mate exists
current_eval_desc
string
Human-readable eval ("White is winning +3.5")
current_eval_category
string
"winning", "slightly_better", "equal", "slightly_worse", "losing"
Best Move Analysis
Field
Type
Description
best_move_uci
string
Best move in UCI notation
best_move_san
string
Best move in SAN notation
best_move_cp
int
Evaluation after best move
best_move_mate
int/null
Mate distance after best move
best_move_is_capture
bool
Move captures a piece
best_move_captured_piece
string/null
Name of captured piece
best_move_captured_value
int
Material value of capture
best_move_is_check
bool
Move gives check
best_move_is_checkmate
bool
Move is checkmate
best_move_is_castling
bool
Move is castling
best_move_is_promotion
bool
Move is pawn promotion
best_move_promotion_piece
string/null
Promotion piece type
best_move_piece_moved
string
Type of piece moved
best_move_from
string
Origin square (e.g., "e2")
best_move_to
string
Destination square (e.g., "e4")
Move Purpose Analysis (Why the move is good)
Field
Type
Description
best_move_category
string
Primary purpose: "tactic", "attack", "defense", "positional", "developing", "escape"
best_move_is_sacrifice
bool
Move sacrifices material
best_move_sacrifice_type
string/null
"queen_sac", "rook_sac", "piece_sac", "exchange_sac", "pawn_sac"
best_move_material_sacrificed
int
Material value sacrificed
Threats Created
Field
Type
Description
best_move_creates_threats
bool
Move creates new threats
best_move_num_new_attacks
int
Number of new piece attacks
best_move_total_threat_value
int
Total value of threatened pieces
best_move_attacks_queen
bool
Threatens enemy queen
best_move_attacks_rook
bool
Threatens enemy rook
best_move_attacks_minor
bool
Threatens knight or bishop
best_move_new_attacks_json
string/null
JSON array of attack details
best_move_creates_fork
bool
Creates a fork
best_move_creates_pin
bool
Creates a pin
best_move_pinned_piece
string/null
Pinned piece type
best_move_creates_skewer
bool
Creates a skewer
best_move_is_discovered_attack
bool
Is a discovered attack
Defensive Aspects
Field
Type
Description
position_had_hanging_piece
bool
Position had undefended piece
position_hanging_piece_value
int
Value of hanging piece
best_move_saves_hanging
bool
Move saves the hanging piece
best_move_saved_piece
string/null
Type of saved piece
best_move_saved_piece_value
int
Value of saved piece
Positional Improvements
Field
Type
Description
best_move_is_developing
bool
Develops a piece
best_move_improves_center
bool
Improves center control
best_move_center_control_change
int
Change in center control
best_move_increases_king_pressure
bool
Increases attack on enemy king
best_move_king_attack_change
int
Change in king zone attacks
best_move_creates_passed_pawn
bool
Creates a passed pawn
best_move_advances_passed_pawn
bool
Advances existing passed pawn
Mobility
Field
Type
Description
mobility_before
int
Our legal moves before
mobility_after_opponent
int
Opponent's moves after our move
our_mobility_after
int
Our moves after opponent replies
Evaluation After Best Move
Field
Type
Description
after_best_cp
int
Eval after best move (from opponent's view)
after_best_mate
int/null
Mate distance after best move
eval_change
int
Change in evaluation
Principal Variation
Field
Type
Description
pv_uci
string
Best line in UCI (up to 10 moves)
pv_san
string
Best line in SAN
pv_length
int
Length of principal variation
Alternative Moves (2nd and 3rd Best)
Field
Type
Description
second_move_uci
string/null
2nd best move UCI
second_move_san
string/null
2nd best move SAN
second_move_cp
int/null
2nd best move evaluation
second_move_cp_loss
int/null
Centipawn loss vs best
third_move_uci
string/null
3rd best move UCI
third_move_san
string/null
3rd best move SAN
third_move_cp
int/null
3rd best move evaluation
third_move_cp_loss
int/null
Centipawn loss vs best
All Candidates (JSON)
Field
Type
Description
candidates_json
string
Full JSON array of all analyzed moves with complete data
num_candidates
int
Number of candidates analyzed (typically 3)
Move Quality Distribution
Field
Type
Description
num_good_moves
int
Moves within 30cp of best
num_ok_moves
int
Moves 30-100cp worse
num_mistake_moves
int
Moves 100-200cp worse
num_blunder_moves
int
Moves 200+cp worse
Evaluation Gaps
Field
Type
Description
gap_1_2
int
Centipawn gap: best vs 2nd best
gap_1_3
int
Centipawn gap: best vs 3rd best
gap_1_worst
int
Centipawn gap: best vs worst candidate
Position Type Flags
Field
Type
Description
is_clear_best
bool
Best move is clearly superior (gap > 50cp)
is_only_move
bool
Only one reasonable move (gap > 150cp)
is_critical
bool
Large eval swing based on move choice
is_tactical
bool
Position involves tactics
is_forcing
bool
Few good options, forcing sequence
is_quiet
bool
Calm positional position
is_winning
bool
Side to move is winning
is_losing
bool
Side to move is losing
is_equal
bool
Position is roughly equal
is_sharp
bool
High tension, big eval swings possible
Quality Score
Field
Type
Description
interesting_score
int
Composite score for position quality (higher = more interesting)
filter_reason
string
Why position was kept: "puzzle", "critical", "very_interesting", "interesting", "standard", "boring"
Material Count
Field
Type
Description
material_white
int
White's material value
material_black
int
Black's material value
material_diff
int
Material difference (+ favors white)
material_total
int
Total material on board
white_pawns
int
White pawn count
white_knights
int
White knight count
white_bishops
int
White bishop count
white_rooks
int
White rook count
white_queens
int
White queen count
black_pawns
int
Black pawn count
black_knights
int
Black knight count
black_bishops
int
Black bishop count
black_rooks
int
Black rook count
black_queens
int
Black queen count
has_bishop_pair_white
bool
White has bishop pair
has_bishop_pair_black
bool
Black has bishop pair
is_queenless
bool
Neither side has a queen
King Safety
Field
Type
Description
white_king_castled_short
bool
White castled kingside
white_king_castled_long
bool
White castled queenside
white_king_in_center
bool
White king still in center
white_king_zone_attacks
int
Attacks on white king zone
black_king_castled_short
bool
Black castled kingside
black_king_castled_long
bool
Black castled queenside
black_king_in_center
bool
Black king still in center
black_king_zone_attacks
int
Attacks on black king zone
Checks and Threats
Field
Type
Description
is_check
bool
Side to move is in check
num_checkers
int
Number of checking pieces
num_checking_moves
int
Legal moves that give check
num_capture_moves
int
Legal capturing moves
max_capture_value
int
Highest value capture available
Pawn Structure
Field
Type
Description
white_doubled_pawns
int
White's doubled pawns
black_doubled_pawns
int
Black's doubled pawns
white_passed_pawns
int
White's passed pawns
black_passed_pawns
int
Black's passed pawns
Center Control
Field
Type
Description
white_center_control
int
White's attacks on d4,d5,e4,e5
black_center_control
int
Black's attacks on d4,d5,e4,e5
Board State Flags
Field
Type
Description
is_stalemate
bool
Position is stalemate
is_insufficient_material
bool
Draw by insufficient material
can_claim_draw
bool
Draw can be claimed
halfmove_clock
int
Moves since pawn move/capture
is_fifty_move_possible
bool
50-move rule applicable
board_tension
int
Sum of attacked piece values
Player Ratings
Field
Type
Description
white_elo
int
White player's rating
black_elo
int
Black player's rating
avg_elo
int
Average rating
elo_bucket
string
"novice" (<1600), "club" (1600-2000), "strong" (2000-2400), "expert" (2400+)
Game Metadata
Field
Type
Description
time_control
string
Time control of the game
result
string
Game result (1-0, 0-1, 1/2-1/2)
Analysis Metadata
Field
Type
Description
analysis_depth
int
Stockfish search depth used
analysis_multipv
int
Number of lines analyzed
Puzzle-Specific Fields (only for lichess-puzzles)
Field
Type
Description
puzzle_rating
int
Puzzle difficulty rating
puzzle_rating_deviation
int
Rating uncertainty
puzzle_themes
string
Space-separated puzzle themes
puzzle_solution_uci
string
Puzzle solution moves in UCI
puzzle_popularity
int
Puzzle popularity score
puzzle_nb_plays
int
Number of times puzzle was played
Subset Flags
Field
Type
Description
in_100
bool
Included in 100-sample subset
in_500
bool
Included in 500-sample subset
in_1000
bool
Included in 1000-sample subset
in_2000
bool
Included in 2000-sample subset
...
...
Additional subset flags as available
Position Quality Distribution
Positions are categorized by why they were kept:
puzzle : From the puzzles dataset (tactical training)
critical : Large evaluation swing based on move choice
very_interesting : High composite interest score (score >= 30)
interesting : Good interest score (score >= 15)
standard : Baseline interesting positions (score >= 0)
boring : Lower interest but included for diversity
Intended Uses
SFT for chess LLMs : Train language models to suggest good chess moves
Move quality prediction : Predict evaluation changes from moves
Position understanding : Train models to describe chess positions
Chess tutoring : Generate explanations for why moves are good/bad
Move purpose classification : Classify moves as tactical/positional/defensive
Example Usage
from datasets import load_dataset
dataset = load_dataset("agi-noobs/chess-sft-20k" )
pos = dataset["train" ][0 ]
print (f"FEN: {pos['fen' ]} " )
print (f"Best move: {pos['best_move_san' ]} " )
print (f"Evaluation: {pos['current_cp' ]} cp" )
print (f"Is tactical: {pos['is_tactical' ]} " )
print (f"Is sacrifice: {pos['best_move_is_sacrifice' ]} " )
print (f"Creates fork: {pos['best_move_creates_fork' ]} " )
print (f"Material diff: {pos['material_diff' ]} " )
print (f"Board tension: {pos['board_tension' ]} " )
print (f"2nd best: {pos['second_move_san' ]} ({pos['second_move_cp_loss' ]} cp worse)" )
Generation Details
Stockfish version : Latest (via Homebrew)
Analysis depth : 20 ply
MultiPV : 3 (top 3 moves analyzed)
Hash : 128 MB per instance
Workers : 8 parallel Stockfish instances
Limitations
Evaluations are Stockfish's assessment, not ground truth
Some positions may have multiple equally good moves not captured by MultiPV 3
Puzzle positions are pre-solution (the position before the winning tactic)
ELO ratings are from Lichess, which may differ from FIDE ratings
License
MIT License
Citation
@dataset{chess_sft_2024,
title={Chess SFT Training Dataset},
author={AGI Noobs},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/datasets/agi-noobs/chess-sft-20k}
}
Acknowledgments