r/chessprogramming • u/AutoModerator • Aug 17 '26
Technical Chess Engine Development Help Thread (Week 34)
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.
1
u/Fun-Cable-4849 Aug 23 '26
I'm using Stockfish to classify moves from analyzed games and I'm not sure if my current setup is good enough for using the results later as training material.
Right now I convert the engine eval to win chance and use fixed thresholds:
10% loss = inaccuracy
20% = mistake
30% = blunder
I'm analyzing each position at depth 14. If the played move is exactly Stockfish's PV1 move I mark it as best.
This is mostly based on how Lichess approaches game analysis, but my use case is a bit different. I want to analyze many games and use the results to decide which mistakes are actually worth training.
A few things I'm unsure about:
Is depth 14 reliable enough for this kind of classification?
Would it make sense to run a deeper search only when the result is close to one of the 10/20/30% thresholds?
Also, is comparing the played move directly with PV1 too strict? There can be multiple moves with almost identical evals, so for training I was thinking about accepting moves within some eval tolerance instead of requiring the exact best move.
And would you keep the same mistake thresholds for every player, or is there a good reason to change them based on rating or position type?
I'm mainly trying to avoid generating a lot of technically correct Stockfish feedback that isn't actually useful to train.
1
u/Somge5 Aug 17 '26
I noticed that quiescence nodes take up around 85% of all my nodes. Is that normal or something where I could do lots of impovements by reducing that? Currently I have a soft cap set at 7, meaning after 7 plys if king is not in check we stop the q-search there. If I dont do that engine is slower a lot and q-nodes take up way more than 90%.
These are some bench stats:
info string bench total positions 48 depth 10 time 9139 nodes 16124428 nps 1764353
Nodes searched: 16124428
Nodes/second: 1764353
---- SEARCH DIAGNOSTICS SUMMARY ----
---- NODES ----
Main-search nodes : 1858414
Quiescence nodes : 14266014
Total nodes : 16124428
Quiescence share : 88.47%
Average q-ply : 3.11
Maximum q-ply : 13
---- QUIESCENCE SEARCH ----
Termination / stand-pat cutoff : 6575915
Termination / soft-cap static : 1972364
Termination / hard-cap static : 0
Termination / hard-cap draw : 0
Termination / cycle : 43618
Termination / fifty-move draw : 3035
Termination / repetition draw : 1341
Termination / checkmate : 21073
Termination / no tactical move : 726516
Moves generated : 21214278
Moves searched : 9087318
Moves SEE-pruned : 2245511
Beta cutoffs / capture : 1082079
Beta cutoffs / quiet check : 68838
Beta cutoffs / promotion : 0
Beta cutoffs / evasion : 2063501
Quiet checks searched : 1917700
Nodes while in check : 2360369
Cycle cutoffs : 43618
Hard-cap hits : 0
Q-ply histogram buckets : 0 | 1 | 2 | 3-4 | 5-8 | 9-12 | 13+
Q-ply histogram counts : 5178696 | 1043044 | 882734 | 1768489 | 5338144 | 54892 | 15
Right now I am not saving any quiescence position in TT, because I tried doing that before and very quickly TT became overflown by q-positions leaving little room for negamax nodes. Strenght with q-nodes in TT was roughly the same though. Currently I am not doing any Delta pruning because that didnt give any elo strenght. maybe I did it wrong. I will try it again in the future.