X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fhistory.h;h=c265777b42a6c4d0bcf60485aae9d80a64625f43;hp=c01893321dd63a33cd9aa4abfa0e1804caa7de2e;hb=d372f2e39a65e2b14fc0335841e652a9d208d3ec;hpb=e06c99cad087f2937f14b850d4075749ca23e996 diff --git a/src/history.h b/src/history.h index c0189332..c265777b 100644 --- a/src/history.h +++ b/src/history.h @@ -21,12 +21,7 @@ #define HISTORY_H_INCLUDED #include - -#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 @@ -38,7 +33,6 @@ class History { public: - History() { clear(); } void clear(); Value value(Piece p, Square to) const; void update(Piece p, Square to, Value bonus); @@ -62,7 +56,7 @@ inline Value History::value(Piece p, Square to) const { } 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 {