Welcome to the comprehensive documentation for Torch o'Chess, a PyTorch-based chess engine for neural network experimentation.
- Quick Start Guide - Get up and running in 5 minutes
- Installation - Detailed installation instructions
- Tutorial - Step-by-step walkthrough
- System Architecture - High-level system design
- The Critical Fix - Understanding the score encoding fix
- Models Overview - Comparison of all three architectures
- ChessResNet - AlphaZero-inspired residual network
- ChessTransformer - Self-attention architecture
- ChessHybrid - CNN + Attention hybrid
- Data Module - FEN parsing, move/score encoding, datasets
- Data Generation - Stockfish wrapper, position generation
- Models - Neural network classes and configurations
- Training - Trainer, callbacks, metrics
- Evaluation - Stockfish evaluation
- Play - Engine and CLI interface
- Data Generation Guide - Creating training datasets
- Training Guide - Training models effectively
- Evaluation Guide - Testing against Stockfish
- Playing Guide - Human vs model games
- Configuration Reference - All configuration options
- CLI Reference - Command-line interface
- Troubleshooting - Common issues and solutions
- Contributing - How to contribute
python scripts/generate_data.py --num-positions 10000python scripts/train.py --data datasets/train_data.parquet --model resnetpython scripts/play.py --model checkpoints/best_model.ptTorch o'Chess is a complete chess neural network system featuring:
| Feature | Description |
|---|---|
| Data Generation | Stockfish-powered position labeling with good/bad moves |
| Three Architectures | ResNet, Transformer, and Hybrid models |
| Proper Scoring | Side-to-move perspective (the critical fix) |
| Multi-task Learning | Predicts moves, scores, captures, and outcomes |
| Human Play | Terminal interface for playing against the model |
| Stockfish Evaluation | Automated testing at various skill levels |
Current version: 0.1.0
MIT License - See LICENSE file for details.