Reduce negative quiets by ONE_PLY / 2
authorRalph Stößer <ralph.stoesser@ralph_stoesser.(none)>
Mon, 23 Sep 2013 06:03:12 +0000 (08:03 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 23 Sep 2013 06:08:52 +0000 (08:08 +0200)
Passed both short TC:
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 3402 W: 708 L: 593 D: 2101

And long TC:
LLR: 2.93 (-2.94,2.94) [0.00,6.00]
Total: 23379 W: 3972 L: 3759 D: 15648

bench: 3529630

src/search.cpp

index 4ab17fd85ae80d82273841ffc08296763631f019..63c9e076f61ce6a713a162bace28dfde429b9fa9 100644 (file)
@@ -949,8 +949,11 @@ moves_loop: // When in check and at SpNode search starts from here
           if (!PvNode && cutNode)
               ss->reduction += ONE_PLY;
 
+          else if (History[pos.piece_on(to_sq(move))][to_sq(move)] < 0)
+              ss->reduction += ONE_PLY / 2;
+
           if (move == countermoves[0] || move == countermoves[1])
-              ss->reduction = std::max(DEPTH_ZERO, ss->reduction-ONE_PLY);
+              ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY);
 
           Depth d = std::max(newDepth - ss->reduction, ONE_PLY);
           if (SpNode)