X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=152e9fd68c4812854d0ce3d098581586fb56102f;hb=2e86d1febc163e076320a6a21060fc5a1c7c0dff;hp=9c7190bed0cacb99e7d813df7196e205cb23bac8;hpb=946fa4762539307dcdcb30d08f13d627864e9bcf;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 9c7190be..152e9fd6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -181,6 +181,18 @@ void Search::init() { } +/// Search::reset() clears all search memory, to restore a deterministic state + +void Search::reset () { + + TT.clear(); + History.clear(); + CounterMovesHistory.clear(); + Gains.clear(); + Countermoves.clear(); +} + + /// Search::perft() is our utility to verify move generation. All the leaf nodes /// up to the given depth are generated and counted and the sum returned. template