alpha-beta 结点记录该结点是谁下的

This commit is contained in:
CalciteM Team 2019-08-18 01:17:48 +08:00
parent 402444726f
commit a3b0ea02c0
2 changed files with 3 additions and 4 deletions

View File

@ -144,8 +144,6 @@ struct NineChessAi_ab::Node *NineChessAi_ab::addNode(
newNode->pruned = false;
#endif
//player = player; // Remove warning
#ifdef DEBUG_AB_TREE
#if ((defined HASH_MAP_ENABLE) || (defined BOOK_LEARNING) || (defined THREEFOLD_REPETITION))
newNode->hash = 0;
@ -158,8 +156,9 @@ struct NineChessAi_ab::Node *NineChessAi_ab::addNode(
#endif
#endif
#ifdef DEBUG_AB_TREE
newNode->player = player;
#ifdef DEBUG_AB_TREE
newNode->root = rootNode;
newNode->stage = chessTemp.context.stage;
newNode->action = chessTemp.context.action;

View File

@ -66,6 +66,7 @@ public:
struct Node* parent; // 父节点
move_t move; // 着法的命令行指令,图上标示为节点前的连线
value_t value; // 节点的值
enum NineChess::Player player; // 此着是谁下的 (目前仅调试用)
#ifdef SORT_CONSIDER_PRUNED
bool pruned; // 是否在此处剪枝
#endif
@ -73,7 +74,6 @@ public:
#ifdef DEBUG_AB_TREE
size_t id; // 结点编号
string cmd;
enum NineChess::Player player; // 此招是谁下的
int depth; // 深度
bool evaluated; // 是否评估过局面
int alpha; // 当前搜索结点走棋方搜索到的最好值,任何比它小的值对当前结点的走棋方都没有意义。当函数递归时 Alpha 和 Beta 不但取负数而且要交换位置