From a8f457d4250a527f6b391f22a2f61f73272201fa Mon Sep 17 00:00:00 2001 From: Joona Kiiski Date: Mon, 17 Jan 2011 01:29:44 +0200 Subject: [PATCH] Different searchedMoves system After 8751 games on russian cluster Mod- Orig: 1426 - 1323 - 6002 ELO +4 (+- 2.9) LOS 86% Signed-off-by: Marco Costalba --- src/search.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 6d75cc3d..a3238a33 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -793,7 +793,7 @@ namespace { Value refinedValue, nullValue, futilityBase, futilityValueScaled; // Non-PV specific bool isPvMove, isCheck, singleEvasion, singularExtensionNode, moveIsCheck, captureOrPromotion, dangerous; bool mateThreat = false; - int moveCount = 0; + int moveCount = 0, playedMoveCount = 0; int threadID = pos.thread(); SplitPoint* sp = NULL; @@ -1027,7 +1027,7 @@ split_point_start: // At split points actual search starts from here else if (move == excludedMove) continue; else - movesSearched[moveCount++] = move; + moveCount++; if (Root) { @@ -1142,6 +1142,9 @@ split_point_start: // At split points actual search starts from here // Step 13. Make the move pos.do_move(move, st, ci, moveIsCheck); + if (!SpNode && !captureOrPromotion) + movesSearched[playedMoveCount++] = move; + // Step extra. pv search (only in PV nodes) // The first move in list is the expected PV if (isPvMove) @@ -1321,7 +1324,7 @@ split_point_start: // At split points actual search starts from here if ( bestValue >= beta && !pos.move_is_capture_or_promotion(move)) { - update_history(pos, move, depth, movesSearched, moveCount); + update_history(pos, move, depth, movesSearched, playedMoveCount); update_killers(move, ss->killers); } } @@ -1833,8 +1836,7 @@ split_point_start: // At split points actual search starts from here assert(m != move); - if (!pos.move_is_capture_or_promotion(m)) - H.update(pos.piece_on(move_from(m)), move_to(m), -bonus); + H.update(pos.piece_on(move_from(m)), move_to(m), -bonus); } } @@ -1844,11 +1846,11 @@ split_point_start: // At split points actual search starts from here void update_killers(Move m, Move killers[]) { - if (m == killers[0]) - return; - - killers[1] = killers[0]; - killers[0] = m; + if (m != killers[0]) + { + killers[1] = killers[0]; + killers[0] = m; + } } -- 2.39.2