]> git.sesse.net Git - stockfish/commit - src/ucioption.cpp
Restore deterministic search state
authorlucasart <lucas.braesch@gmail.com>
Wed, 6 May 2015 11:24:00 +0000 (19:24 +0800)
committerGary Linscott <glinscott@gmail.com>
Thu, 7 May 2015 21:20:32 +0000 (14:20 -0700)
commit2e86d1febc163e076320a6a21060fc5a1c7c0dff
tree7c2da2c0df96a91d093b6c06f6b5334ce70e794a
parent946fa4762539307dcdcb30d08f13d627864e9bcf
Restore deterministic search state

Introduce helper function Search::reset() which clears all kind of search
memory, in order to restore a deterministic search state.

Generalize TT.clear() into Search::reset() for the following use cases:
- bench: needed to guarantee deterministic bench (ie. if you call bench from
interactive command line twice in a row you get the same value).
- Clear Hash: restore clean search state, which is the purpose of this button.
- ucinewgame: ditto.

No functional change.

Resolves #346
src/benchmark.cpp
src/movepick.h
src/search.cpp
src/search.h
src/uci.cpp
src/ucioption.cpp