X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=8a7e9ae3c9f247a70e2947c7e552254d4d239bcc;hp=9ada404b299bacc6c5c127c66eab4ce32a303987;hb=bede30e7a658dbb5e013351c86f77c3fd4bc8537;hpb=b05fbb3733df535a3fdf99e8d832001e57929699 diff --git a/src/movepick.cpp b/src/movepick.cpp index 9ada404b..8a7e9ae3 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -255,7 +255,7 @@ void MovePicker::score_captures() { { m = cur->move; cur->score = PieceValueMidgame[pos.piece_on(to_sq(m))] - - type_of(pos.piece_on(from_sq(m))); + - type_of(pos.piece_moved(m)); if (is_promotion(m)) cur->score += PieceValueMidgame[Piece(promotion_piece_type(m))]; @@ -294,9 +294,9 @@ void MovePicker::score_evasions() { cur->score = seeScore - History::MaxValue; // Be sure we are at the bottom else if (pos.is_capture(m)) cur->score = PieceValueMidgame[pos.piece_on(to_sq(m))] - - type_of(pos.piece_on(from_sq(m))) + History::MaxValue; + - type_of(pos.piece_moved(m)) + History::MaxValue; else - cur->score = H.value(pos.piece_on(from_sq(m)), to_sq(m)); + cur->score = H.value(pos.piece_moved(m), to_sq(m)); } }