Simplified select best thread (#958)
authorElbertoOne <ElbertoOne@users.noreply.github.com>
Mon, 9 Jan 2017 09:26:50 +0000 (10:26 +0100)
committerMarco Costalba <mcostalba@users.noreply.github.com>
Mon, 9 Jan 2017 09:26:50 +0000 (10:26 +0100)
Only select best thread if score is better and depth equal or larger.

STC (7 threads): http://tests.stockfishchess.org/tests/view/586a4d090ebc5903140c64b2
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 120297 W: 18652 L: 18682 D: 82963

LTC (7 threads): http://tests.stockfishchess.org/tests/view/586e31b30ebc5903140c663d
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 57187 W: 7035 L: 6959 D: 43193

bench: 4940355

src/search.cpp

index 4f4092f..a9fc1c6 100644 (file)
@@ -316,8 +316,7 @@ void MainThread::search() {
           Depth depthDiff = th->completedDepth - bestThread->completedDepth;
           Value scoreDiff = th->rootMoves[0].score - bestThread->rootMoves[0].score;
 
           Depth depthDiff = th->completedDepth - bestThread->completedDepth;
           Value scoreDiff = th->rootMoves[0].score - bestThread->rootMoves[0].score;
 
-          if (   (depthDiff > 0 && scoreDiff >= 0)
-              || (scoreDiff > 0 && depthDiff >= 0))
+          if (scoreDiff > 0 && depthDiff >= 0)
               bestThread = th;
       }
   }
               bestThread = th;
       }
   }