即便超时时发生 Error 也返回首个招法
This commit is contained in:
parent
2c0ad67e23
commit
7afa962ed9
|
@ -703,17 +703,20 @@ const char* NineChessAi_ab::bestMove()
|
|||
}
|
||||
}
|
||||
|
||||
bestMovesSize = bestMoves.size();
|
||||
|
||||
if (bestMovesSize == 0) {
|
||||
qDebug() << "Not any child value is equal to root value";
|
||||
for (auto child : rootNode->children) {
|
||||
bestMoves.push_back(child);
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << "Evaluated: " << evaluatedNodeCount << "/" << nodeCount << " = "
|
||||
<< evaluatedNodeCount * 100 / nodeCount << "%";
|
||||
nodeCount = 0;
|
||||
evaluatedNodeCount = 0;
|
||||
|
||||
bestMovesSize = bestMoves.size();
|
||||
|
||||
if (bestMovesSize == 0) {
|
||||
return "error!";
|
||||
}
|
||||
|
||||
#ifdef RANDOM_BEST_MOVE
|
||||
time_t time0 = time(0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue