]> git.sesse.net Git - stockfish/blobdiff - src/movepick.h
Restore deterministic search state
[stockfish] / src / movepick.h
index 423a6a1805e34a233844024940bd8d66839fb74b..44fc51f6263d73ca5a88919ff044e3e6b256cc12 100644 (file)
@@ -21,6 +21,7 @@
 #define MOVEPICK_H_INCLUDED
 
 #include <algorithm> // For std::max
+#include <cstring>   // For std::memset
 
 #include "movegen.h"
 #include "position.h"
@@ -43,6 +44,7 @@ struct Stats {
 
   const T* operator[](Piece pc) const { return table[pc]; }
   T* operator[](Piece pc) { return table[pc]; }
+  void clear() { std::memset(table, 0, sizeof(table)); }
 
   void update(Piece pc, Square to, Move m) {