]> git.sesse.net Git - stockfish/commitdiff
Fix white space breakage
authorMarco Costalba <mcostalba@gmail.com>
Wed, 2 Jun 2010 10:25:02 +0000 (11:25 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 2 Jun 2010 10:25:02 +0000 (11:25 +0100)
No functional change with faked split.

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

index 09daeba04ae10c6af40d68bee1b2697af24d7b32..a472c84594a219dd22ecf6d09a91bb04c820b74a 100644 (file)
@@ -1668,7 +1668,7 @@ bool Position::is_draw() const {
 
   assert(st->ply >= st->rule50);
 
 
   assert(st->ply >= st->rule50);
 
-  // Draw by repetition?  
+  // Draw by repetition?
   for (int i = 4, e = Min(st->rule50, st->pliesFromNull); i <= e; i += 2)
       if (history[st->ply - i] == st->key)
           return true;
   for (int i = 4, e = Min(st->rule50, st->pliesFromNull); i <= e; i += 2)
       if (history[st->ply - i] == st->key)
           return true;
index 5e04dbb7b696cc874f63641c2643f9ca34f9653d..6ee1ea02a17b1e45d9dc603a75ec23a6d8e0d50e 100644 (file)
@@ -1675,7 +1675,7 @@ namespace {
       if (   !PvNode
           && !captureOrPromotion
           && !isCheck
       if (   !PvNode
           && !captureOrPromotion
           && !isCheck
-          && !dangerous          
+          && !dangerous
           && !move_is_castle(move))
       {
           // Move count based pruning
           && !move_is_castle(move))
       {
           // Move count based pruning
@@ -1717,7 +1717,7 @@ namespace {
           ss->reduction = reduction<PvNode>(sp->depth, moveCount);
           if (ss->reduction)
           {
           ss->reduction = reduction<PvNode>(sp->depth, moveCount);
           if (ss->reduction)
           {
-              Value localAlpha = sp->alpha;              
+              Value localAlpha = sp->alpha;
               Depth d = newDepth - ss->reduction;
               value = d < OnePly ? -qsearch<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, Depth(0), threadID)
                                  : - search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, d, true, threadID);
               Depth d = newDepth - ss->reduction;
               value = d < OnePly ? -qsearch<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, Depth(0), threadID)
                                  : - search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, d, true, threadID);
@@ -1736,12 +1736,12 @@ namespace {
               value = -search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, newDepth-ss->reduction, true, threadID);
               doFullDepthSearch = (value > localAlpha);
           }
               value = -search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, newDepth-ss->reduction, true, threadID);
               doFullDepthSearch = (value > localAlpha);
           }
+          ss->reduction = Depth(0); // Restore original reduction
       }
 
       // Step 15. Full depth search
       if (doFullDepthSearch)
       {
       }
 
       // Step 15. Full depth search
       if (doFullDepthSearch)
       {
-          ss->reduction = Depth(0);
           Value localAlpha = sp->alpha;
           value = newDepth < OnePly ? -qsearch<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, Depth(0), threadID)
                                     : - search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, newDepth, true, threadID);
           Value localAlpha = sp->alpha;
           value = newDepth < OnePly ? -qsearch<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, Depth(0), threadID)
                                     : - search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, newDepth, true, threadID);