当子结点数量仅为1时多搜索一层 (暂不启用)

使用 DEEPER_IF_ONLY_ONE_LEGAL_MOVE 宏控制。
开启此选项会增加搜索时长。
This commit is contained in:
CalciteM 2019-08-06 01:19:21 +08:00
parent ae8b8d445c
commit ab561f38e1
2 changed files with 7 additions and 0 deletions

View File

@ -50,6 +50,8 @@
#define IDS_SUPPORT
//define DEEPER_IF_ONLY_ONE_LEGAL_MOVE
#define HASH_MAP_ENABLE
#define CLEAR_HASH_MAP

View File

@ -947,6 +947,11 @@ int NineChessAi_ab::alphaBetaPruning(depth_t depth, value_t alpha, value_t beta,
}
#endif // DEAL_WITH_HORIZON_EFFECT
#ifdef DEEPER_IF_ONLY_ONE_LEGAL_MOVE
if (node->children.size() == 1)
epsilon++;
#endif /* DEEPER_IF_ONLY_ONE_LEGAL_MOVE */
// 递归 Alpha-Beta 剪枝
value = alphaBetaPruning(depth - 1 + epsilon, alpha, beta, child);