X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=cf791334e5b583e415f4ac11c0f72a2f2b3c4c34;hp=5205126aeba202ac2fb4663bcf9b9e5c4561cac5;hb=b96079f86be295312859c67a1669283832067674;hpb=86347100a5c1113e9306d63a16cde2866839373b diff --git a/src/search.cpp b/src/search.cpp index 5205126a..cf791334 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -573,10 +573,13 @@ namespace { if ( ttValue >= beta && ttMove && !pos.capture_or_promotion(ttMove) - && ttMove != ss->killers[0]) + && !inCheck) { - ss->killers[1] = ss->killers[0]; - ss->killers[0] = ttMove; + if (ss->killers[0] != ttMove) + { + ss->killers[1] = ss->killers[0]; + ss->killers[0] = ttMove; + } Value bonus = Value(int(depth) * int(depth)); History.update(pos.moved_piece(ttMove), to_sq(ttMove), bonus);