]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
Fix compilation after recent merge.
[stockfish] / src / movepick.cpp
index 0aba9a55fe79d5b25d53da9b2e4e3e0f6ca19e1d..0267a8e2e6f0418074bfbc172bf72335651dfb50 100644 (file)
@@ -112,15 +112,13 @@ MovePicker::MovePicker(const Position&              p,
                        const ButterflyHistory*      mh,
                        const CapturePieceToHistory* cph,
                        const PieceToHistory**       ch,
-                       const PawnHistory*           ph,
-                       Square                       rs) :
+                       const PawnHistory*           ph) :
     pos(p),
     mainHistory(mh),
     captureHistory(cph),
     continuationHistory(ch),
     pawnHistory(ph),
     ttMove(ttm),
-    recaptureSquare(rs),
     depth(d) {
     assert(d <= 0);
 
@@ -181,12 +179,12 @@ void MovePicker::score() {
 
             // histories
             m.value = 2 * (*mainHistory)[pos.side_to_move()][from_to(m)];
+            m.value += 2 * (*pawnHistory)[pawn_structure(pos)][pc][to];
             m.value += 2 * (*continuationHistory[0])[pc][to];
             m.value += (*continuationHistory[1])[pc][to];
             m.value += (*continuationHistory[2])[pc][to] / 4;
             m.value += (*continuationHistory[3])[pc][to];
             m.value += (*continuationHistory[5])[pc][to];
-            m.value += (*pawnHistory)[pawn_structure(pos)][pc][to];
 
             // bonus for checks
             m.value += bool(pos.check_squares(pt) & to) * 16384;
@@ -302,7 +300,7 @@ top:
             endMoves = generate<QUIETS>(pos, cur);
 
             score<QUIETS>();
-            partial_insertion_sort(cur, endMoves, -3000 * depth);
+            partial_insertion_sort(cur, endMoves, -1960 - 3130 * depth);
         }
 
         ++stage;
@@ -340,8 +338,7 @@ top:
         return select<Next>([&]() { return pos.see_ge(*cur, threshold); });
 
     case QCAPTURE :
-        if (select<Next>(
-              [&]() { return depth > DEPTH_QS_RECAPTURES || to_sq(*cur) == recaptureSquare; }))
+        if (select<Next>([]() { return true; }))
             return *(cur - 1);
 
         // If we did not find any move and we do not try checks, we have finished