From e86468cc631ede99530998a6ad269e328f25f808 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Mon, 10 Nov 2008 11:06:46 +0100 Subject: [PATCH] Use cut-off checks in qsearch as killer moves Killers should not be captures, but checks are not and are produced also in qsearch. Use this information, will be useful for move ordering. Signed-off-by: Marco Costalba --- src/search.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; } -- 2.39.2