生成合法着法前先给 children 数组扩容到48
i7 CPU 上,自对战再提速 18%,耗时由 109s 缩短到 90s
This commit is contained in:
parent
bf26f291a1
commit
30d458a76a
|
@ -149,6 +149,8 @@ void NineChessAi_ab::generateLegalMoves(Node *node)
|
|||
const int MOVE_PRIORITY_TABLE_SIZE = NineChess::N_RINGS * NineChess::N_SEATS;
|
||||
int pos = 0;
|
||||
|
||||
node->children.reserve(48);
|
||||
|
||||
#ifdef MOVE_PRIORITY_TABLE_SUPPORT
|
||||
#ifdef RANDOM_MOVE
|
||||
|
||||
|
|
Loading…
Reference in New Issue