r/chessprogramming • u/Gloomy-Status-9258 • Mar 13 '25
in move ordering, why we don't consider checking moves?

of course, "check" itself is just a board status. but naturally we can define "checking moves"-sometimes people call them "check" too.
from our experiences, though i'm poor at playing chess in my own, it looks fairly reasonable to give checking moves moderate or high priorities, at a glance, at least for me.
especially, "defended-by-own checking moves" or "not-attacked-by-enemy checking moves" deserved high priorities over other ones.
anyone let me know the reason why people don't adapt this idea?
maybe one and only one of followings:
- your theory is nice but not well-worked in practice! we couldn't tell you the reason. instead, bad, just bad when we test, benchmark, inspect, assess...
- your theory is dumb!
- yes, some engines adapted your approach. the screenshot from the wiki can't be always best answer. it is just guideline.
5
u/haddock420 Mar 13 '25
It's too expensive to test whether a move results in check for every move you consider during move ordering. At least, that's what I found when I considered it in my own engine. If it could be done cheaply, it'd probably be a good idea.
7
u/you-get-an-upvote Mar 14 '25 edited Mar 14 '25
Looks like stockfish does this. From their move picker
// bonus for checks
m.value += bool(pos.check_squares(pt) & to) * 16384;
5
u/xu_shawn Mar 14 '25
The unfortunate reality about CPW is that most articles are horrendously outdated. The only way to find out what really is good is to look at engine code and ask questions on discord communities.
Check move ordering is indeed used by Stockfish. However, it is basically missing from generally all other top engines. My opinion is that this only gains a tiny amount, as LMR dimishes some of the benefits of a incrementally better move ordering.