X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=ea332b7be37b4ae4b73be30ea8fa9277d5660ff2;hp=4479c321cbba8c8fd7b4ced8e716c434ffd7fbdc;hb=5e340346db94446587c78e791507ab9e2cffe3fa;hpb=e59d053984466dcea45cdbb60157a32acf132028 diff --git a/src/movepick.cpp b/src/movepick.cpp index 4479c321..ea332b7b 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -77,6 +77,8 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, finished = false; lastBadCapture = badCaptures; + pinned = p.pinned_pieces(pos.side_to_move()); + if (ss && !p.is_check()) { ttMoves[1].move = (ss->mateKiller == ttm)? MOVE_NONE : ss->mateKiller; @@ -86,8 +88,6 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, } else ttMoves[1].move = killers[0].move = killers[1].move = MOVE_NONE; - pinned = p.pinned_pieces(pos.side_to_move()); - if (p.is_check()) phasePtr = EvasionsPhaseTable; else if (d > Depth(0)) @@ -221,7 +221,7 @@ void MovePicker::score_noncaptures() { hs += 1000; // pst based scoring - cur->score = hs + pos.pst_delta(piece, from, to); + cur->score = hs + mg_value(pos.pst_delta(piece, from, to)); } }