20%概率下次优棋

This commit is contained in:
CalciteM Team 2019-07-04 00:35:27 +08:00
parent 1795357070
commit 0e82b83941
1 changed files with 4 additions and 1 deletions

View File

@ -702,7 +702,10 @@ const char* NineChessAi_ab::bestMove()
#ifdef RANDOM_BEST_MOVE
time_t time0 = time(0);
retIndex = bestMovesSize > 1 ? time0 % 2 : 0;
if (time0 % 5 == 0) {
retIndex = bestMovesSize > 1 ? 1 : 0;
}
#else
retIndex = 0;
#endif