Changes

Jump to: navigation, search

Delta Pruning

2,656 bytes added, 18:52, 29 April 2018
Created page with " '''Home * Search * Selectivity * Pruning * Delta Pruning''' '''Delta Pruning''',<br/> a technique similar in concept to Futility Pruning|futility..."

'''[[Main Page|Home]] * [[Search]] * [[Selectivity]] * [[Pruning]] * Delta Pruning'''

'''Delta Pruning''',<br/>
a technique similar in concept to [[Futility Pruning|futility pruning]], only used in the [[Quiescence Search|quiescence search]]. It works as follows: before we make a [[Captures|capture]], we test whether the captured piece value plus some safety margin (typically around 200 centipawns) are enough to raise [[Alpha|alpha]] for the current node.

For example, if the side to move is a rook down, it does not bother to test captures of pawns, since they are unlikely to improve matters. Capturing a minor piece, however, might be sufficient, given enough positional compensation. It follows that the safety margin (delta) should be around 200 centipawns, depending on the [[Material|piece values]] used by the program. For safety reasons, delta pruning should be switched off in the late endgame, since otherwise quiescence search would be blind to [[Material#InsufficientMaterial|insufficient material]] issues and transitions into won [[Endgame|endgames]] made at the expense of some material.

=Sample Code=
Some processing power may be saved by testing if '''any''' move can improve over alpha. Then in truly hopeless nodes we don't do move generation and testing each move against the delta margin. The following code shows how this is done on the [[CPW-engine]] (it represents a part of quiescence search responsible for handling a stand pat score):
<pre>
// get a "stand pat" score

int val = eval( alpha, beta );

// check if it causes a beta cutoff

if( val >= beta )
return beta;

// The next three lines test if alpha can be improved by greatest
// possible material swing.

int BIG_DELTA = 975; // queen value
if ( isPromotingPawn() ) BIG_DELTA += 775;

if ( val < alpha - BIG_DELTA ) {
return alpha;
}

if( alpha < val )
alpha = val;
</pre>

=See also=
* [[Futility Pruning]]
* [[Lazy Evaluation]]
* [[Quiescence Search]]
* [[Static Exchange Evaluation]]

=Forum Posts=
* [https://www.stmintz.com/ccc/index.php?id=71825 Comments on delta pruning] by [[Bas Hamstra]], [[CCC]], October 05, 1999
* [https://www.stmintz.com/ccc/index.php?id=381756 Delta Pruning] by [[Stuart Cracraft]], [[CCC]], August 10, 2004
* [http://www.talkchess.com/forum/viewtopic.php?t=38997 Inverse delta pruning] by [[Marcel van Kervinck]], [[CCC]], May 06, 2011
* [http://www.talkchess.com/forum/viewtopic.php?t=46568 Qsearch Delta Pruning Rate?] by [[Srdja Matovic]], [[CCC]], December 24, 2012

=External Links=
* [http://wbec-ridderkerk.nl/html/details1/Fruit.html Fruit from WBEC-Ridderkerk] » [[Fruit]]

'''[[Pruning|Up one Level]]'''

Navigation menu