feat: add project structure and basic NNUE model

- Create python directory with data/, model/ subdirectories
- Implement LinearEval(61072->1) model
- Add config, constants, feature_extractor
- Add tests with 4 passing test cases
This commit is contained in:
KeshavAnandCode
2026-04-14 18:03:42 -05:00
parent 299d0d7fd7
commit 9e2fe0cae6
15 changed files with 378 additions and 0 deletions

19
python/README.md Normal file
View File

@@ -0,0 +1,19 @@
# Chess NNUE Distillation
Train a single linear layer on Stockfish's NNUE features.
## Quick Start
```bash
cd python
source .venv/bin/activate
pip install torch --index-url https://download.pytorch.org/whl/cu121
pip install numpy python-chess tqdm matplotlib h5py joblib pytest
python train_full.py
```
## Architecture
- Input: 61,072 features (352 HalfKAv2_hm + 60,720 FullThreats)
- Output: 1 scalar (centipawns)
- Optimizer: Adam (lr=1e-3, wd=1e-4)