4

I'm implementing quiescent search in my chess engine, although just capturing moves have been generated. In the below position, at 1 ply, the white queen captures the pawn, but the quiescent search can't see that after 1... Bg3+ 2. Kf1 Rxd5, and the white queen is captured. This is a case of a discovered attack. How can quiescent search handle that, or is it just for capturing moves?

[FEN "2b1k3/3r4/3b4/3p4/8/8/3Q4/R3K3 w - - 0 1"]
1
  • 1
    You have to stop searching somewhere! You can't hope to cover all the tactical possibilities in a quiescence search.
    – TonyK
    May 18, 2020 at 13:16

2 Answers 2

2

Quiesence search isn't able to handle situations like that - including checks would explode the search tree. Two iterations later (assuming you're doing iterative deepening), Qxd5 and Bg3+ will take place in the main search, and then quiesence search would be able to find the continuation you described.

Some engines include quiet checks in the first ply of quiesence search - in that case you situation would be resolved in one additional iteration instead of two

1

I suppose one possible solution would be checking if any double attacks can be played. This would include checking for forks and discovered attacks/checks. If this is too broad a condition for quiescence search, you could narrow it down by checking if one of your pieces involved in the double attack is worth a sufficient amount (say, at least a knight or rook).

In this case, ...Bg3+ would do a double attack on your king and queen, which would clearly indicate that a quiescent state hasn't been reached.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.