X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=ba99df0d1262fd7edffe0f03d0f68240d47c03bc;hp=89577ee4a58738cacca2b8aa3f023eef0c801273;hb=55df3fa2d7631ed67e46f9433aa7f3a71c18e5e7;hpb=834bd9edd79d11566ec3556945a858d2d84a726b diff --git a/src/movepick.cpp b/src/movepick.cpp index 89577ee4..ba99df0d 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -79,12 +79,12 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h, killers[1].move = ss->killers[1]; // Consider sligtly negative captures as good if at low depth and far from beta - if (ss && ss->eval < beta - PawnValueMg && d < 3 * ONE_PLY) + if (ss && ss->staticEval < beta - PawnValueMg && d < 3 * ONE_PLY) captureThreshold = -PawnValueMg; // Consider negative captures as good if still enough to reach beta - else if (ss && ss->eval > beta) - captureThreshold = beta - ss->eval; + else if (ss && ss->staticEval > beta) + captureThreshold = beta - ss->staticEval; } ttMove = (ttm && pos.is_pseudo_legal(ttm) ? ttm : MOVE_NONE); @@ -131,7 +131,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, const History& h, PieceType phase = PROBCUT; // In ProbCut we generate only captures better than parent's captured piece - captureThreshold = PieceValue[Mg][pt]; + captureThreshold = PieceValue[MG][pt]; ttMove = (ttm && pos.is_pseudo_legal(ttm) ? ttm : MOVE_NONE); if (ttMove && (!pos.is_capture(ttMove) || pos.see(ttMove) <= captureThreshold)) @@ -165,11 +165,11 @@ void MovePicker::score_captures() { for (MoveStack* it = moves; it != end; ++it) { m = it->move; - it->score = PieceValue[Mg][pos.piece_on(to_sq(m))] + it->score = PieceValue[MG][pos.piece_on(to_sq(m))] - type_of(pos.piece_moved(m)); if (type_of(m) == PROMOTION) - it->score += PieceValue[Mg][promotion_type(m)]; + it->score += PieceValue[MG][promotion_type(m)]; } } @@ -200,7 +200,7 @@ void MovePicker::score_evasions() { if ((seeScore = pos.see_sign(m)) < 0) it->score = seeScore - History::MaxValue; // Be sure we are at the bottom else if (pos.is_capture(m)) - it->score = PieceValue[Mg][pos.piece_on(to_sq(m))] + it->score = PieceValue[MG][pos.piece_on(to_sq(m))] - type_of(pos.piece_moved(m)) + History::MaxValue; else it->score = H.value(pos.piece_moved(m), to_sq(m));