]> git.sesse.net Git - stockfish/blobdiff - src/movepick.h
Simplify away non-normal moves in SEE
[stockfish] / src / movepick.h
index d6451f6bf0ad4575212802a1708c4792a2ce5887..66fc1bdba4a929bd1680eeb5715a9786581881f2 100644 (file)
@@ -38,12 +38,8 @@ struct StatBoards : public std::array<std::array<T, Size2>, Size1> {
 
   void update(T& entry, int bonus, const int D) {
 
-    assert([&]{
-      int v = entry + bonus * 32 - entry * abs(bonus) / D;
-      return INT16_MIN < v && v < INT16_MAX;
-    }());
-
-    assert(abs(bonus) <= D); // Consistency check for below formula
+    assert(abs(bonus) <= D); // Ensure range is [-32 * D, 32 * D]
+    assert(abs(32 * D) < INT16_MAX); // Ensure we don't overflow
 
     entry += bonus * 32 - entry * abs(bonus) / D;
 
@@ -98,7 +94,7 @@ public:
   MovePicker(const MovePicker&) = delete;
   MovePicker& operator=(const MovePicker&) = delete;
   MovePicker(const Position&, Move, Value);
-  MovePicker(const Position&, Move, Depth, const ButterflyHistory*, const PieceToHistory**, Square);
+  MovePicker(const Position&, Move, Depth, const ButterflyHistory*, Square);
   MovePicker(const Position&, Move, Depth, const ButterflyHistory*, const PieceToHistory**, Move, Move*);
   Move next_move(bool skipQuiets = false);