// Futility margin
Value futility_margin(Depth d, bool improving) {
- return Value(168 * (d - improving));
+ return Value(174 * (d - improving));
}
// Reductions lookup table, initialized at startup
trend = (us == WHITE ? make_score(tr, tr / 2)
: -make_score(tr, tr / 2));
- int opt = sigmoid(prev, 8, 17, 144, 13966, 183);
+ int opt = sigmoid(prev, 8, 17, 144, 15012, 183);
optimism[ us] = Value(opt);
optimism[~us] = -optimism[us];
}
// return a fail low.
if ( !PvNode
&& depth <= 7
- && eval < alpha - 348 - 258 * depth * depth)
+ && eval < alpha - 341 - 267 * depth * depth)
{
value = qsearch<NonPV>(pos, ss, alpha - 1, alpha);
if (value < alpha)
// Step 9. Null move search with verification search (~22 Elo)
if ( !PvNode
&& (ss-1)->currentMove != MOVE_NULL
- && (ss-1)->statScore < 14695
+ && (ss-1)->statScore < 15344
&& eval >= beta
&& eval >= ss->staticEval
&& ss->staticEval >= beta - 15 * depth - improvement / 15 + 201 + complexity / 24
assert(eval - beta >= 0);
// Null move dynamic reduction based on depth, eval and complexity of position
- Depth R = std::min(int(eval - beta) / 147, 5) + depth / 3 + 4 - (complexity > 650);
+ Depth R = std::min(int(eval - beta) / 152, 5) + depth / 3 + 4 - (complexity > 650);
ss->currentMove = MOVE_NULL;
ss->continuationHistory = &thisThread->continuationHistory[0][0][NO_PIECE][0];
}
}
- probCutBeta = beta + 179 - 46 * improving;
+ probCutBeta = beta + 173 - 46 * improving;
// Step 10. ProbCut (~4 Elo)
// If we have a good enough capture and a reduced search returns a value
return qsearch<PV>(pos, ss, alpha, beta);
if ( cutNode
- && depth >= 8
+ && depth >= 9
&& !ttMove)
- depth--;
+ depth -= 2;
moves_loop: // When in check, search starts here
&& !PvNode
&& lmrDepth < 6
&& !ss->inCheck
- && ss->staticEval + 281 + 179 * lmrDepth + PieceValue[EG][pos.piece_on(to_sq(move))]
+ && ss->staticEval + 277 + 187 * lmrDepth + PieceValue[EG][pos.piece_on(to_sq(move))]
+ captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))] / 6 < alpha)
continue;
+ (*contHist[0])[movedPiece][to_sq(move)]
+ (*contHist[1])[movedPiece][to_sq(move)]
+ (*contHist[3])[movedPiece][to_sq(move)]
- - 4334;
+ - 4560;
// Decrease/increase reduction for moves with a good/bad history (~30 Elo)
r -= ss->statScore / 15914;
// Do full depth search when reduced LMR search fails high
if (value > alpha && d < newDepth)
{
- const bool doDeeperSearch = value > (alpha + 78 + 11 * (newDepth - d));
+ const bool doDeeperSearch = value > (alpha + 73 + 12 * (newDepth - d));
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth + doDeeperSearch, !cutNode);
int bonus = value > alpha ? stat_bonus(newDepth)
quietsSearched, quietCount, capturesSearched, captureCount, depth);
// Bonus for prior countermove that caused the fail low
- else if ( (depth >= 4 || PvNode)
+ else if ( (depth >= 5 || PvNode)
&& !priorCapture)
{
//Assign extra bonus if current node is PvNode or cutNode
//or fail low was really bad
bool extraBonus = PvNode
|| cutNode
- || bestValue < alpha - 70 * depth;
+ || bestValue < alpha - 66 * depth;
update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus));
}