From 335b57b5ef85da22b7e26cdfc1fd7b3e28dbbe8d Mon Sep 17 00:00:00 2001 From: Lucas Braesch Date: Thu, 21 Feb 2013 09:54:06 -0500 Subject: [PATCH 1/2] Prune negative SEE moves also in PV nodes This patch is actually the sum of two contributions that have been tested independently: 1) Pruning of negative SEE moves in PV After 10000 games at 20+0.05 ELO: 5.18 +-7 (95%) LOS: 99.2% Total: 10000 W: 1952 L: 1803 D: 6245 2) Remove of bestValue > VALUE_MATED_IN_MAX_PLY condition After 23000 games at 20+0.05 ELO: 1.63 +-4 (95%) LOS: 88.1% Total: 23000 W: 4232 L: 4124 D: 14644 The whole patch as been re-tested at long TC with positive results: After 10000 games at 60+0.05 ELO: 4.31 +-7 (95%) LOS: 98.3% Total: 10000 W: 1765 L: 1641 D: 6594 --- src/search.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index c256cfc0..c039b64e 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -857,16 +857,15 @@ split_point_start: // At split points actual search starts from here newDepth = depth - ONE_PLY + ext; // Step 13. Futility pruning (is omitted in PV nodes) - if ( !PvNode - && !captureOrPromotion + if ( !captureOrPromotion && !inCheck && !dangerous && move != ttMove - && (bestValue > VALUE_MATED_IN_MAX_PLY || ( bestValue == -VALUE_INFINITE - && alpha > VALUE_MATED_IN_MAX_PLY))) + && alpha > VALUE_MATED_IN_MAX_PLY) { // Move count based pruning - if ( depth < 16 * ONE_PLY + if ( !PvNode + && depth < 16 * ONE_PLY && moveCount >= FutilityMoveCounts[depth] && (!threatMove || !refutes(pos, move, threatMove))) { @@ -883,7 +882,7 @@ split_point_start: // At split points actual search starts from here futilityValue = ss->staticEval + ss->evalMargin + futility_margin(predictedDepth, moveCount) + Gain[pos.piece_moved(move)][to_sq(move)]; - if (futilityValue < beta) + if (!PvNode && futilityValue < beta) { if (SpNode) sp->mutex.lock(); From bc38efd1288c8cb25179935998cfa3dc6c9f4410 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 27 Feb 2013 08:07:26 +0100 Subject: [PATCH 2/2] Remove pruning condition on alpha Further simplifying on Lucas's idea, seems reliable in tests: ELO: 2.15 +-7 (95%) LOS: 84.9% Total: 9999 W: 1831 L: 1769 D: 6399 --- src/search.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index c039b64e..b235a1e6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -860,8 +860,7 @@ split_point_start: // At split points actual search starts from here if ( !captureOrPromotion && !inCheck && !dangerous - && move != ttMove - && alpha > VALUE_MATED_IN_MAX_PLY) + && move != ttMove) { // Move count based pruning if ( !PvNode