mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Replace ternary with std::min
equivalent and more readable. closes https://github.com/official-stockfish/Stockfish/pull/5488 No functional change
This commit is contained in:
parent
c755bc1a73
commit
7bb45d05fa
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ Value to_corrected_static_eval(Value v, const Worker& w, const Position& pos) {
|
||||||
int stat_bonus(Depth d) { return std::min(190 * d - 108, 1596); }
|
int stat_bonus(Depth d) { return std::min(190 * d - 108, 1596); }
|
||||||
|
|
||||||
// History and stats update malus, based on depth
|
// History and stats update malus, based on depth
|
||||||
int stat_malus(Depth d) { return (d < 4 ? 736 * d - 268 : 2044); }
|
int stat_malus(Depth d) { return std::min(736 * d - 268, 2044); }
|
||||||
|
|
||||||
// Add a small random component to draw evaluations to avoid 3-fold blindness
|
// Add a small random component to draw evaluations to avoid 3-fold blindness
|
||||||
Value value_draw(size_t nodes) { return VALUE_DRAW - 1 + Value(nodes & 0x2); }
|
Value value_draw(size_t nodes) { return VALUE_DRAW - 1 + Value(nodes & 0x2); }
|
||||||
|
|
Loading…
Add table
Reference in a new issue