horizon: 水平线效应支持仅一步可走时延伸一层的机制

暂不开启。若开启:

无论是执黑还是执白,相对原来都提升5%胜率。

执黑 6291 盘
3253 44.61% *
3799 52.10%
 239  3.27%

执白 8103 盘
2674 33.00%
5152 63.58% *
 277  3.41%

自对弈 3225 盘,黑白胜率和未开启时相当。
1266 39.25%
1833 56.83%
 126  3.90%
This commit is contained in:
Calcitem 2020-03-26 01:04:22 +08:00
parent dc3ca524bb
commit 95c2e0f9b8
2 changed files with 10 additions and 4 deletions

View File

@ -82,6 +82,10 @@
//#define DEAL_WITH_HORIZON_EFFECT
#ifdef DEAL_WITH_HORIZON_EFFECT
#define HORIZON_EFFECT_ONLY_ONE_MOVE
#endif
//#define IDS_WINDOW
//#define IDS_DEBUG
//#define IDS_ADD_VALUE

View File

@ -876,11 +876,13 @@ value_t AIAlgorithm::search(depth_t depth, value_t alpha, value_t beta, Node *no
doMove(node->children[i]->move);
#ifdef DEAL_WITH_HORIZON_EFFECT
// 克服“水平线效应”: 若遇到吃子,则搜索深度增加
if (child->pruned == false && child->move < 0) {
if (false
#ifdef HORIZON_EFFECT_ONLY_ONE_MOVE
|| nchild == 1
#endif // HORIZON_EFFECT_ONLY_ONE_MOVE
) {
epsilon = 1;
}
else {
} else {
epsilon = 0;
}
#endif // DEAL_WITH_HORIZON_EFFECT