Tweak futility pruning for extinction variants
authorFabian Fichter <ianfab@users.noreply.github.com>
Sun, 12 Jul 2020 16:13:40 +0000 (18:13 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sun, 12 Jul 2020 16:59:30 +0000 (18:59 +0200)
extinction STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 312 W: 196 L: 96 D: 20
http://www.variantfishtest.org:6543/tests/view/5f0ac6906e23db104fb88d83

extinction LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 491 W: 258 L: 162 D: 71
http://www.variantfishtest.org:6543/tests/view/5f0af0ff6e23db104fb88d92

threekings STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 250 W: 89 L: 23 D: 138
http://www.variantfishtest.org:6543/tests/view/5f0ac6ac6e23db104fb88d86

threekings LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 179 W: 71 L: 9 D: 99
http://www.variantfishtest.org:6543/tests/view/5f0af0f46e23db104fb88d90

kinglet STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 735 W: 373 L: 271 D: 91
http://www.variantfishtest.org:6543/tests/view/5f0af14f6e23db104fb88d94

src/search.cpp

index ea886d3..30b1e2d 100644 (file)
@@ -1566,8 +1566,9 @@ moves_loop: // When in check, search starts from here
       // Futility pruning
       if (   !inCheck
           && !givesCheck
-          && !(   pos.extinction_value() == -VALUE_MATE
-               && pos.extinction_piece_types().find(ALL_PIECES) == pos.extinction_piece_types().end())
+          && !(   pos.extinction_value() != VALUE_NONE
+               && pos.piece_on(to_sq(move))
+               && pos.extinction_piece_types().find(type_of(pos.piece_on(to_sq(move)))) != pos.extinction_piece_types().end())
           &&  futilityBase > -VALUE_KNOWN_WIN
           && !pos.advanced_pawn_push(move))
       {