X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=3897f4c10048bf7c164d67c4c2e9858e597c3994;hp=b20d67105d796f51260660c98e4d61cd7ab1d3b3;hb=ce5d9eb19da890c77d8ef00e078c60edc3e8e4aa;hpb=cd1cc39b04f261f74250285d19c5f4916abdc8c9 diff --git a/src/movepick.cpp b/src/movepick.cpp index b20d6710..3897f4c1 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -1,7 +1,7 @@ /* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) - Copyright (C) 2008 Marco Costalba + Copyright (C) 2008-2009 Marco Costalba Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -264,7 +264,7 @@ void MovePicker::score_noncaptures() { else if (m == killer2) hs = HistoryMax + 1; else - hs = H.move_ordering_score(pos.piece_on(move_from(m)), m); + hs = H.move_ordering_score(pos.piece_on(move_from(m)), move_to(m)); // Ensure history is always preferred to pst if (hs > 0) @@ -287,7 +287,7 @@ void MovePicker::score_evasions() { int seeScore = pos.see(m); moves[i].score = (seeScore >= 0)? seeScore + HistoryMax : seeScore; } else - moves[i].score = H.move_ordering_score(pos.piece_on(move_from(m)), m); + moves[i].score = H.move_ordering_score(pos.piece_on(move_from(m)), move_to(m)); } }