]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
Depth dependant aspiration window delta
[stockfish] / src / movepick.cpp
index e0bd2a674025d0795955310c60758127509b4867..539c486852ee278e0295deb7a53919a7fd634ac6 100644 (file)
@@ -30,7 +30,7 @@ namespace {
     EVASION,     EVASIONS_S2,
     QSEARCH_0,   CAPTURES_S3, QUIET_CHECKS_S3,
     QSEARCH_1,   CAPTURES_S4,
-    MULTICUT,    CAPTURES_S5,
+    PROBCUT,     CAPTURES_S5,
     RECAPTURE,   CAPTURES_S6,
     STOP
   };
@@ -128,9 +128,9 @@ MovePicker::MovePicker(const Position& p, Move ttm, const HistoryStats& h, Piece
 
   assert(!pos.checkers());
 
-  stage = MULTICUT;
+  stage = PROBCUT;
 
-  // In MultiCut we generate only captures that are better than the parent's
+  // In ProbCut we generate only captures that are better than the parent's
   // captured piece.
   captureThreshold = PieceValue[MG][pt];
   ttMove = (ttm && pos.pseudo_legal(ttm) ? ttm : MOVE_NONE);
@@ -193,12 +193,12 @@ void MovePicker::score<EVASIONS>() {
   // is not under attack, ordered by history value, then bad-captures and quiet
   // moves with a negative SEE. This last group is ordered by the SEE score.
   Move m;
-  int seeScore;
+  Value seeScore;
 
   for (ExtMove* it = moves; it != end; ++it)
   {
       m = it->move;
-      if ((seeScore = pos.see_sign(m)) < 0)
+      if ((seeScore = pos.see_sign(m)) < VALUE_ZERO)
           it->score = seeScore - HistoryStats::Max; // At the bottom
 
       else if (pos.capture(m))
@@ -281,7 +281,7 @@ void MovePicker::generate_next_stage() {
       end = generate<QUIET_CHECKS>(pos, moves);
       return;
 
-  case EVASION: case QSEARCH_0: case QSEARCH_1: case MULTICUT: case RECAPTURE:
+  case EVASION: case QSEARCH_0: case QSEARCH_1: case PROBCUT: case RECAPTURE:
       stage = STOP;
   case STOP:
       end = cur + 1; // Avoid another next_phase() call
@@ -309,7 +309,7 @@ Move MovePicker::next_move<false>() {
 
       switch (stage) {
 
-      case MAIN_SEARCH: case EVASION: case QSEARCH_0: case QSEARCH_1: case MULTICUT:
+      case MAIN_SEARCH: case EVASION: case QSEARCH_0: case QSEARCH_1: case PROBCUT:
           ++cur;
           return ttMove;
 
@@ -317,7 +317,7 @@ Move MovePicker::next_move<false>() {
           move = pick_best(cur++, end)->move;
           if (move != ttMove)
           {
-              if (pos.see_sign(move) >= 0)
+              if (pos.see_sign(move) >= VALUE_ZERO)
                   return move;
 
               // Losing capture, move it to the tail of the array