]> git.sesse.net Git - stockfish/blobdiff - src/movepick.h
Skip quiet moves based on moveCount pruning threshold and history stats
[stockfish] / src / movepick.h
index ec8b15541ede4194794f22ee9439ddd601eaad43..c19141820e3397804580a06fbc8b02df12e5e7a0 100644 (file)
@@ -39,9 +39,6 @@ struct HistoryStats {
   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);
 
@@ -60,7 +57,7 @@ private:
 /// Entries are stored using only the moving piece and destination square, hence
 /// two moves with different origin but same destination and piece will be
 /// considered identical.
-template<typename T, bool CM = false>
+template<typename T>
 struct Stats {
   const T* operator[](Piece pc) const { return table[pc]; }
   T* operator[](Piece pc) { return table[pc]; }
@@ -68,10 +65,7 @@ struct Stats {
   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)) / (CM ? 936 : 324);
+    table[pc][to] -= table[pc][to] * abs(int(v)) / 936;
     table[pc][to] += int(v) * 32;
   }
 
@@ -80,7 +74,7 @@ private:
 };
 
 typedef Stats<Move> MoveStats;
-typedef Stats<Value, true> CounterMoveStats;
+typedef Stats<Value> CounterMoveStats;
 typedef Stats<CounterMoveStats> CounterMoveHistoryStats;
 
 
@@ -101,7 +95,7 @@ public:
   MovePicker(const Position&, Move, Depth, Square);
   MovePicker(const Position&, Move, Depth, Search::Stack*);
 
-  Move next_move();
+  Move next_move(bool skipQuiets = false);
 
 private:
   template<GenType> void score();