From b96079f86be295312859c67a1669283832067674 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Tue, 10 Dec 2013 07:05:06 +0100 Subject: [PATCH] Sync history and counter moves updating Change updating rule after a TT hit to match the same one at the end of the search. Small change in functionality, but we want to have uniform rules in the code. bench: 7767864 --- src/search.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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); -- 2.39.2