Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VLTC tuning #4154

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace {

// 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
Expand Down Expand Up @@ -362,7 +362,7 @@ void Thread::search() {
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];
}
Expand Down Expand Up @@ -778,7 +778,7 @@ namespace {
// 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)
Expand All @@ -797,7 +797,7 @@ namespace {
// 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
Expand All @@ -808,7 +808,7 @@ namespace {
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];
Expand Down Expand Up @@ -844,7 +844,7 @@ namespace {
}
}

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
Expand Down Expand Up @@ -906,9 +906,9 @@ namespace {
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

Expand Down Expand Up @@ -1009,7 +1009,7 @@ namespace {
&& !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;

Expand Down Expand Up @@ -1173,7 +1173,7 @@ namespace {
+ (*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;
Expand All @@ -1188,7 +1188,7 @@ namespace {
// 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)
Expand Down Expand Up @@ -1337,14 +1337,14 @@ namespace {
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));
}
Expand Down