]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Tidy up in movepick.cpp
[stockfish] / src / search.cpp
index b9ff56fbd2d2b3297fdd9e416efa7d03fcfda37b..9689668956e8ae77f147ef1f9203c9a58ffa7e57 100644 (file)
@@ -749,7 +749,7 @@ namespace {
         assert((ss-1)->currentMove != MOVE_NONE);
         assert((ss-1)->currentMove != MOVE_NULL);
 
-        MovePicker mp(pos, ttMove, History, CounterMovesHistory, pos.captured_piece_type());
+        MovePicker mp(pos, ttMove, History, CounterMovesHistory, PieceValue[MG][pos.captured_piece_type()]);
         CheckInfo ci(pos);
 
         while ((move = mp.next_move<false>()) != MOVE_NONE)
@@ -959,8 +959,8 @@ moves_loop: // When in check and at SpNode search starts from here
               ss->reduction += ONE_PLY;
 
           if (   History[pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO
-                  && CounterMovesHistory[pos.piece_on(prevMoveSq)][prevMoveSq]
-                                        [pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO)
+              && CounterMovesHistory[pos.piece_on(prevMoveSq)][prevMoveSq]
+                                    [pos.piece_on(to_sq(move))][to_sq(move)] > VALUE_ZERO)
               ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY);
 
           // Decrease reduction for moves that escape a capture