File size: 3,722 Bytes
bd3ca24 1cf9d3d bd3ca24 1cf9d3d 33324e3 1cf9d3d 33324e3 1cf9d3d 33324e3 1cf9d3d 33324e3 1cf9d3d 33324e3 1cf9d3d 33324e3 1cf9d3d 33324e3 1cf9d3d 33324e3 1cf9d3d 33324e3 1cf9d3d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | ---
license: mit
library_name: pytorch
tags:
- chess
- chess-engine
- stockfish
- imitation-learning
- policy-distillation
- value-network
- uci
- lichess-bot
---
# ChessResNet-30M
**ChessResNet-30M** is a lightweight neural chess engine distilled from Stockfish-labeled positions.
It is designed to be simple to run, easy to plug into `lichess-bot`, and useful as a compact baseline for **search-free neural chess play**.
```text
Model: 30M-parameter policy/value CNN
Training: Stockfish imitation learning
Dataset: 10M positions
Labels: depth-10 Stockfish, MultiPV=5
Inference: no search, no opening book, no tablebase
Interface: UCI-compatible
```
---
## Links
- **Model:** https://huggingface.co/Joeyfully/chess-stockfish-il-10m-d10-mpv5
- **Dataset:** https://huggingface.co/datasets/Joeyfully/chess-stockfish-il-10m-d10-mpv5
- **Lichess bot:** https://lichess.org/@/Joey_ChessEngine
---
## Model Tags
```text
neural chess engine
Stockfish distillation
imitation learning
policy/value network
search-free chess engine
UCI engine
lichess-bot compatible
PyTorch
```
---
## Performance
ChessResNet is evaluated as a **pure neural engine**:
```text
No alpha-beta search
No MCTS
No opening book
No endgame tablebase
One neural forward pass per move
```
### Offline test set
| Metric | Value |
|---|---:|
| Test positions | 500,000 |
| Stockfish top-1 accuracy | 47.12% |
| Stockfish top-3 accuracy | 77.59% |
| Stockfish top-5 accuracy | 87.78% |
| Value correlation | 0.9401 |
| Test loss | 2.0580 |
### Engine match diagnostics
These are preliminary diagnostics, not official Elo ratings.
| Opponent | Time Control | Games | Score |
|---|---:|---:|---:|
| Stockfish UCI_Elo=1500 | 60+0.6 | 20 | 60.0% |
| Stockfish UCI_Elo=1500 | 10+0.1 | 100 | 70.0% |
| Stockfish UCI_Elo=1800 | 10+0.1 | 100 | 34.0% |
Observed behavior:
```text
Stronger at short time controls
Strong in direct attacks and mating patterns
Weaker in long forcing lines and endgame conversion
```
---
## Quick Start
Install dependencies:
```bash
pip install torch numpy python-chess
```
Run the UCI engine:
```bash
python uci_engine.py --ckpt best_engine.pt --device cpu
```
Manual UCI test:
```text
uci
isready
position startpos
go movetime 1000
quit
```
---
## Use with lichess-bot
ChessResNet can be used directly as a custom UCI engine in `lichess-bot`.
Example layout:
```text
lichess-bot/
engines/
ChessResNet/
joey_engine.sh
uci_engine.py
model.py
common_chess.py
best_engine.pt
```
Example `joey_engine.sh`:
```bash
#!/usr/bin/env bash
cd "$(dirname "$0")"
export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1
export OPENBLAS_NUM_THREADS=1
export NUMEXPR_NUM_THREADS=1
export NUMEXPR_MAX_THREADS=1
exec /path/to/python -u uci_engine.py --ckpt best_engine.pt --device cpu
```
Example `config.yml` engine block:
```yaml
engine:
dir: "./engines/ChessResNet"
name: "joey_engine.sh"
debug: false
working_dir: "./engines/ChessResNet"
protocol: "uci"
ponder: false
uci_options: {}
silence_stderr: false
```
For pure ChessResNet evaluation, disable external move sources:
```yaml
online_moves:
chessdb_book:
enabled: false
lichess_cloud_analysis:
enabled: false
lichess_opening_explorer:
enabled: false
online_egtb:
enabled: false
lichess_bot_tbs:
syzygy:
enabled: false
gaviota:
enabled: false
```
---
## Citation
```bibtex
@misc{ChessResNet30m2026,
title = {ChessResNet-30M: Stockfish Policy/Value Distillation for Search-Free Neural Chess Play},
author = {Joey},
year = {2026},
howpublished = {https://huggingface.co/Joeyfully/chess-stockfish-il-10m-d10-mpv5}
}
```
|