X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmovepick.cpp;h=794fbde9b83366eb33e074e7b0b7fa921a5e4625;hb=3b14b17664b30933e55d0fb1c8248ddab8b49110;hp=005f85203e6a493f6540d2281b0c78a667bedf4b;hpb=e40b06a0503b44bae5508a371d961914828214b6;p=stockfish diff --git a/src/movepick.cpp b/src/movepick.cpp index 005f8520..794fbde9 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -68,7 +68,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h, endBadCaptures = moves + MAX_MOVES - 1; ss = s; - if (p.in_check()) + if (p.checkers()) phase = EVASION; else @@ -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); @@ -96,7 +96,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h, assert(d <= DEPTH_ZERO); - if (p.in_check()) + if (p.checkers()) phase = EVASION; else if (d > DEPTH_QS_NO_CHECKS) @@ -126,7 +126,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h, MovePicker::MovePicker(const Position& p, Move ttm, const History& h, PieceType pt) : pos(p), H(h), cur(moves), end(moves) { - assert(!pos.in_check()); + assert(!pos.checkers()); phase = PROBCUT;