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)
This commit is contained in:
VoyagerOne
2018-08-16 23:58:48 +02:00
committed by Stéphane Nicolet
parent d0f09de2d2
commit 96c3a1f2ec

View File

@@ -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,