]> git.sesse.net Git - stockfish/commitdiff
Merge branch 'master' into increase_iid
authorMarco Costalba <mcostalba@gmail.com>
Fri, 29 Mar 2013 21:50:04 +0000 (22:50 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 29 Mar 2013 21:50:04 +0000 (22:50 +0100)
1  2 
src/search.cpp

diff --combined src/search.cpp
index 8ef2513dd1a895c0fdda2ed28af7c5587f06de51,f99f63beca57fda3d7e3b4780595e85f4d5c2b09..9ab8c800d8fbde01527d266b6a8fc1d0a9c314b8
@@@ -745,7 -745,7 +745,7 @@@ namespace 
          && ttMove == MOVE_NONE
          && (PvNode || (!inCheck && ss->staticEval + Value(256) >= beta)))
      {
 -        Depth d = (PvNode ? depth - 2 * ONE_PLY : depth / 2);
 +        Depth d = (PvNode ? depth - 2 * ONE_PLY : depth - 4 * ONE_PLY);
  
          ss->skipNullMove = true;
          search<PvNode ? PV : NonPV>(pos, ss, alpha, beta, d);
@@@ -856,7 -856,8 +856,8 @@@ split_point_start: // At split points a
            && !captureOrPromotion
            && !inCheck
            && !dangerous
-           &&  move != ttMove)
+           &&  move != ttMove
+           &&  bestValue > VALUE_MATED_IN_MAX_PLY)
        {
            // Move count based pruning
            if (   depth < 16 * ONE_PLY
  
            if (futilityValue < beta)
            {
+               bestValue = std::max(bestValue, futilityValue);
                if (SpNode)
+               {
                    splitPoint->mutex.lock();
+                   if (bestValue > splitPoint->bestValue)
+                       splitPoint->bestValue = bestValue;
+               }
                continue;
            }