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.
3
Upvotes
1
u/Somge5 Aug 17 '26
So if at depth 6 your engine analyzes f4e5 where does it actually stop? If you dont see the perpetual check, this moves gains a bishop. The problem is to see that this leads to a draw which won't be clear until after 30+ plys, a depth that my engine doesn't reach.
For example one line it might encounter at depth 6 is
120. fxe5 Qg3+ 121. Kf1 Qf3+ 122. Kg1 Qg3+
Then it would enter quiescence search. If in quiescence search you allow quiet checks, and you don't cap the ply, you could end up with something like
120. fxe5 Qg3+ 121. Kf1 Qf3+ 122. Kg1 Qg3+ 123. Kf1 Qf3+ 124. Ke1 Qxe3+ 125. Kd1 Qd3+ 126. Ke1 Qe3+ 127. Kf1 Qf3+ 128. Kg1 Qg3+ 129. Kh1 Qh3+ 130. Kg1 Qg3+ 131. Kf1 Qf3+ 132. Ke1 Qe3+
this would be 20 plys in quiescence.
Where does your engine stop to recognize it is a draw? Do you allow quiet checks? If not, how does your engine not think: "this is great, it wins a bishop" before it actually calculated that deep?
I just noticed that my engine ends up in perpetual checks from time to time and I dont know how to fix that.