ids: 对最佳走法所在结点价值加一 (默认关闭)

性能下降明显
This commit is contained in:
Calcitem 2019-10-16 00:42:31 +08:00
parent a729fedb04
commit 618b294280
2 changed files with 11 additions and 0 deletions

View File

@ -62,6 +62,7 @@
#define IDS_SUPPORT
#define IDS_DEBUG
//#define IDS_ADD_VALUE
//#define CLEAR_PRUNED_FLAG_BEFORE_SEARCH
//define DEEPER_IF_ONLY_ONE_LEGAL_MOVE

View File

@ -803,6 +803,16 @@ value_t AIAlgorithm::search(depth_t depth, value_t alpha, value_t beta, Node *no
#ifdef IDS_SUPPORT
// 排序子节点树
sortMoves(node);
#ifdef IDS_ADD_VALUE
if (tempGame.position.sideToMove == PLAYER_BLACK) {
node->children[0]->value += 1;
node->value += 1;
} else {
node->children[0]->value -= 1;
node->value -= 1;
}
#endif /* IDS_ADD_VALUE */
#endif // IDS_SUPPORT
#ifdef TRANSPOSITION_TABLE_ENABLE