mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 08:36:33 +08:00
Better document how history works
Both with added comment and changing the API to reflect that only destination square and moved piece is important for history. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user