]> git.sesse.net Git - stockfish/commitdiff
Set captureThreshold according to static evaluation
authorMarco Costalba <mcostalba@gmail.com>
Thu, 8 Dec 2011 12:48:18 +0000 (13:48 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 8 Dec 2011 12:48:18 +0000 (13:48 +0100)
Consider negative captures as good if
still enough to reach beta.

After 7502 games:
Mod vs Orig 1225 - 1158 - 5119 ELO +3 (+- 4.5)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/movepick.cpp

index 0b3b6fd6b0e4d1e88d9052036ce58e07f886d279..589c27b3585383be0ac6823907f767b36696d36b 100644 (file)
@@ -88,11 +88,14 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
       killers[0].move = ss->killers[0];
       killers[1].move = ss->killers[1];
 
-      // Consider sligtly negative captures as good if at low
-      // depth and far from beta.
+      // Consider sligtly negative captures as good if at low depth and far from beta
       if (ss && ss->eval < beta - PawnValueMidgame && d < 3 * ONE_PLY)
           captureThreshold = -PawnValueMidgame;
 
+      // Consider negative captures as good if still enough to reach beta
+      else if (ss && ss->eval > beta)
+          captureThreshold = beta - ss->eval;
+
       phasePtr = MainSearchTable;
   }