增加宏用于不剪枝方便调试 AB 树

This commit is contained in:
CalciteM Team 2019-06-27 00:11:10 +08:00
parent 1feeb914ed
commit 8ffcc55bb7
1 changed files with 3 additions and 0 deletions

View File

@ -438,11 +438,14 @@ int NineChessAi_ab::alphaBetaPruning(int depth, int alpha, int beta, Node *node)
} }
// 删除“孙子”节点,防止层数较深的时候节点树太大 // 删除“孙子”节点,防止层数较深的时候节点树太大
//#define DEBUG_AB_TREE
#ifndef DEBUG_AB_TREE
for (auto child : node->children) { for (auto child : node->children) {
for (auto grandChild : child->children) for (auto grandChild : child->children)
deleteTree(grandChild); deleteTree(grandChild);
child->children.clear(); child->children.clear();
} }
#endif
#if 0 #if 0
// 添加到hashmap // 添加到hashmap