X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=4e04d0745ed6caf86c1d8a87eb5baee10a8fbdd1;hb=436fa5c8fa5302f69a83ad28491702c5dc3d4af7;hp=30abecd0ed563df77dd681af6f7429e1654b7bfc;hpb=8df816f86936ead437c0f2c54fd697d1c4627bd5;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 30abecd0..4e04d074 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2332,7 +2332,7 @@ namespace { return false; // Case 4: Don't prune moves with good history. - if (!H.ok_to_prune(pos.piece_on(move_from(m)), m, d)) + if (!H.ok_to_prune(pos.piece_on(mfrom), mto, d)) return false; // Case 5: If the moving piece in the threatened move is a slider, don't @@ -2379,13 +2379,13 @@ namespace { void update_history(const Position& pos, Move m, Depth depth, Move movesSearched[], int moveCount) { - H.success(pos.piece_on(move_from(m)), m, depth); + H.success(pos.piece_on(move_from(m)), move_to(m), depth); for (int i = 0; i < moveCount - 1; i++) { assert(m != movesSearched[i]); if (ok_to_history(pos, movesSearched[i])) - H.failure(pos.piece_on(move_from(movesSearched[i])), movesSearched[i]); + H.failure(pos.piece_on(move_from(movesSearched[i])), move_to(movesSearched[i])); } }