]> git.sesse.net Git - stockfish/commitdiff
Simplify threshold handling for probcut. (#936)
authorJoost VandeVondele <Joost.VandeVondele@gmail.com>
Thu, 22 Dec 2016 15:02:32 +0000 (16:02 +0100)
committerMarco Costalba <mcostalba@users.noreply.github.com>
Thu, 22 Dec 2016 15:02:32 +0000 (16:02 +0100)
Just use greater equal as this is what see_ge does now.

passed STC
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 226506 W: 39755 L: 39978 D: 146773

passed LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 138483 W: 17450 L: 17479 D: 103554

Bench: 5212921

src/movepick.cpp

index c187c3ad6ee8a914ea9eb0904e89cc8dbff47374..abb753baea75d118ae41cfecefdf38992050227d 100644 (file)
@@ -111,11 +111,11 @@ MovePicker::MovePicker(const Position& p, Move ttm, Value th)
 
   stage = PROBCUT;
 
 
   stage = PROBCUT;
 
-  // In ProbCut we generate captures with SEE higher than the given threshold
+  // In ProbCut we generate captures with SEE higher than or equal to the given threshold
   ttMove =   ttm
           && pos.pseudo_legal(ttm)
           && pos.capture(ttm)
   ttMove =   ttm
           && pos.pseudo_legal(ttm)
           && pos.capture(ttm)
-          && pos.see_ge(ttm, threshold + 1)? ttm : MOVE_NONE;
+          && pos.see_ge(ttm, threshold)? ttm : MOVE_NONE;
 
   stage += (ttMove == MOVE_NONE);
 }
 
   stage += (ttMove == MOVE_NONE);
 }
@@ -294,7 +294,7 @@ Move MovePicker::next_move() {
       {
           move = pick_best(cur++, endMoves);
           if (   move != ttMove
       {
           move = pick_best(cur++, endMoves);
           if (   move != ttMove
-              && pos.see_ge(move, threshold + 1))
+              && pos.see_ge(move, threshold))
               return move;
       }
       break;
               return move;
       }
       break;