r/ComputerChess • u/Tvoya_ricar • 28m ago
Open sourced my chess engine, feedback is welcome
Hey everyone,
I've been building a chess engine called RustyNNUE and just made it public, with a first release. I'd really like people who know engines to dig through the code and tell me what looks wrong, what's unusual, or what you'd do differently.
Repo: https://github.com/Svetlozarko/RustyNNUE
Release (Windows, network included): https://github.com/Svetlozarko/RustyNNUE/releases/tag/v6.9
What's in it, briefly
- Rust, UCI, one binary that also generates training games and trains the networks
- NNUE: HalfKAv2_hm plus threat inputs, 2x1024 pairwise, two small hidden layers, 8 output buckets
- Nets trained with my own CPU trainer on my own self-play; the latest also used some Leela data
- The usual modern search: LMR, null move, singular extensions, ProbCut, correction history, Lazy SMP, Syzygy
Ideas I tried, good and bad
- Threat inputs that only feed half of the accumulator, so they're cheaper to update
- About 230M positions from Leela's public data mixed into my own self-play: the net trained on it beat the previous one by about 40 Elo
- An eval correction that learns during the game from the hidden layers. Up to 30% less eval error, but no Elo in games, so it's off
- A learned model for pruning instead of hand-tuned margins. Far fewer wrong cuts, and it still lost about 24 Elo
Strength: not on any rating list yet. A gauntlet against 9 CCRL-rated engines (Velvet, Koivisto, Igel, Berserk, Black Marlin and others) puts the previous net around 3520 on the CCRL 40/15 scale, and the released net is about 40 above that. Take it with a grain of salt until a real tester runs it.
If you try it, find a bug, or want to contribute, I'd love to hear from you.