From 4f96f420a33422d3ab09b7a1b9fada9af3d021d7 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 18 Aug 2010 15:20:24 +0100 Subject: [PATCH] Store in TT with depth == -OnePly instead of -1 When depth < DEPTH_ZERO we store with the same depth all the positions, use -OnePly instead of -1 for consistency with depth arithmetic. No functional change. Signed-off-by: Marco Costalba --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 8c941794..032ff403 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1546,7 +1546,7 @@ namespace { return value_mated_in(ply); // Update transposition table - Depth d = (depth == DEPTH_ZERO ? DEPTH_ZERO : Depth(-1)); + Depth d = (depth == DEPTH_ZERO ? DEPTH_ZERO : DEPTH_ZERO - ONE_PLY); ValueType vt = (bestValue <= oldAlpha ? VALUE_TYPE_UPPER : bestValue >= beta ? VALUE_TYPE_LOWER : VALUE_TYPE_EXACT); TT.store(pos.get_key(), value_to_tt(bestValue, ply), vt, d, ss->bestMove, ss->eval, ei.kingDanger[pos.side_to_move()]); -- 2.39.2