X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=87c3f6fa153939bb8da252f1b0b9ed546692b24a;hp=d8ab68e76aab3719aee7e29749071b5edf7f1841;hb=05f7d59a9a27d9f8bce8bde4e9fed7ecefeb03b9;hpb=332b90455bf613e65cf2abe46594e12fc7a27f71 diff --git a/src/movepick.cpp b/src/movepick.cpp index d8ab68e7..87c3f6fa 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -76,9 +76,9 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHist assert(d <= DEPTH_ZERO); stage = pos.checkers() ? EVASION_TT : QSEARCH_TT; - ttMove = ttm - && pos.pseudo_legal(ttm) - && (depth > DEPTH_QS_RECAPTURES || to_sq(ttm) == recaptureSquare) ? ttm : MOVE_NONE; + ttMove = ttm + && (depth > DEPTH_QS_RECAPTURES || to_sq(ttm) == recaptureSquare) + && pos.pseudo_legal(ttm) ? ttm : MOVE_NONE; stage += (ttMove == MOVE_NONE); } @@ -91,8 +91,8 @@ MovePicker::MovePicker(const Position& p, Move ttm, Value th, const CapturePiece stage = PROBCUT_TT; ttMove = ttm - && pos.pseudo_legal(ttm) && pos.capture(ttm) + && pos.pseudo_legal(ttm) && pos.see_ge(ttm, threshold) ? ttm : MOVE_NONE; stage += (ttMove == MOVE_NONE); }