## Cutoffs in Quiescence Search

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
jfern2011
Posts: 12
Joined: Mon Aug 07, 2017 3:24 pm
Location: Los Angeles

### Cutoffs in Quiescence Search

Upon entry into quiescence search, I've seen people compute a "stand-pat" score for the position, and if this value is greater than beta, perform a cutoff (returning beta). How on earth is this correct? You can't rely on the stand-pat score if, say, the position favors white by a queen, but his queen is about to be captured.

Thanks,
Jason

elcabesa
Posts: 855
Joined: Sun May 23, 2010 11:32 am
Contact:

### Re: Cutoffs in Quiescence Search

at some point you have to stop in the search and you forgot that when you evaluate standpat is your turn to play.

so you are betting that if your static eval is better than beta and it's your turn, you'll be able find some move that will improve the situation.

https://chessprogramming.wikispaces.com ... nce+Search

hgm
Posts: 26577
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

### Re: Cutoffs in Quiescence Search

jfern2011 wrote:You can't rely on the stand-pat score if, say, the position favors white by a queen, but his queen is about to be captured.
The point is that none of your pieces can be captured, because it is not the opponent's turn. You are the one that can do the capturing. But why would you, if what you have now is already good enough to get a cutoff?

Sven
Posts: 4023
Joined: Thu May 15, 2008 7:57 pm
Location: Berlin, Germany
Full name: Sven Schüle
Contact:

### Re: Cutoffs in Quiescence Search

jfern2011 wrote:Upon entry into quiescence search, I've seen people compute a "stand-pat" score for the position, and if this value is greater than beta, perform a cutoff (returning beta). How on earth is this correct? You can't rely on the stand-pat score if, say, the position favors white by a queen, but his queen is about to be captured.
Qsearch is never perfect. It is meant to find out with very limited effort whether the side to move at the full-width search horizon can win material or improve the position otherwise. Hanging pieces, e.g. by a fork, are not always detected so they should perhaps be addressed by the eval.

In this example:
[d]1k6/1r1p4/1rp5/1n4p1/R1RNP1P1/2P2PKP/1P6/8 w - - 0 1[/d]

during qs you could calculate Nxb5? cxb5 (quiet) and now think white is ahead by three pawns, while in fact it loses a rook. This can't be found by qs.

hgm
Posts: 26577
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

### Re: Cutoffs in Quiescence Search

Problems that cannot be solved by having the move are quite rare in the tree. So spending time to detect them and then spending more time to find a solution for them is almost always wasted time: you do a lot of stuff, and in the end it changed nothing. If you do that in every QS node, it might cost you a ply of full-width thinking, and in that extra ply you might have recognized the unsolvable problems anyway.

Another issue is that the leaves of a typical search tree are mostly very unnatural positions, where both sides have multiple hanging pieces. Normally multiple hanging pieces means you will lose something, as you can only save one. But if the opponent has them too, you just try to capture material faster than you lose it. Trying to find solutions based on common Chess wisdom for threats against you are counter-productive in these positions.

jfern2011
Posts: 12
Joined: Mon Aug 07, 2017 3:24 pm
Location: Los Angeles

### Re: Cutoffs in Quiescence Search

I wasn't thinking about whose turn it is to play at the time the static eval is performed. Now that you mention it it seems really obvious. Thanks!

Teemu Pudas
Posts: 88
Joined: Wed Mar 25, 2009 11:49 am

### Re: Cutoffs in Quiescence Search

jfern2011 wrote:Upon entry into quiescence search, I've seen people compute a "stand-pat" score for the position, and if this value is greater than beta, perform a cutoff (returning beta).
Greater than or equal to beta.

Evert
Posts: 2929
Joined: Fri Jan 21, 2011 11:42 pm
Location: NL
Contact:

### Re: Cutoffs in Quiescence Search

Teemu Pudas wrote:
jfern2011 wrote:Upon entry into quiescence search, I've seen people compute a "stand-pat" score for the position, and if this value is greater than beta, perform a cutoff (returning beta).
Greater than or equal to beta.
More generally, you can raise alpha by the stand-pat score and then take a normal beta cutoff.
Of course most nodes in a PVS search are searched with a null-window, so this works out to the same thing.