alpha-beta 结点记录该结点是谁下的
This commit is contained in:
parent
402444726f
commit
a3b0ea02c0
|
@ -144,8 +144,6 @@ struct NineChessAi_ab::Node *NineChessAi_ab::addNode(
|
||||||
newNode->pruned = false;
|
newNode->pruned = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//player = player; // Remove warning
|
|
||||||
|
|
||||||
#ifdef DEBUG_AB_TREE
|
#ifdef DEBUG_AB_TREE
|
||||||
#if ((defined HASH_MAP_ENABLE) || (defined BOOK_LEARNING) || (defined THREEFOLD_REPETITION))
|
#if ((defined HASH_MAP_ENABLE) || (defined BOOK_LEARNING) || (defined THREEFOLD_REPETITION))
|
||||||
newNode->hash = 0;
|
newNode->hash = 0;
|
||||||
|
@ -158,8 +156,9 @@ struct NineChessAi_ab::Node *NineChessAi_ab::addNode(
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG_AB_TREE
|
|
||||||
newNode->player = player;
|
newNode->player = player;
|
||||||
|
|
||||||
|
#ifdef DEBUG_AB_TREE
|
||||||
newNode->root = rootNode;
|
newNode->root = rootNode;
|
||||||
newNode->stage = chessTemp.context.stage;
|
newNode->stage = chessTemp.context.stage;
|
||||||
newNode->action = chessTemp.context.action;
|
newNode->action = chessTemp.context.action;
|
||||||
|
|
|
@ -66,6 +66,7 @@ public:
|
||||||
struct Node* parent; // 父节点
|
struct Node* parent; // 父节点
|
||||||
move_t move; // 着法的命令行指令,图上标示为节点前的连线
|
move_t move; // 着法的命令行指令,图上标示为节点前的连线
|
||||||
value_t value; // 节点的值
|
value_t value; // 节点的值
|
||||||
|
enum NineChess::Player player; // 此着是谁下的 (目前仅调试用)
|
||||||
#ifdef SORT_CONSIDER_PRUNED
|
#ifdef SORT_CONSIDER_PRUNED
|
||||||
bool pruned; // 是否在此处剪枝
|
bool pruned; // 是否在此处剪枝
|
||||||
#endif
|
#endif
|
||||||
|
@ -73,7 +74,6 @@ public:
|
||||||
#ifdef DEBUG_AB_TREE
|
#ifdef DEBUG_AB_TREE
|
||||||
size_t id; // 结点编号
|
size_t id; // 结点编号
|
||||||
string cmd;
|
string cmd;
|
||||||
enum NineChess::Player player; // 此招是谁下的
|
|
||||||
int depth; // 深度
|
int depth; // 深度
|
||||||
bool evaluated; // 是否评估过局面
|
bool evaluated; // 是否评估过局面
|
||||||
int alpha; // 当前搜索结点走棋方搜索到的最好值,任何比它小的值对当前结点的走棋方都没有意义。当函数递归时 Alpha 和 Beta 不但取负数而且要交换位置
|
int alpha; // 当前搜索结点走棋方搜索到的最好值,任何比它小的值对当前结点的走棋方都没有意义。当函数递归时 Alpha 和 Beta 不但取负数而且要交换位置
|
||||||
|
|
Loading…
Reference in New Issue