repetition: Insert or clear keys to posKeyHistory when enabled UCI_DO_BEST_MOVE

This commit is contained in:
Calcitem 2021-01-17 01:22:38 +08:00
parent 13510a56e2
commit 1f13ab7ec6
1 changed files with 6 additions and 0 deletions

View File

@ -199,6 +199,12 @@ void Thread::emitCommand()
#ifdef UCI_DO_BEST_MOVE
rootPos->command(strCommand.c_str());
us = rootPos->side_to_move();
if (strCommand.size() > strlen("-(1,2)")) {
posKeyHistory.push_back(rootPos->key());
} else {
posKeyHistory.clear();
}
#endif
#ifdef ANALYZE_POSITION