stat_bonus and stat_malus formulas #5034
PavelChess
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
search.cpp:
// History and stats update bonus, based on depth
int stat_bonus(Depth d) { return std::min(253 * d - 356, 1117); }
// History and stats update malus, based on depth
int stat_malus(Depth d) { return std::min(517 * d - 308, 1206); }
Also possible to do it like this:
const int stat_bonus_Table(5) {-103, 150, 403, 656, 909}
int stat_bonus(Depth d) { return d>5 ? 1117 : stat_bonus_Table(d) ; }
Does this way give speedup because of removing 2 arithmetic operations, especially multiplication , and instead of this getting result from precompiled table?
And in addition, by this way the function may be tuned more accurately then linear formula.
Beta Was this translation helpful? Give feedback.
All reactions