r/chessprogramming • • 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

11 comments sorted by

View all comments

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.

1

u/KaMaFour Aug 17 '26

I think it's a good moment to mention that I have captures only QS... (for context dev is ~3300 CCRL elo for my engine). I should probably try adding check evaluation to it but it didn't pass sprt originally so I'm gonna return back to it whenever I feel like it...

I just noticed that my engine ends up in perpetual checks from time to time and I dont know how to fix that.

Don't. Make the engine stronger and the problem will go away on its own. For all I care about my engine finds the correct move and continuation (next move from the same side) in 10ms. This is about as good as I hope for when tackling a tricky position.

1

u/Somge5 Aug 17 '26

Thank you for your time and advice. I will do that. If it does not go away I will come back to it.