bestValue = -VALUE_INFINITE;
ss->currentMove = threatMove = (ss+1)->excludedMove = bestMove = MOVE_NONE;
ss->ply = (ss-1)->ply + 1;
+ ss->futilityMoveCount = 0;
(ss+1)->skipNullMove = false; (ss+1)->reduction = DEPTH_ZERO;
(ss+2)->killers[0] = (ss+2)->killers[1] = MOVE_NONE;
// Never assume anything on values stored in TT
if ( (ss->staticEval = eval = tte->eval_value()) == VALUE_NONE
||(ss->evalMargin = tte->eval_margin()) == VALUE_NONE)
- eval = ss->staticEval = evaluate(pos, ss->evalMargin, &ss->ei);
+ eval = ss->staticEval = evaluate(pos, ss->evalMargin);
// Can ttValue be used as a better position evaluation?
if (ttValue != VALUE_NONE)
}
else
{
- eval = ss->staticEval = evaluate(pos, ss->evalMargin, &ss->ei);
+ eval = ss->staticEval = evaluate(pos, ss->evalMargin);
TT.store(posKey, VALUE_NONE, BOUND_NONE, DEPTH_NONE, MOVE_NONE,
ss->staticEval, ss->evalMargin);
}
&& !inCheck
&& eval - futility_margin(depth, (ss-1)->futilityMoveCount) >= beta
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
+ && abs(eval) < VALUE_KNOWN_WIN
&& pos.non_pawn_material(pos.side_to_move()))
return eval - futility_margin(depth, (ss-1)->futilityMoveCount);
<< " currmovenumber " << moveCount + PVIdx << sync_endl;
}
- ss->futilityMoveCount = 0;
ext = DEPTH_ZERO;
captureOrPromotion = pos.is_capture_or_promotion(move);
givesCheck = pos.move_gives_check(move, ci);
// far in the move list we are to be more aggressive in the child node.
ss->futilityMoveCount = moveCount;
}
+ else
+ ss->futilityMoveCount = 0;
// Check for legality only before to do the move
if (!RootNode && !SpNode && !pos.pl_move_is_legal(move, ci.pinned))
// Never assume anything on values stored in TT
if ( (ss->staticEval = bestValue = tte->eval_value()) == VALUE_NONE
||(ss->evalMargin = tte->eval_margin()) == VALUE_NONE)
- ss->staticEval = bestValue = evaluate(pos, ss->evalMargin, &ss->ei);
+ ss->staticEval = bestValue = evaluate(pos, ss->evalMargin);
}
else
- ss->staticEval = bestValue = evaluate(pos, ss->evalMargin, &ss->ei);
+ ss->staticEval = bestValue = evaluate(pos, ss->evalMargin);
// Stand pat. Return immediately if static value is at least beta
if (bestValue >= beta)