X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmovepick.cpp;h=04fa40d625ba8212a4dceb2ed0278a966a5b7fe5;hb=4b8a7f2793f0d7dd46d2804cd5f46ccdb080da12;hp=7d759f12691058f255f84784e388a09b4fad6c09;hpb=e0215f3222d4f6c09492633854a41aaa131c38e0;p=stockfish diff --git a/src/movepick.cpp b/src/movepick.cpp index 7d759f12..04fa40d6 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -110,13 +110,13 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h) go_next_phase(); } -MovePicker::MovePicker(const Position& p, Move ttm, const History& h, int threshold) +MovePicker::MovePicker(const Position& p, Move ttm, const History& h, int parentCapture) : pos(p), H(h) { assert (!pos.in_check()); // In ProbCut we consider only captures better than parent's move - captureThreshold = threshold; + captureThreshold = parentCapture; phasePtr = ProbCutTable; if ( ttm != MOVE_NONE @@ -224,11 +224,11 @@ void MovePicker::score_captures() { for (MoveStack* cur = moves; cur != lastMove; cur++) { m = cur->move; + cur->score = pos.midgame_value_of_piece_on(move_to(m)) + - pos.type_of_piece_on(move_from(m)); + if (move_is_promotion(m)) - cur->score = QueenValueMidgame; - else - cur->score = pos.midgame_value_of_piece_on(move_to(m)) - - pos.type_of_piece_on(move_from(m)); + cur->score += QueenValueMidgame; } }