X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=8a7e9ae3c9f247a70e2947c7e552254d4d239bcc;hp=9ada404b299bacc6c5c127c66eab4ce32a303987;hb=2b1324eddbdbf65b6fb03307a4c4bd216e0e634e;hpb=67338e6f322b8f8ec0d897815e16a87937efc9b0 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)); } }