From: Marco Costalba Date: Sun, 26 Oct 2008 12:47:31 +0000 (+0100) Subject: Effectively use MVV/LVA in MovePicker::score_captures() X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=714069e24839b5111ccf93a3170763c4b383f2dd;hp=88885399f4a8bdc579c2b75cd892e78821631c63 Effectively use MVV/LVA in MovePicker::score_captures() Signed-off-by: Marco Costalba --- diff --git a/src/movepick.cpp b/src/movepick.cpp index 2867e766..5f170297 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -207,7 +207,7 @@ void MovePicker::score_captures() { // capture, capturing a more valuable (but sufficiently defended) piece // first usually doesn't hurt. The opponent will have to recapture, and // the hanging piece will still be hanging (except in the unusual cases - // where it is possible to recapture with the hanging piece). Exchanging + // where it is possible to recapture with the hanging piece). Exchanging // big pieces before capturing a hanging piece probably helps to reduce // the subtree size. for (int i = 0; i < numOfMoves; i++) @@ -278,7 +278,7 @@ void MovePicker::score_qcaptures() { moves[i].score = QueenValueMidgame; else moves[i].score = int(pos.midgame_value_of_piece_on(move_to(m))) - -int(pos.midgame_value_of_piece_on(move_to(m))) / 64; + -int(pos.type_of_piece_on(move_from(m))); } }