console: 在启用 UCI_DO_BEST_MOVE 的情况下执行完 go 局面才会变动

否则只是给 bestmove 结果,不会执行。
This commit is contained in:
Calcitem 2020-10-25 00:54:01 +08:00
parent 1cc5b07702
commit 82c0539ec8
3 changed files with 4 additions and 1 deletions

View File

@ -31,6 +31,7 @@
//#define DISABLE_RANDOM_MOVE
//#define UCI_AUTO_RE_GO
//#define UCI_AUTO_RESTART
//#define UCI_DO_BEST_MOVE
#define ANALYZE_POSITION
#ifdef UCI_AUTO_RESTART

View File

@ -191,8 +191,11 @@ void Thread::emitCommand()
sync_cout << "bestmove " << strCommand.c_str();
std::cout << sync_endl;
#ifdef UCI_DO_BEST_MOVE
rootPos->command(strCommand.c_str());
us = rootPos->side_to_move();
#endif
#ifdef ANALYZE_POSITION
analyze(rootPos->side_to_move());
#endif

View File

@ -180,7 +180,6 @@ void bench(Position *pos, istream &args)
void UCI::loop(int argc, char *argv[])
{
Position *pos = new Position;
string token, cmd;