X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=e2032638b8650ce112968c4329ea4b08e77ee10e;hp=97ed196acede459112754e6892f2b88fba8a75cc;hb=e86468cc631ede99530998a6ad269e328f25f808;hpb=e7bad2687a26655e128fec04b58bbcdaaaf910cd diff --git a/src/search.cpp b/src/search.cpp index 97ed196a..e2032638 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1469,6 +1469,18 @@ namespace { // Update transposition table TT.store(pos, value_to_tt(bestValue, ply), depth, MOVE_NONE, VALUE_TYPE_EXACT); + // Update killers only for good check moves + Move m = ss[ply].currentMove; + if (alpha >= beta && ok_to_history(pos, m)) // Only non capture moves are considered + { + // Wrong to update history when depth is <= 0 + + if (m != ss[ply].killer1) + { + ss[ply].killer2 = ss[ply].killer1; + ss[ply].killer1 = m; + } + } return bestValue; }