From 6b3eccea07c83110ec6c74fa5a9cc511b9637c5e Mon Sep 17 00:00:00 2001 From: PikaCat Date: Tue, 23 Jul 2024 09:55:58 +0800 Subject: [PATCH] Revert "Allow ttValue in qsearch" This reverts commit 3f8aa4a8bf770d8debb186802133855e161bc29f. Since the clamping with probcutbeta, the position can now be found as a mate. --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index a44b9ab0..af4c393a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1401,7 +1401,7 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta, to_corrected_static_eval(unadjustedStaticEval, *thisThread, pos); // ttValue can be used as a better position evaluation (~13 Elo) - if (ttData.value != VALUE_NONE + if (std::abs(ttData.value) < VALUE_MATE_IN_MAX_PLY && (ttData.bound & (ttData.value > bestValue ? BOUND_LOWER : BOUND_UPPER))) bestValue = ttData.value; }