From a43f633c19c43b43ec7a5e460eb91b7abcf59e3a Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 26 Nov 2014 12:56:08 +0100 Subject: [PATCH] Rewrite TBScore in uci_pv() Streamline the code and make it understandable. No functional change. Resolves #135 --- src/search.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index fb9bc17a..0005391f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1444,14 +1444,8 @@ moves_loop: // When in check and at SpNode search starts from here Depth d = updated ? depth : depth - ONE_PLY; Value v = updated ? RootMoves[i].score : RootMoves[i].prevScore; - bool tb = RootInTB; - if (tb) - { - if (abs(v) >= VALUE_MATE - MAX_PLY) - tb = false; - else - v = TBScore; - } + bool tb = RootInTB && abs(v) < VALUE_MATE - MAX_PLY; + v = tb ? TBScore : v; if (ss.rdbuf()->in_avail()) // Not at first line ss << "\n"; -- 2.39.2