]> git.sesse.net Git - stockfish/commitdiff
Full three fold repetition detection only at root node
authorJean-Francois Romang <jeanfrancois.romang@gmail.com>
Thu, 25 Oct 2012 13:57:44 +0000 (15:57 +0200)
committerJean-Francois Romang <jeanfrancois.romang@gmail.com>
Thu, 25 Oct 2012 13:57:44 +0000 (15:57 +0200)
src/search.cpp

index 785cf0efb8ec7ec055f369ec3566c88f9dd87ccf..9980dcf95b1aeb347986ce6cab2e6ac2000fe00f 100644 (file)
@@ -524,7 +524,7 @@ namespace {
     if (!RootNode)
     {
         // Step 2. Check for aborted search and immediate draw
-        if (Signals.stop || (PvNode?pos.is_draw<false,false>():pos.is_draw<false,true>()) || ss->ply > MAX_PLY)
+        if (Signals.stop || pos.is_draw<false,true>() || ss->ply > MAX_PLY)
             return DrawValue[pos.side_to_move()];
 
         // Step 3. Mate distance pruning. Even if we mate at the next move our score
@@ -538,6 +538,10 @@ namespace {
         if (alpha >= beta)
             return alpha;
     }
+       else 
+       {
+               if(pos.is_draw<false,false>()) return DrawValue[pos.side_to_move()];
+       }
 
     // Step 4. Transposition table lookup
     // We don't want the score of a partial search to overwrite a previous full search