mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Update WDL model for NNUE
This updates the WDL model based on the LTC statistics in June this year (10M games), so from pre-NNUE to NNUE based results. (for old results see, https://github.com/official-stockfish/Stockfish/pull/2778) As before the fit by the model to the data is quite good. closes https://github.com/official-stockfish/Stockfish/pull/3582 No functional change
This commit is contained in:
parent
e47b74457e
commit
dc4983327d
1 changed files with 3 additions and 3 deletions
|
@ -207,13 +207,13 @@ namespace {
|
||||||
// Coefficients of a 3rd order polynomial fit based on fishtest data
|
// Coefficients of a 3rd order polynomial fit based on fishtest data
|
||||||
// for two parameters needed to transform eval to the argument of a
|
// for two parameters needed to transform eval to the argument of a
|
||||||
// logistic function.
|
// logistic function.
|
||||||
double as[] = {-8.24404295, 64.23892342, -95.73056462, 153.86478679};
|
double as[] = {-3.68389304, 30.07065921, -60.52878723, 149.53378557};
|
||||||
double bs[] = {-3.37154371, 28.44489198, -56.67657741, 72.05858751};
|
double bs[] = {-2.0181857, 15.85685038, -29.83452023, 47.59078827};
|
||||||
double a = (((as[0] * m + as[1]) * m + as[2]) * m) + as[3];
|
double a = (((as[0] * m + as[1]) * m + as[2]) * m) + as[3];
|
||||||
double b = (((bs[0] * m + bs[1]) * m + bs[2]) * m) + bs[3];
|
double b = (((bs[0] * m + bs[1]) * m + bs[2]) * m) + bs[3];
|
||||||
|
|
||||||
// Transform eval to centipawns with limited range
|
// Transform eval to centipawns with limited range
|
||||||
double x = std::clamp(double(100 * v) / PawnValueEg, -1000.0, 1000.0);
|
double x = std::clamp(double(100 * v) / PawnValueEg, -2000.0, 2000.0);
|
||||||
|
|
||||||
// Return win rate in per mille (rounded to nearest)
|
// Return win rate in per mille (rounded to nearest)
|
||||||
return int(0.5 + 1000 / (1 + std::exp((a - x) / b)));
|
return int(0.5 + 1000 / (1 + std::exp((a - x) / b)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue