mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
VLTC tuning
Tuning some parameters that scale well with longer time control: Failed STC: https://tests.stockfishchess.org/tests/view/6313424d8202a039920e130a LLR: -2.94 (-2.94,2.94) <-1.75,0.25> Total: 42680 W: 11231 L: 11540 D: 19909 Ptnml(0-2): 191, 5008, 11232, 4737, 172 Passed LTC: https://tests.stockfishchess.org/tests/view/6311e2cd874169ca52ae7933 LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 53448 W: 14782 L: 14437 D: 24229 Ptnml(0-2): 101, 5214, 15740, 5577, 92 Passed VLTC: https://tests.stockfishchess.org/tests/view/6312530cfa99a92e3002c927 LLR: 2.95 (-2.94,2.94) <0.50,2.50> Total: 123336 W: 33465 L: 33007 D: 56864 Ptnml(0-2): 38, 11466, 38204, 11920, 40 closes https://github.com/official-stockfish/Stockfish/pull/4154 Bench: 5609606
This commit is contained in:
parent
a4d18d23a9
commit
5eeb96d0e7
1 changed files with 13 additions and 13 deletions
|
@ -63,7 +63,7 @@ namespace {
|
||||||
|
|
||||||
// Futility margin
|
// Futility margin
|
||||||
Value futility_margin(Depth d, bool improving) {
|
Value futility_margin(Depth d, bool improving) {
|
||||||
return Value(168 * (d - improving));
|
return Value(174 * (d - improving));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reductions lookup table, initialized at startup
|
// Reductions lookup table, initialized at startup
|
||||||
|
@ -362,7 +362,7 @@ void Thread::search() {
|
||||||
trend = (us == WHITE ? make_score(tr, tr / 2)
|
trend = (us == WHITE ? make_score(tr, tr / 2)
|
||||||
: -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] = Value(opt);
|
||||||
optimism[~us] = -optimism[us];
|
optimism[~us] = -optimism[us];
|
||||||
}
|
}
|
||||||
|
@ -778,7 +778,7 @@ namespace {
|
||||||
// return a fail low.
|
// return a fail low.
|
||||||
if ( !PvNode
|
if ( !PvNode
|
||||||
&& depth <= 7
|
&& depth <= 7
|
||||||
&& eval < alpha - 348 - 258 * depth * depth)
|
&& eval < alpha - 341 - 267 * depth * depth)
|
||||||
{
|
{
|
||||||
value = qsearch<NonPV>(pos, ss, alpha - 1, alpha);
|
value = qsearch<NonPV>(pos, ss, alpha - 1, alpha);
|
||||||
if (value < alpha)
|
if (value < alpha)
|
||||||
|
@ -797,7 +797,7 @@ namespace {
|
||||||
// Step 9. Null move search with verification search (~22 Elo)
|
// Step 9. Null move search with verification search (~22 Elo)
|
||||||
if ( !PvNode
|
if ( !PvNode
|
||||||
&& (ss-1)->currentMove != MOVE_NULL
|
&& (ss-1)->currentMove != MOVE_NULL
|
||||||
&& (ss-1)->statScore < 14695
|
&& (ss-1)->statScore < 15344
|
||||||
&& eval >= beta
|
&& eval >= beta
|
||||||
&& eval >= ss->staticEval
|
&& eval >= ss->staticEval
|
||||||
&& ss->staticEval >= beta - 15 * depth - improvement / 15 + 201 + complexity / 24
|
&& ss->staticEval >= beta - 15 * depth - improvement / 15 + 201 + complexity / 24
|
||||||
|
@ -808,7 +808,7 @@ namespace {
|
||||||
assert(eval - beta >= 0);
|
assert(eval - beta >= 0);
|
||||||
|
|
||||||
// Null move dynamic reduction based on depth, eval and complexity of position
|
// 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->currentMove = MOVE_NULL;
|
||||||
ss->continuationHistory = &thisThread->continuationHistory[0][0][NO_PIECE][0];
|
ss->continuationHistory = &thisThread->continuationHistory[0][0][NO_PIECE][0];
|
||||||
|
@ -844,7 +844,7 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
probCutBeta = beta + 179 - 46 * improving;
|
probCutBeta = beta + 173 - 46 * improving;
|
||||||
|
|
||||||
// Step 10. ProbCut (~4 Elo)
|
// Step 10. ProbCut (~4 Elo)
|
||||||
// If we have a good enough capture and a reduced search returns a value
|
// If we have a good enough capture and a reduced search returns a value
|
||||||
|
@ -906,9 +906,9 @@ namespace {
|
||||||
return qsearch<PV>(pos, ss, alpha, beta);
|
return qsearch<PV>(pos, ss, alpha, beta);
|
||||||
|
|
||||||
if ( cutNode
|
if ( cutNode
|
||||||
&& depth >= 8
|
&& depth >= 9
|
||||||
&& !ttMove)
|
&& !ttMove)
|
||||||
depth--;
|
depth -= 2;
|
||||||
|
|
||||||
moves_loop: // When in check, search starts here
|
moves_loop: // When in check, search starts here
|
||||||
|
|
||||||
|
@ -1009,7 +1009,7 @@ moves_loop: // When in check, search starts here
|
||||||
&& !PvNode
|
&& !PvNode
|
||||||
&& lmrDepth < 6
|
&& lmrDepth < 6
|
||||||
&& !ss->inCheck
|
&& !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)
|
+ captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))] / 6 < alpha)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1173,7 +1173,7 @@ moves_loop: // When in check, search starts here
|
||||||
+ (*contHist[0])[movedPiece][to_sq(move)]
|
+ (*contHist[0])[movedPiece][to_sq(move)]
|
||||||
+ (*contHist[1])[movedPiece][to_sq(move)]
|
+ (*contHist[1])[movedPiece][to_sq(move)]
|
||||||
+ (*contHist[3])[movedPiece][to_sq(move)]
|
+ (*contHist[3])[movedPiece][to_sq(move)]
|
||||||
- 4334;
|
- 4560;
|
||||||
|
|
||||||
// Decrease/increase reduction for moves with a good/bad history (~30 Elo)
|
// Decrease/increase reduction for moves with a good/bad history (~30 Elo)
|
||||||
r -= ss->statScore / 15914;
|
r -= ss->statScore / 15914;
|
||||||
|
@ -1188,7 +1188,7 @@ moves_loop: // When in check, search starts here
|
||||||
// Do full depth search when reduced LMR search fails high
|
// Do full depth search when reduced LMR search fails high
|
||||||
if (value > alpha && d < newDepth)
|
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);
|
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth + doDeeperSearch, !cutNode);
|
||||||
|
|
||||||
int bonus = value > alpha ? stat_bonus(newDepth)
|
int bonus = value > alpha ? stat_bonus(newDepth)
|
||||||
|
@ -1337,14 +1337,14 @@ moves_loop: // When in check, search starts here
|
||||||
quietsSearched, quietCount, capturesSearched, captureCount, depth);
|
quietsSearched, quietCount, capturesSearched, captureCount, depth);
|
||||||
|
|
||||||
// Bonus for prior countermove that caused the fail low
|
// Bonus for prior countermove that caused the fail low
|
||||||
else if ( (depth >= 4 || PvNode)
|
else if ( (depth >= 5 || PvNode)
|
||||||
&& !priorCapture)
|
&& !priorCapture)
|
||||||
{
|
{
|
||||||
//Assign extra bonus if current node is PvNode or cutNode
|
//Assign extra bonus if current node is PvNode or cutNode
|
||||||
//or fail low was really bad
|
//or fail low was really bad
|
||||||
bool extraBonus = PvNode
|
bool extraBonus = PvNode
|
||||||
|| cutNode
|
|| cutNode
|
||||||
|| bestValue < alpha - 70 * depth;
|
|| bestValue < alpha - 66 * depth;
|
||||||
|
|
||||||
update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus));
|
update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue