Disable use of aspiration window in known win positions
authorJoona Kiiski <joona.kiiski@gmail.com>
Wed, 17 Jun 2009 10:16:51 +0000 (13:16 +0300)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 18 Jun 2009 06:35:24 +0000 (07:35 +0100)
When we are hunting for mate, transposition table is filled in
with mate scores. Current implemenatation of aspiration search
can't cope with this very well.

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

index 3382e09c745183130458ca1db03506fa3345b71e..7e501fc41fa1278b143222641ffe414085a690b5 100644 (file)
@@ -657,7 +657,7 @@ namespace {
         // Calculate dynamic search window based on previous iterations
         Value alpha, beta;
 
-        if (MultiPV == 1 && Iteration >= 6)
+        if (MultiPV == 1 && Iteration >= 6 && abs(IterationInfo[Iteration - 1].value) < VALUE_KNOWN_WIN)
         {
             int prevDelta1 = IterationInfo[Iteration - 1].speculatedValue - IterationInfo[Iteration - 2].speculatedValue;
             int prevDelta2 = IterationInfo[Iteration - 2].speculatedValue - IterationInfo[Iteration - 3].speculatedValue;