]> git.sesse.net Git - stockfish/commitdiff
Fix broken multi-pv with aspiration window search
authorMarco Costalba <mcostalba@gmail.com>
Fri, 15 May 2009 07:39:36 +0000 (09:39 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 15 May 2009 16:48:18 +0000 (17:48 +0100)
Aspiration window search must be disabled for
multi-pv case.

We missed one point where aspiration window should
be disabled in this case.

Patch from Joona, with a little added edit by me.

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

index a6db7a3ef8883b41701200f7d5e0124bb33be5ea..30abecd0ed563df77dd681af6f7429e1654b7bfc 100644 (file)
@@ -890,6 +890,10 @@ namespace {
 
         if (i < MultiPV)
         {
 
         if (i < MultiPV)
         {
+            // Aspiration window is disabled in multi-pv case
+            if (MultiPV > 1)
+                alpha = -VALUE_INFINITE;
+
             value = -search_pv(pos, ss, -beta, -alpha, newDepth, 1, 0);
             // If the value has dropped a lot compared to the last iteration,
             // set the boolean variable Problem to true. This variable is used
             value = -search_pv(pos, ss, -beta, -alpha, newDepth, 1, 0);
             // If the value has dropped a lot compared to the last iteration,
             // set the boolean variable Problem to true. This variable is used