void clear() { std::memset(table, 0, sizeof(table)); }
void update(Color c, Move m, Value v) {
- if (abs(int(v)) >= 324)
- return;
-
Square from = from_sq(m);
Square to = to_sq(m);
void update(Piece pc, Square to, Move m) { table[pc][to] = m; }
void update(Piece pc, Square to, Value v) {
- if (abs(int(v)) >= 324)
- return;
-
table[pc][to] -= table[pc][to] * abs(int(v)) / 936;
table[pc][to] += int(v) * 32;
}
// History and stats update bonus, based on depth
Value stat_bonus(Depth depth) {
int d = depth / ONE_PLY ;
- return Value(d * d + 2 * d - 2);
+ return d > 17 ? VALUE_ZERO : Value(d * d + 2 * d - 2);
}
// Skill structure is used to implement strength limit