How magomeddr/chessmovepred works
This is a command-line chess AI for training a move-prediction model, fine-tuning it on a player’s games, and playing against it. The main workflow takes a human UCI move, updates the chess position, asks the prediction interface for a legal AI move, and displays the result. Training and personalization share CSV-based position preparation, action encoding, and the neural model. The README is empty; unsampled capabilities are not inferred, and edges below are supported by the shown source.
Main entry points: personalize.py Player fine-tuning · train.py Model training · interface.py Prediction interface · main.py CLI and game
Components 10
User workflow
- CLI and game
main.py
Model learning
- Model training
src/train.py - Player fine-tuning
src/personalize.py - Chess data loader
src/data.py - Board and action encoding
src/utils.py - Policy network
src/model.py
Move prediction
- Prediction interface
src/interface.py
Other components
- Player
- Training games
data/fens_training_set.csv - Model weights
Connections 21
- Player → CLI and game: chooses action
main.py - CLI and game → Model training: starts training
main.py - CLI and game → Player fine-tuning: starts fine-tuning
main.py - CLI and game → Prediction interface: loads model
main.py - CLI and game → Prediction interface: requests move
main.py - Chess data loader → Training games: reads positions
src/data.py - Chess data loader → Board and action encoding: encodes positions
src/data.py - Model training → Chess data loader: loads batches
src/train.py - Model training → Policy network: trains
src/train.py - Model training → Board and action encoding: uses action size
src/train.py - Model training → Model weights: saves weights
src/train.py - Player fine-tuning → Model weights: loads base weights
src/personalize.py - Player fine-tuning → Chess data loader: loads batches
src/personalize.py - Player fine-tuning → Policy network: fine-tunes
src/personalize.py - Player fine-tuning → Model training: uses logit mask
src/personalize.py - Player fine-tuning → Board and action encoding: uses action size
src/personalize.py - Player fine-tuning → Model weights: saves weights
src/personalize.py - Prediction interface → Policy network: runs inference
src/interface.py - Prediction interface → Board and action encoding: encodes position
src/interface.py - Prediction interface → Model training: uses logit mask
src/interface.py - Prediction interface → Model weights: loads weights
src/interface.py