Tune Search Parameters

Parameters Tune, adding also another tunable parameter (npmDiv) to be
variable for different nets (bignet, smallnet, psqtOnly smallnet). P.s:
The changed values are only the parameters where there is agreement
among the different time controls, so in other words, the tunings are
telling us that changing these specific values to this specific
direction is good in all time controls, so there shouldn't be a high
risk of regressing at longer time controls.

Passed STC:
LLR: 2.97 (-2.94,2.94) <0.00,2.00>
Total: 39552 W: 10329 L: 9999 D: 19224
Ptnml(0-2): 156, 4592, 9989, 4844, 195
https://tests.stockfishchess.org/tests/view/661be9a0bd68065432a088c0

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 56394 W: 14439 L: 14078 D: 27877
Ptnml(0-2): 30, 6152, 15480, 6497, 38
https://tests.stockfishchess.org/tests/view/661c746296961e72eb565406

closes https://github.com/official-stockfish/Stockfish/pull/5187

Bench: 1836777
This commit is contained in:
FauziAkram
2024-04-22 14:34:22 +03:00
committed by Disservin
parent ddd250b9d6
commit fcba524793
3 changed files with 35 additions and 35 deletions

View File

@@ -58,14 +58,14 @@ Value Eval::evaluate(const Eval::NNUE::Networks& networks, const Position& pos,
Value nnue = smallNet ? networks.small.evaluate(pos, true, &nnueComplexity, psqtOnly)
: networks.big.evaluate(pos, true, &nnueComplexity, false);
const auto adjustEval = [&](int optDiv, int nnueDiv, int pawnCountConstant, int pawnCountMul,
int npmConstant, int evalDiv, int shufflingConstant,
int shufflingDiv) {
const auto adjustEval = [&](int optDiv, int nnueDiv, int npmDiv, int pawnCountConstant,
int pawnCountMul, int npmConstant, int evalDiv,
int shufflingConstant, int shufflingDiv) {
// Blend optimism and eval with nnue complexity and material imbalance
optimism += optimism * (nnueComplexity + std::abs(simpleEval - nnue)) / optDiv;
nnue -= nnue * (nnueComplexity * 5 / 3) / nnueDiv;
int npm = pos.non_pawn_material() / 64;
int npm = pos.non_pawn_material() / npmDiv;
v = (nnue * (npm + pawnCountConstant + pawnCountMul * pos.count<PAWN>())
+ optimism * (npmConstant + npm))
/ evalDiv;
@@ -76,11 +76,11 @@ Value Eval::evaluate(const Eval::NNUE::Networks& networks, const Position& pos,
};
if (!smallNet)
adjustEval(513, 32395, 919, 11, 145, 1036, 178, 204);
adjustEval(524, 32395, 66, 942, 11, 139, 1058, 178, 204);
else if (psqtOnly)
adjustEval(517, 32857, 908, 7, 155, 1019, 224, 238);
adjustEval(517, 32857, 65, 908, 7, 155, 1006, 224, 238);
else
adjustEval(499, 32793, 903, 9, 147, 1067, 208, 211);
adjustEval(515, 32793, 63, 944, 9, 140, 1067, 206, 206);
// Guarantee evaluation does not hit the tablebase range
v = std::clamp(v, VALUE_TB_LOSS_IN_MAX_PLY + 1, VALUE_TB_WIN_IN_MAX_PLY - 1);