]> git.sesse.net Git - stockfish/commitdiff
Retire Null Driven IID
authorMarco Costalba <mcostalba@gmail.com>
Fri, 13 Mar 2009 14:39:22 +0000 (15:39 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 15 Mar 2009 15:43:28 +0000 (16:43 +0100)
It does not seem to clearly improve things and
in any case is disabled by default, so retire for now.

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

index be324c16edff44b08a7450edbd8d016cf65fe351..92d2c75ed2c6fd5a3ff3b89d376e60c704c048f4 100644 (file)
@@ -125,9 +125,6 @@ namespace {
   const bool UseIIDAtPVNodes = true;
   const bool UseIIDAtNonPVNodes = false;
 
   const bool UseIIDAtPVNodes = true;
   const bool UseIIDAtNonPVNodes = false;
 
-  // Use null move driven internal iterative deepening?
-  bool UseNullDrivenIID = false;
-
   // Internal iterative deepening margin.  At Non-PV moves, when
   // UseIIDAtNonPVNodes is true, we do an internal iterative deepening search
   // when the static evaluation is at most IIDMargin below beta.
   // Internal iterative deepening margin.  At Non-PV moves, when
   // UseIIDAtNonPVNodes is true, we do an internal iterative deepening search
   // when the static evaluation is at most IIDMargin below beta.
@@ -437,7 +434,6 @@ void think(const Position &pos, bool infinite, bool ponder, int side_to_move,
   if (UseLogFile)
       LogFile.open(get_option_value_string("Search Log Filename").c_str(), std::ios::out | std::ios::app);
 
   if (UseLogFile)
       LogFile.open(get_option_value_string("Search Log Filename").c_str(), std::ios::out | std::ios::app);
 
-  UseNullDrivenIID = get_option_value_bool("Null driven IID");
   UseQSearchFutilityPruning = get_option_value_bool("Futility Pruning (Quiescence Search)");
   UseFutilityPruning = get_option_value_bool("Futility Pruning (Main Search)");
 
   UseQSearchFutilityPruning = get_option_value_bool("Futility Pruning (Quiescence Search)");
   UseFutilityPruning = get_option_value_bool("Futility Pruning (Main Search)");
 
@@ -1201,7 +1197,6 @@ namespace {
 
     Value approximateEval = quick_evaluate(pos);
     bool mateThreat = false;
 
     Value approximateEval = quick_evaluate(pos);
     bool mateThreat = false;
-    bool nullDrivenIID = false;
     bool isCheck = pos.is_check();
 
     // Null move search
     bool isCheck = pos.is_check();
 
     // Null move search
@@ -1226,19 +1221,6 @@ namespace {
 
         Value nullValue = -search(pos, ss, -(beta-delta-1), depth-R*OnePly, ply+1, false, threadID);
 
 
         Value nullValue = -search(pos, ss, -(beta-delta-1), depth-R*OnePly, ply+1, false, threadID);
 
-        // Check for a null capture artifact, if the value without the null capture
-        // is above beta then mark the node as a suspicious failed low. We will verify
-        // later if we are really under threat.
-        if (   UseNullDrivenIID
-            && nullValue < beta
-            && depth > 6 * OnePly
-            &&!value_is_mate(nullValue)
-            && ttMove == MOVE_NONE
-            && ss[ply + 1].currentMove != MOVE_NONE
-            && pos.move_is_capture(ss[ply + 1].currentMove)
-            && pos.see(ss[ply + 1].currentMove) + nullValue >= beta)
-            nullDrivenIID = true;
-
         pos.undo_null_move();
 
         if (value_is_mate(nullValue))
         pos.undo_null_move();
 
         if (value_is_mate(nullValue))
@@ -1262,10 +1244,8 @@ namespace {
             // low score (which will cause the reduced move to fail high in the
             // parent node, which will trigger a re-search with full depth).
             if (nullValue == value_mated_in(ply + 2))
             // low score (which will cause the reduced move to fail high in the
             // parent node, which will trigger a re-search with full depth).
             if (nullValue == value_mated_in(ply + 2))
-            {
                 mateThreat = true;
                 mateThreat = true;
-                nullDrivenIID = false;
-            }
+
             ss[ply].threatMove = ss[ply + 1].currentMove;
             if (   depth < ThreatDepth
                 && ss[ply - 1].reduction
             ss[ply].threatMove = ss[ply + 1].currentMove;
             if (   depth < ThreatDepth
                 && ss[ply - 1].reduction
@@ -1295,22 +1275,6 @@ namespace {
         search(pos, ss, beta, Min(depth/2, depth-2*OnePly), ply, false, threadID);
         ttMove = ss[ply].pv[ply];
     }
         search(pos, ss, beta, Min(depth/2, depth-2*OnePly), ply, false, threadID);
         ttMove = ss[ply].pv[ply];
     }
-    else if (nullDrivenIID)
-    {
-        // The null move failed low due to a suspicious capture. Perhaps we
-        // are facing a null capture artifact due to the side to move change
-        // and this position should fail high. So do a normal search with a
-        // reduced depth to get a good ttMove to use in the following full
-        // depth search.
-        Move tm = ss[ply].threatMove;
-
-        assert(tm != MOVE_NONE);
-        assert(ttMove == MOVE_NONE);
-
-        search(pos, ss, beta, depth/2, ply, false, threadID);
-        ttMove = ss[ply].pv[ply];
-        ss[ply].threatMove = tm;
-    }
 
     // Initialize a MovePicker object for the current position, and prepare
     // to search all moves:
 
     // Initialize a MovePicker object for the current position, and prepare
     // to search all moves:
index 5c78c00e6a675b372e08d13e1d6cdda7077be77f..95e3e279bef7714e225112e9fd618ee1f31ea04c 100644 (file)
@@ -120,7 +120,6 @@ namespace {
     o.push_back(Option("Full Depth Moves (non-PV nodes)", 3, 1, 100));
     o.push_back(Option("Threat Depth", 5, 0, 100));
     o.push_back(Option("Selective Plies", 7, 0, 10));
     o.push_back(Option("Full Depth Moves (non-PV nodes)", 3, 1, 100));
     o.push_back(Option("Threat Depth", 5, 0, 100));
     o.push_back(Option("Selective Plies", 7, 0, 10));
-    o.push_back(Option("Null driven IID", false));
     o.push_back(Option("Futility Pruning (Main Search)", true));
     o.push_back(Option("Futility Pruning (Quiescence Search)", true));
     o.push_back(Option("Futility Margin (Quiescence Search)", 50, 0, 1000));
     o.push_back(Option("Futility Pruning (Main Search)", true));
     o.push_back(Option("Futility Pruning (Quiescence Search)", true));
     o.push_back(Option("Futility Margin (Quiescence Search)", 50, 0, 1000));