]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix some wrong documentation
[stockfish] / src / search.cpp
index 693bea940548f31d975db84c428d2b8273819c8a..23ca74469eccf1c2ccf5155936623e701fc3c3d4 100644 (file)
@@ -235,7 +235,7 @@ namespace {
   const Value EasyMoveMargin = Value(0x200);
 
   // Last seconds noise filtering (LSN)
-  const bool UseLSNFiltering = true;
+  const bool UseLSNFiltering = false;
   const int LSNTime = 100; // In milliseconds
   const Value LSNValue = value_from_centipawns(200);
   bool loseOnTime = false;
@@ -356,7 +356,7 @@ void init_search() {
 
   // Init futility margins array
   for (d = 0; d < 16; d++) for (mc = 0; mc < 64; mc++)
-      FutilityMarginsMatrix[d][mc] = 112 * int(log(double(d * d) / 2) / log(2.0) + 1) - 8 * mc + 45;
+      FutilityMarginsMatrix[d][mc] = 112 * int(log(double(d * d) / 2) / log(2.0) + 1.001) - 8 * mc + 45;
 
   // Init futility move count array
   for (d = 0; d < 32; d++)
@@ -364,8 +364,8 @@ void init_search() {
 }
 
 
-// SearchStack::init() initializes a search stack. Used at the beginning of a
-// new search from the root.
+// SearchStack::init() initializes a search stack entry.
+// Called at the beginning of search() when starting to examine a new node.
 void SearchStack::init() {
 
   pv[0] = pv[1] = MOVE_NONE;
@@ -374,6 +374,7 @@ void SearchStack::init() {
   eval = VALUE_NONE;
 }
 
+// SearchStack::initKillers() initializes killers for a search stack entry
 void SearchStack::initKillers() {
 
   mateKiller = MOVE_NONE;
@@ -1237,7 +1238,7 @@ namespace {
 
     // Step 9. Internal iterative deepening
     if (    depth >= IIDDepth[PvNode]
-        && (ttMove == MOVE_NONE || (PvNode && tte->depth() <= depth - 4 * OnePly))
+        &&  ttMove == MOVE_NONE
         && (PvNode || (!isCheck && ss->eval >= beta - IIDMargin)))
     {
         Depth d = (PvNode ? depth - 2 * OnePly : depth / 2);