r/chessprogramming • • 6d ago

Technical Chess Engine Development Help Thread (Week 48)

Welcome to the weekly /r/chessprogramming Engine Dev Help Thread.

Ask beginner and intermediate chess engine development questions here: move generation, search, evaluation, UCI, perft, debugging, testing, NNUE, or anything else related to building engines.

Good questions include code, FENs, logs, benchmarks, or a clear explanation of what you tried.

Project links are fine when you want technical feedback, not promotion.

Be helpful. Don’t dunk on beginners.

2 Upvotes

4 comments sorted by

1

u/Icy-Role2137 2d ago edited 2d ago

Hi, I'm pretty new to engine dev. Honest upfront: built my engine with a lot of AI help, so I get the ideas more than the details. It runs in the browser and on phones. Hand-written eval tuned with Texel, top level around 2400 vs limited Stockfish. A small net on 37M self-play positions wasn't better then my eval. u/ElRaydeator gave me good tips last week (soft node limit, quiet positions, quality over quantity), so I'm now running a longer self-play run with that.

Questions:

  1. How many positions did your first working net need?
  2. Small or bigger net to start?
  3. Texel still worth it, or straight to a net?
  4. My engine also plays a variant with extra pieces, so no Stockfish to test against. How would you measure strength there?

Thanks!

1

u/ElRaydeator 2d ago

I'll try and answer, with what worked for me: 

  1. Positions needed: Around 20M-22M positions was my sweet spot. Focus on more distinct games (since positions in one game share a single WDL outcome), resolve tactical positions to their qsearch leaf instead of dropping them, start games with 8–10 random plies, and blend 70% search score / 30% game result (lambda = 0.7).
  2. Small or bigger net to start? Start small. In my tests, 256 hidden units beat 512 by +22 to +30 Elo, and 128 played level with 256. Smaller nets train faster, overfit less, and keep JS/browser NPS high.
  3. Texel or straight to a net? You can go straights to a net as long as Gen 2+ is labeled with the previous net's search (not your HCE) so you escape its ceiling. Since you already have a ~2400 Texel HCE for your variant, using it as your Gen-1 teacher and fixed benchmark is a big advantage.
  4. Measuring strength without Stockfish: Run fixed-length paired self-play gauntlets (new_version vs previous_best, playing both colors from each opening to halve variance, e.g., 400 games at fast TC, then confirm at longer TC). Watch out for RNG seed variance (identical training runs with different seeds can span 50–70 Elo), and trust game Elo over offline MSE or 1-ply screens.

1

u/Icy-Role2137 2d ago

Thanks a lot, that's super helpful! Small correction: the ~2400 is for normal chess, in the variant I have no reference yet, so your point 4 is exactly what I needed. I'll try 128/256 hidden and the 70/30 blend. Did you also use random opening plies when you checked strength, or a fixed opening book?

1

u/ElRaydeator 2d ago

For self play gate matches I use a 4-ply book, where each side plays both black and white.

I use fastchess (and fastchess-gui) fire the matches, at the time controls TC=10+0.1 (screening) and TC=180+0.1 (promotion gates).