From ae6157fcf33f840361acb24f98ea37299b3eaa36 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Fri, 27 Nov 2009 11:54:07 +0100 Subject: [PATCH] Better document previous patch If tte->move() != MOVE_NONE then tte->move() == ttMove What could happen is that we have a ttMove without a tte, or, we have a tte but tte->move() == MOVE_NONE No functional change. Signed-off-by: Marco Costalba --- src/search.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 7eb04308..7ffdadcf 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1139,9 +1139,8 @@ namespace { ttMove = ss[ply].pv[ply]; tte = TT.retrieve(pos.get_key()); - // Following assert could fail, for instance when we have - // moveCount == 0 we return without saving a TT entry. - /* assert(tte); */ + // If tte->move() != MOVE_NONE then it equals ttMove + assert(!(tte && tte->move()) || tte->move() == ttMove); } // Initialize a MovePicker object for the current position, and prepare @@ -1170,8 +1169,6 @@ namespace { // To verify this we do a reduced search on all the other moves but the ttMove, // if result is lower then TT value minus a margin then we assume ttMove is the // only one playable. It is a kind of relaxed single reply extension. - // Note that could be ttMove != tte->move() due to IID, so we always use tte->move() - // to avoid aliases when we probe tte->depth() and tte->type() if ( depth >= 8 * OnePly && tte && move == tte->move() @@ -1476,8 +1473,6 @@ namespace { // To verify this we do a reduced search on all the other moves but the ttMove, // if result is lower then TT value minus a margin then we assume ttMove is the // only one playable. It is a kind of relaxed single reply extension. - // Note that could be ttMove != tte->move() due to IID, so we always use tte->move() - // to avoid aliases when we probe tte->depth() and tte->type() if ( depth >= 8 * OnePly && tte && move == tte->move() -- 2.39.2