Skip to content

Commit

Permalink
62 -> 58 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
robertnurnberg committed Mar 17, 2024
1 parent 19b4501 commit 0a52870
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ std::pair<double, double> win_rate_params(const Position& pos) {
int material = pos.count<PAWN>() + 3 * pos.count<KNIGHT>() + 3 * pos.count<BISHOP>()
+ 5 * pos.count<ROOK>() + 9 * pos.count<QUEEN>();

// The fitted model only uses data for material counts in [10, 78], and is anchored at count 62.
double m = std::clamp(material, 10, 78) / 62.0;
// The fitted model only uses data for material counts in [10, 78], and is anchored at count 58.
double m = std::clamp(material, 10, 78) / 58.0;

// Return a = p_a(material) and b = p_b(material), see github.com/official-stockfish/WDL_model
constexpr double as[] = {-185.71965483, 504.85014385, -438.58295743, 474.04604627};
Expand Down

0 comments on commit 0a52870

Please sign in to comment.