X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmovepick.h;h=412c08e2861ab1bac41868a20b8b6c7639db986c;hb=77b4f4c2e735a3f1173d74ce904db9dae262a682;hp=b281bd42afcfb559a65fb7e5725fbb803168c713;hpb=42b77ea7eecaf5f31bf87c7075945273685aa4f5;p=stockfish diff --git a/src/movepick.h b/src/movepick.h index b281bd42..412c08e2 100644 --- a/src/movepick.h +++ b/src/movepick.h @@ -39,7 +39,7 @@ template struct Stats { - static const Value Max = Value(250); + static const Value Max = Value(1<<28); const T* operator[](Piece pc) const { return table[pc]; } T* operator[](Piece pc) { return table[pc]; } @@ -53,8 +53,8 @@ struct Stats { void update(Piece pc, Square to, Value v) { - if (abs(table[pc][to] + v) < Max) - table[pc][to] += v; + table[pc][to] -= table[pc][to] * std::min(abs(int(v)), 512) / 512; + table[pc][to] += int(v) * 64; } private: