ids: 因为杀棋探查异常故禁用窗口

This commit is contained in:
Calcitem 2019-10-20 03:14:20 +08:00
parent d5486fb2cf
commit 1789c25dac
2 changed files with 8 additions and 0 deletions

View File

@ -61,6 +61,7 @@
//#define DEAL_WITH_HORIZON_EFFECT
#define IDS_SUPPORT
//#define IDS_WINDOW
#define IDS_DEBUG
//#define IDS_ADD_VALUE

View File

@ -500,8 +500,10 @@ int AIAlgorithm::search(depth_t depth)
}
#endif
#ifdef IDS_WINDOW
alpha = value - VALUE_IDS_WINDOW;
beta = value + VALUE_IDS_WINDOW;
#endif // IDS_WINDOW
}
#ifdef TIME_STAT
@ -517,9 +519,14 @@ int AIAlgorithm::search(depth_t depth)
#endif
#ifdef IDS_SUPPORT
#ifdef IDS_WINDOW
value_t window = game.getPhase() == PHASE_PLACING ? VALUE_PLACING_WINDOW : VALUE_MOVING_WINDOW;
alpha = value - window;
beta = value + window;
#else
alpha = -VALUE_INFINITE;
beta = VALUE_INFINITE;
#endif // IDS_WINDOW
#endif // IDS_SUPPORT
value = search(d, alpha, beta, root);