diff --git a/mcts/mcts_main.cc b/mcts/mcts_main.cc index fd91597..652bdd0 100644 --- a/mcts/mcts_main.cc +++ b/mcts/mcts_main.cc @@ -233,7 +233,7 @@ std::pair GTPExecute(MCTSEngine &engine, const std::string &c engine.Move(-1, -1); } engine.Move(x, y); - fprintf(stderr, "%s\n", engine.GetDebugger().GetLastMoveDebugStr().c_str()); + std::cerr << engine.GetDebugger().GetLastMoveDebugStr() << std::endl; return {true, ""}; } if (op == "genmove") { @@ -246,7 +246,7 @@ std::pair GTPExecute(MCTSEngine &engine, const std::string &c GoCoordId x = -1, y = -1; engine.GenMove(x, y); engine.Move(x, y); - fprintf(stderr, "%s\n", engine.GetDebugger().GetLastMoveDebugStr().c_str()); + std::cerr << engine.GetDebugger().GetLastMoveDebugStr() << std::endl; return {true, EncodeMove(x, y)}; } if (op == "final_score") { @@ -267,6 +267,7 @@ void GTPServing(std::istream &in, std::ostream &out) { auto engine = InitEngine(FLAGS_config_path); InitMoves(*engine, FLAGS_init_moves); + std::cerr << std::flush; int id; bool has_id, succ; diff --git a/scripts/start_gpu.bat b/scripts/start_gpu.bat index 3d03ec9..95e070c 100644 --- a/scripts/start_gpu.bat +++ b/scripts/start_gpu.bat @@ -15,6 +15,6 @@ echo log to %CD%\log >&2 md log 2>NUL echo start mcts_main >&2 -call x64\Release\mcts_main --config_path=%config% --gtp --log_dir=log --v=1 +x64\Release\mcts_main --config_path=%config% --gtp --log_dir=log --v=1 popd \ No newline at end of file