ids: 解决关闭 IDS 后编译不通过的问题

This commit is contained in:
Calcitem 2019-10-15 00:17:06 +08:00
parent 7365d059e8
commit 3013ef372f
1 changed files with 5 additions and 2 deletions

View File

@ -434,11 +434,12 @@ int AIAlgorithm::search(depth_t depth)
// 随机打乱着法顺序
MoveList::shuffle();
#ifdef IDS_SUPPORT
// 深化迭代
value_t alpha = -VALUE_INFINITE;
value_t beta = VALUE_INFINITE;
#ifdef IDS_SUPPORT
// 深化迭代
loggerDebug("IDS: ");
depth_t depthBegin = 2;
@ -484,9 +485,11 @@ int AIAlgorithm::search(depth_t depth)
#endif
#endif
#ifdef IDS_SUPPORT
value_t window = game.getPhase() == PHASE_PLACING ? VALUE_PLACING_WINDOW : VALUE_MOVING_WINDOW;
alpha = value - window;
beta = value + window;
#endif // IDS_SUPPORT
value = search(d, alpha, beta, root);