X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmovepick.cpp;h=86eb98aa64401d4c32f994d22e67e79c907c5795;hb=eb07775583c39893bc6eb65a40b5f62a7799deee;hp=d8ab68e76aab3719aee7e29749071b5edf7f1841;hpb=7accf07c0b9cb3e2b932da5dd11b7d321745895e;p=stockfish diff --git a/src/movepick.cpp b/src/movepick.cpp index d8ab68e7..86eb98aa 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); } @@ -114,7 +114,8 @@ void MovePicker::score() { m.value = (*mainHistory)[pos.side_to_move()][from_to(m)] + (*continuationHistory[0])[pos.moved_piece(m)][to_sq(m)] + (*continuationHistory[1])[pos.moved_piece(m)][to_sq(m)] - + (*continuationHistory[3])[pos.moved_piece(m)][to_sq(m)]; + + (*continuationHistory[3])[pos.moved_piece(m)][to_sq(m)] + + (*continuationHistory[5])[pos.moved_piece(m)][to_sq(m)] / 2; else // Type == EVASIONS {