Most chess programs, at the end of the main search perform a more limited quiescence search, containing fewer moves. The purpose of this search is to only evaluate "quiet" positions, or positions where there are no winning tactical moves to be made. This search is needed to avoid the horizon effect. Simply stopping your search when you reach the desired depth and then evaluate, is very dangerous. Consider the situation where the last move you consider is QxP. If you stop there and evaluate, you might think that you have won a pawn. But what if you were to search one move deeper and find that the next move is PxQ? You didn't win a pawn, you actually lost a queen. Hence the need to make sure that you are evaluating only quiescent (quiet) positions.
Despite the fact that quiescence searches are typically very short, about 50%-90% nodes are spent there, so it is worthwhile to apply some pruning there. Apart from not trying moves with the static exchange evaluation < 0, delta pruning can be used for that purpose.
Standing Pat
In order to allow the quiescence search to stabilize, we need to be able to stop searching without necessarily searching all available captures. In addition, we need a score to return in case there are no captures available to be played. This is done by a using the static evaluation as a "stand-pat" score (the term is taken from the game of poker, where it denotes playing one's hand without drawing more cards). At the beginning of quiescence, the position's evaluation is used to establish a lower bound on the score. This is theoretically sound because we can usually assume that there is at least one move that can either match or beat the lower bound. This is based on the Null Move Observation - it assumes that we are not in Zugzwang. If the lower bound from the stand pat score is already greater than or equal to beta, we can return the stand pat score (fail-soft) or beta (fail-hard) as a lower bound. Otherwise, the search continues, keeping the evaluated "stand-pat" score as an lower bound if it exceeds alpha, to see if any tactical moves can increase alpha.
Checks
Some programs search treat checks and check evasions specially in quiescence. The idea behind this is that if the side to move is in check, the position is not quiet, and there is a threat that needs to be resolved. In this case, all evasions to the check are searched. Stand pat is not allowed if we are in check, for two reasons. First, because we are not sure that there is a move that can match alpha--in many positions a check can mean a serious threat that cannot be resolved. Second, because we are searching every move in the position, rather than only captures.
Standing pat assumes that even if we finish searching all moves, and none of them increase alpha, one of the non-tactical moves can most likely raise alpha. This is not valid if we search every move. The other case of treating checks specially is the checking moves themselves. Some programs, after searching all the captures in a position without finding a move to raise alpha, will generate non-capture moves that give check. This has to be limited somehow, however, because in most given positions there will be very many long and pointless checking sequences that do not amount to anything. Most programs achieve this limit by delta pruning checks, as well as limiting the generation of checks to the first X plies of quiescence.
Larry Harris (1975) The Heuristic Search And The Game Of Chess - A Study Of Quiescence, Sacrifices, And Plan Oriented Play. IJCAI 1975 Tbilisi, Georgia: 334-339. reprinted (1988) in Computer Chess Compendium
1980 ...
Hermann Kaindl (1982). Dynamic Control of the Quiescence Search in Computer Chess. Cybernetics and Systems Research (ed. R. Trappl), pp. 973-977. North-Holland, Amsterdam.
Hermann Kaindl (1982). Quiescence Search in Computer Chess. SIGART Newsletter, 80, pp. 124-131. Reprinted (1983) in Computer-Game-Playing: Theory and Practice, pp. 39-52. Ellis Horwood Ltd., Chichester.
Don Beal (1989). Experiments with the Null Move.Advances in Computer Chess 5, a revised version is published (1990) under the title A Generalized Quiescence Search Algorithm. Artificial Intelligence, Vol. 43, No. 1, pp. 85-98. ISSN 0004-3702, edited version in (1999). The Nature of MINIMAX Search. Ph.D. thesis, IKAT, ISBN 90-62-16-6348. Chapter 10, pp. 101-116 » Null Move
Table of Contents
Limiting Quiescence
Despite the fact that quiescence searches are typically very short, about 50%-90% nodes are spent there, so it is worthwhile to apply some pruning there. Apart from not trying moves with the static exchange evaluation < 0, delta pruning can be used for that purpose.Standing Pat
In order to allow the quiescence search to stabilize, we need to be able to stop searching without necessarily searching all available captures. In addition, we need a score to return in case there are no captures available to be played. This is done by a using the static evaluation as a "stand-pat" score (the term is taken from the game of poker, where it denotes playing one's hand without drawing more cards). At the beginning of quiescence, the position's evaluation is used to establish a lower bound on the score. This is theoretically sound because we can usually assume that there is at least one move that can either match or beat the lower bound. This is based on the Null Move Observation - it assumes that we are not in Zugzwang. If the lower bound from the stand pat score is already greater than or equal to beta, we can return the stand pat score (fail-soft) or beta (fail-hard) as a lower bound. Otherwise, the search continues, keeping the evaluated "stand-pat" score as an lower bound if it exceeds alpha, to see if any tactical moves can increase alpha.Checks
Some programs search treat checks and check evasions specially in quiescence. The idea behind this is that if the side to move is in check, the position is not quiet, and there is a threat that needs to be resolved. In this case, all evasions to the check are searched. Stand pat is not allowed if we are in check, for two reasons. First, because we are not sure that there is a move that can match alpha--in many positions a check can mean a serious threat that cannot be resolved. Second, because we are searching every move in the position, rather than only captures.Standing pat assumes that even if we finish searching all moves, and none of them increase alpha, one of the non-tactical moves can most likely raise alpha. This is not valid if we search every move. The other case of treating checks specially is the checking moves themselves. Some programs, after searching all the captures in a position without finding a move to raise alpha, will generate non-capture moves that give check. This has to be limited somehow, however, because in most given positions there will be very many long and pointless checking sequences that do not amount to anything. Most programs achieve this limit by delta pruning checks, as well as limiting the generation of checks to the first X plies of quiescence.
Pseudo Code
See also
Publications
1975
1980 ...
1990 ...
2000 ...
Forum Posts
1994 ...
Re: Computer Chess: swap down evaluators vs capture search by Deniz Yuret, rgc, October 26, 1994
Re: Quiescence search problems by David Blackman, rgcc, August 3, 1995 » Integrated Bounds and Values
2000 ...
- What is the q-search? by Leonid, CCC, January 07, 2000
- Qsearch problems...(about sorting and SEE) by Severi Salminen, CCC, November 26, 2000 » Static Exchange Evaluation
2001- Bonus points for side to move in qsearch? by Leen Ammeraal, CCC, January 06, 2001 » Tempo
- About limiting Qsearch, again... by Severi Salminen, CCC, December 29, 2001
- About qsearch... by Severi Salminen, CCC, December 27, 2001
- Qsearch survey by Severi Salminen, CCC, December 30, 2001
2002- Checks in the Qsearch by Scott Gasch, CCC, June 28, 2002 » Check
- A question about quiescence search by Nagendra Singh Tomar, CCC, October 19, 2002
- Quiescence Explosion by David Rasmussen, CCC, November 26, 2002
- Quiescent Explosion by macaroni, CCC, June 26, 2003
- Regarding Qsearch with Fractional ply extensions by Federico Corigliano, CCC, August 11, 2003 » Depth - Fractional Plies
- real job of the qSearch? find quiet vs stop horizon effect by Scott Farrell, CCC, August 28, 2003
- quiescence by Noah Roberts, rgcc, September 20, 2003
20042005 ...
2010 ...
- Avoiding qsearch explosion by Marco Costalba, CCC, January 29, 2010
- Problems when implementing checks in qsearch by Luca Hemmerich, CCC, February 03, 2010
- Standpat and check by Vlad Stamate, CCC, February 06, 2010 » Standing Pat, Check
- This is totally weird ... Don't understand at all by Gregory Strong, CCC, November 13, 2010
2012- checks in quies by Larry Kaufman, CCC, March 22, 2012
- stand pat or side to move bonus by Larry Kaufman, CCC, March 22, 2012
- Some thoughts on QS by Harm Geert Muller, CCC, July 19, 2012
- QSearch, checks and the lack of progress... by Mincho Georgiev, CCC, July 27, 2012
- Quiescence - Check Evaluation and Depth Control by Cheney Nattress, CCC, November 10, 2012
2013- Quiescent search, and side to move is in check by Louis Zulli, CCC, February 08, 2013
- Transposition table usage in quiescent search? by Jerry Donald, CCC, March 01, 2013 » Transposition Table
- Pruning in QS by Harm Geert Muller, CCC, March 06, 2013 » Pruning
- QS investigation by Ed Schröder, CCC, March 07, 2013
- qsearch question by nak3c, OpenChess Forum, August 19, 2013
- about qs by Daniel Anulliero, CCC, September 11, 2013
20142015 ...
- Detail evaluation within quiescence search by Reinhard Scharnagl, CCC, February 22, 2015
- hanging piece at starting quiescence search - how to handle? by Reinhard Scharnagl, CCC, February 22, 2015 » Hanging Piece
- Search algorithm in it's simplest forum by Mahmoud Uthman, CCC, February 25, 2015 » Alpha-Beta
- Check-extension in QS by Harm Geert Muller, CCC, April 03, 2015 » Check
- quiescence search (best practices) by thevinenator, OpenChess Forum, July 02, 2015
- Null Move in Quiescent search by Laurie Tunnicliffe, CCC, December 09, 2015 » Null Move Pruning, Search Pathology
2016- Checks in qsearch - must-have or optional? by Martin Fierz, CCC, March 15, 2016 » Check, Checks in Quiescence Search
- Hashing in Qsearch? by Martin Fierz, CCC, April 03, 2016 » Transposition Table
- Quiescence node explosion by sandermvdb, OpenChess Forum, June 01, 2016 » Search Explosion
- Starting with quiescence search by Luis Babboni, CCC, July 28, 2016
- Quiescence Search Performance by David Cimbalista, CCC, July 28, 2016
- Removing Q-search by Matthew Lai, CCC, September 02, 2016
- Searching using slow eval with tactical verification by Matthew Lai, CCC, September 06, 2016
- Collecting PVs of Qsearch ? by Mahmoud Uthman, CCC, October 22, 2016 » Principal Variation, Triangular PV-Table
2017External Links
References
Up one level