Open calcitem opened 3 years ago
场景可能是AI对战刚开始就马上切人机对战然后点击屏幕。依据是前面一段:
I/flutter ( 7333): Game over, @ win, because of GameOverReason.loseReasonlessThanThree
I/flutter ( 7333): Score: 5 : 15 : 0 total: 20
I/flutter ( 7333): 25.0% : 75.0% : 0.0%
I/flutter ( 7333): Waiting for engine's response...
I/flutter ( 7333): posFenStr: position fen ********/********/******** w p p 0 9 0 9 0 0 1
I/flutter ( 7333): send: position fen ********/********/******** w p p 0 9 0 9 0 0 1
D/MillEngine( 7333): [uci] input: position fen ********/********/******** w p p 0 9 0 9 0 0 1
I/flutter ( 7333): Tap on (1, 3) <10>
I/flutter ( 7333): AI is not thinking. AI is to move.
I/flutter ( 7333): Engine to go
I/flutter ( 7333): Waiting for engine's response...
I/flutter ( 7333): send: go
I/flutter ( 7333): posFenStr: position fen ********/********/******** w p p 0 9 0 9 0 0 1
I/flutter ( 7333): send: position fen ********/********/******** w p p 0 9 0 9 0 0 1
因为
@override
Future<EngineResponse> search(Position? position) async {
if (await isThinking()) await stopSearching();
所以发stop
因为
bool MillEngine::isThinking()
{
return state == EngineState::STATE_THINKING;
}
所以返回真。 向引擎send go 时就回修改状态为thinking:
int MillEngine::send(const char *command)
{
if (command[0] == 'g' && command[1] == 'o')
state = EngineState::STATE_THINKING;
CommandChannel *channel = CommandChannel::getInstance();
bool success = channel->pushCommand(command);
if (success) printf(">>> %s\n", command);
return success ? 0 : -1;
}
但是最近一次打印的是
I/flutter ( 7333): Engine type: EngineType.aiVsAi
奇怪
符合下述条件则改为 ready
if (strstr(line, "readyok") ||
strstr(line, "uciok") ||
strstr(line, "bestmove") ||
strstr(line, "nobestmove")) {
state = EngineState::STATE_READY;
}
Now configured as Humans go first Thinking time is about 6s Maximum depth 14 9 men morris with slash banned point No Flying