Am working on a Delta Pruning implementation in Quiscence Search,
currently i reach a prune rate of 1 to 3 % in middle game,
is this low, should it be more?
Merry Christmas
Srdja
Qsearch Delta Pruning Rate?
Moderators: hgm, Rebel, chrisw
-
- Posts: 2926
- Joined: Wed Mar 10, 2010 10:18 pm
- Location: Hamburg, Germany
- Full name: Srdja Matovic
-
- Posts: 3238
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Qsearch Delta Pruning Rate?
Can you clarify "Delta Pruning" with some pseudo-code ? Just so we make sure we are talking about the same thing (there are several ways prune in a QS).smatovic wrote:Am working on a Delta Pruning implementation in Quiscence Search,
currently i reach a prune rate of 1 to 3 % in middle game,
is this low, should it be more?
Merry Christmas
Srdja
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
-
- Posts: 2926
- Joined: Wed Mar 10, 2010 10:18 pm
- Location: Hamburg, Germany
- Full name: Srdja Matovic
Re: Qsearch Delta Pruning Rate?
sureCan you clarify "Delta Pruning" with some pseudo-code ?
Code: Select all
iif (incheck == false && capturescore > 0 && boardscore < alpha - capturescore && piececount >= 16)
return alpha;
-
- Posts: 3238
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Qsearch Delta Pruning Rate?
OK so:smatovic wrote:sureCan you clarify "Delta Pruning" with some pseudo-code ?
Code: Select all
iif (incheck == false && capturescore > 0 && boardscore < alpha - capturescore && piececount >= 16) return alpha;
- capturescore is the immediate materail gain of the capture (including promotion and en-passant?), assuming no recapture.
- condition should be boardscore + capturescore + margin < alpha, no ? You have to allow for some margin at least for the position gain of pieces moving on the board (either a hardcoded margin, or better: something like Stockfish's History::maxGains[][] mechanism)
- piececount >= 16 is a strange precondition. Is that for both sides (white and blacn) and including the pawns, or just pieces ? It seems far too restrictive, although you're probably right about being careful when pruning enters an endgame (say if after the capture the opponent has no pieces and only pawns, then don't delta prune)
But yes, I would say that this pruning will not reduce massively your node count. I think what is far more impoerant is a good SEE pruning (I do it at both PV and non PV nodes and it reduces the node count massively for rather little tactical cost).
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
-
- Posts: 2926
- Joined: Wed Mar 10, 2010 10:18 pm
- Location: Hamburg, Germany
- Full name: Srdja Matovic
Re: Qsearch Delta Pruning Rate?
Thanks for the margin hint Lucas.
--
Srdja
With SEE Pruning you mean SEE score < 0 for captures?But yes, I would say that this pruning will not reduce massively your node count. I think what is far more impoerant is a good SEE pruning (I do it at both PV and non PV nodes and it reduces the node count massively for rather little tactical cost).
--
Srdja
-
- Posts: 3238
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Qsearch Delta Pruning Rate?
Yes. I do SEE pruning when:smatovic wrote:Thanks for the margin hint Lucas.
With SEE Pruning you mean SEE score < 0 for captures?But yes, I would say that this pruning will not reduce massively your node count. I think what is far more impoerant is a good SEE pruning (I do it at both PV and non PV nodes and it reduces the node count massively for rather little tactical cost).
--
Srdja
- not in check (obviously)
- move is not a discovered check (for disco checks consider the SEE meaningless)
- SEE < 0, capture or not. There are no evasions to consider (since we're not in check) but this also prunes stupid quiet checks at depth = 0 (I generate quiet checks at depth = 0, and this prunes the stupid ones where the checking piece is lest hanging).
As for "delta pruning", you basically prune the captures that won't raise alpha, even in the best case scenario where there's no recapture. For that I use a margin of value(Pawn, Endgame) / 2.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
-
- Posts: 855
- Joined: Sun May 23, 2010 1:32 pm
Re: Qsearch Delta Pruning Rate?
I wonder why it's called Delta pruning, it lloks to me very similar to Futility pruning, am I wrong?
-
- Posts: 3238
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Qsearch Delta Pruning Rate?
I don't call it delta pruning. Maybe it's something from the chess programming wiki. Although I remember that Fruit called it delta pruning. Futility pruning is a better name IMO.elcabesa wrote:I wonder why it's called Delta pruning, it lloks to me very similar to Futility pruning, am I wrong?
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
-
- Posts: 4052
- Joined: Thu May 15, 2008 9:57 pm
- Location: Berlin, Germany
- Full name: Sven Schüle
Re: Qsearch Delta Pruning Rate?
Here is one possible explanation for the origin of the name "delta pruning".lucasart wrote:I don't call it delta pruning. Maybe it's something from the chess programming wiki. Although I remember that Fruit called it delta pruning. Futility pruning is a better name IMO.elcabesa wrote:I wonder why it's called Delta pruning, it lloks to me very similar to Futility pruning, am I wrong?
Sven