#define HISTORY_H_INCLUDED
#include <cstring>
-
-#include "depth.h"
-#include "piece.h"
-#include "square.h"
-#include "value.h"
-
+#include "types.h"
/// The History class stores statistics about how often different moves
/// have been successful or unsuccessful during the current search. These
class History {
public:
- History() { clear(); }
void clear();
Value value(Piece p, Square to) const;
void update(Piece p, Square to, Value bonus);
}
inline void History::update(Piece p, Square to, Value bonus) {
- if (abs(history[p][to]) < MaxValue) history[p][to] += bonus;
+ if (abs(history[p][to] + bonus) < MaxValue) history[p][to] += bonus;
}
inline Value History::gain(Piece p, Square to) const {