From 5c3ebd1fbfc8cb623dd49aabd03c33a7fcbaf127 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 27 Jun 2010 15:13:22 +0100 Subject: [PATCH] Extract only exact scores to get the PV This should allow to skip overwritten nodes because only in PV we store in TT with VALUE_TYPE_EXACT flag. Test result for the whole series is: After 3627 games at 5" Mod vs Orig +1037 =1605 -985 +5 ELO After 1311 games at 1'+0" Mod vs Orig +234 =850 -227 +2 ELO Signed-off-by: Marco Costalba --- src/tt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tt.cpp b/src/tt.cpp index b7d47e74..f3af6432 100644 --- a/src/tt.cpp +++ b/src/tt.cpp @@ -197,9 +197,11 @@ void TranspositionTable::extract_pv(const Position& pos, Move bestMove, Move pv[ pv[ply] = bestMove; p.do_move(pv[ply++], st); - // Try to add moves from TT while possible + // Extract moves from TT when possible. We try hard to always + // get a ponder move, that's the reason of ply < 2 conditions. while ( (tte = retrieve(p.get_key())) != NULL && tte->move() != MOVE_NONE + && (tte->type() == VALUE_TYPE_EXACT || ply < 2) && move_is_legal(p, tte->move()) && (!p.is_draw() || ply < 2) && ply < PLY_MAX) -- 2.39.2