From: VoyagerOne Date: Thu, 16 Aug 2018 21:58:48 +0000 (+0200) Subject: Mix search stats with evaluation X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=96c3a1f2eca1dfb96fdddc03630e6d984c358a2b Mix search stats with evaluation Mix search stats with evaluation: if the opponent's move has a good historyStat, then decrease the evaluation of the internal node a bit for the pruning decisions during search. STC; LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 72083 W: 15683 L: 15203 D: 41197 http://tests.stockfishchess.org/tests/view/5b74c3ea0ebc5902bdba7d41 LTC: LLR: 2.95 (-2.94,2.94) [0.00,5.00] Total: 29104 W: 4867 L: 4630 D: 19607 http://tests.stockfishchess.org/tests/view/5b7565000ebc5902bdba851b Closes https://github.com/official-stockfish/Stockfish/pull/1738 Bench: 4514101 ----------- How to continue from there? • the use of the previous stat score can probably be simplified in lines 587 and 716 • we could try to use a continuous bonus based on the previous stat score, instead of just a fixed offset of -10 when the opponent previous move was good. ---------- Comments by Stefan Geschwentner: Interesting idea. Because only the eval in search is tweak this should only influence the eval and static eval used at inner nodes, and not on the return search value (which comes in the end from quiescence search), except through saving in TT followed by a TT cutoff. So essentialy this effects diverse pruning/reduction parts -- eval and static eval are lowered for good opponent moves: • tt cutoff (ttValue) • improving (static eval) • more razoring (eval) • less futility pruning (eval) • less null move pruning (eval + static eval) (but with little more depth) • more probcut (static eval) • more move futility pruning (static eval) --- diff --git a/src/search.cpp b/src/search.cpp index b34d4ae7..d43a875f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -584,7 +584,8 @@ namespace { if ( Threads.stop.load(std::memory_order_relaxed) || pos.is_draw(ss->ply) || ss->ply >= MAX_PLY) - return (ss->ply >= MAX_PLY && !inCheck) ? evaluate(pos) : VALUE_DRAW; + return (ss->ply >= MAX_PLY && !inCheck) ? evaluate(pos) - 10 * ((ss-1)->statScore > 0) + : VALUE_DRAW; // Step 3. Mate distance pruning. Even if we mate at the next move our score // would be at best mate_in(ss->ply+1), but if alpha is already bigger because @@ -712,7 +713,7 @@ namespace { { // Never assume anything on values stored in TT if ((ss->staticEval = eval = tte->eval()) == VALUE_NONE) - eval = ss->staticEval = evaluate(pos); + eval = ss->staticEval = evaluate(pos) - 10 * ((ss-1)->statScore > 0); // Can ttValue be used as a better position evaluation? if ( ttValue != VALUE_NONE @@ -722,7 +723,7 @@ namespace { else { ss->staticEval = eval = - (ss-1)->currentMove != MOVE_NULL ? evaluate(pos) + (ss-1)->currentMove != MOVE_NULL ? evaluate(pos) - 10 * ((ss-1)->statScore > 0) : -(ss-1)->staticEval + 2 * Eval::Tempo; tte->save(posKey, VALUE_NONE, BOUND_NONE, DEPTH_NONE, MOVE_NONE,