]> git.sesse.net Git - stockfish/commitdiff
Decrease reduction for moves that escape a capture
authorReuven Peleg <reuvenpe2005@gmail.com>
Tue, 3 Jun 2014 09:32:45 +0000 (11:32 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 3 Jun 2014 09:33:19 +0000 (11:33 +0200)
Passed both STC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 10094 W: 1833 L: 1704 D: 6557

and LTC
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 27738 W: 4147 L: 3928 D: 19663

bench : 8599236

src/search.cpp

index 99b89459b708d097ec3b7dbc605d17d3a05b4639..85d702c4d4c410e0eb4e5eb045977c6d891e5114 100644 (file)
@@ -868,6 +868,12 @@ moves_loop: // When in check and at SpNode search starts from here
           if (move == countermoves[0] || move == countermoves[1])
               ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY);
 
+          // Decrease reduction for moves that escape a capture
+          if (   ss->reduction
+              && type_of(pos.piece_on(to_sq(move))) != PAWN
+              && pos.see_sign(make_move(to_sq(move), from_sq(move))) < 0)
+              ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY);
+
           Depth d = std::max(newDepth - ss->reduction, ONE_PLY);
           if (SpNode)
               alpha = splitPoint->alpha;