Only captures for quiescent search?

Discussion of chess software programming and technical issues.

Moderator: Ras

lojic
Posts: 71
Joined: Thu Jan 28, 2021 9:50 pm
Full name: Brian Adkins

Only captures for quiescent search?

Post by lojic »

I have two move lists, quiet-moves & tactical-moves, but currently, tactical-moves is only captures. When I generate moves, I pass a flag indicating whether or not to generate quiet-moves, so my quiescent search is only generating/searching capture moves.

Is it best to only search captures in QS, or should any other types of moves, such as checks or promotions, be searched also?

I don't currently categorize a move as a check, but I'm going to add that, and that seems like a tactical-move as opposed to a quiet-move (I search tactical before quiet), but if the QS should only search captures, then I'll need to handle that properly.
User avatar
Ras
Posts: 2706
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Only captures for quiescent search?

Post by Ras »

lojic wrote: Sun Feb 07, 2021 5:42 pmIs it best to only search captures in QS, or should any other types of moves, such as checks or promotions, be searched also?
Promotions are tactical moves and thus should be searched. In QS however, you can limit them to queen promotions only. With check extension in main search, you won't enter QS when in check. You may also generate quiet check evasions if a tactical QS move delivers check at deeper QS levels, reasoning that you can't stand pat when you are in check. What may also be helpful is a recapture limit in QS: after 5 QS levels, I limit captures to those that go to the target square of the previous move. That prevents pointless mutual queen plunder raids.
Rasmus Althoff
https://www.ct800.net
User avatar
hgm
Posts: 28401
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Only captures for quiescent search?

Post by hgm »

You have to be careful with non-captures in QS, because unlike captures there is no guarantee you will ever run out of them. E.g. in KQK you can pretty much check 'forever' before you have to repeat, and if the engine wants to figure out in how many ways it can do that...

People that search checks in QS usually limit that to the first 2 ply of QS.