depth: 将加深的深度值用 HARD_LEVEL_DEPTH 宏控制并禁用

This commit is contained in:
Calcitem 2019-10-20 11:27:39 +08:00
parent 1789c25dac
commit b229c07141
2 changed files with 22 additions and 6 deletions

View File

@ -40,6 +40,8 @@
#define EMIT_COMMAND_DELAY (0)
#endif
//#define HARD_LEVEL_DEPTH
//#define TIME_STAT
//#define MIN_MAX_ONLY
@ -66,7 +68,7 @@
//#define IDS_ADD_VALUE
//#define CLEAR_PRUNED_FLAG_BEFORE_SEARCH
//define DEEPER_IF_ONLY_ONE_LEGAL_MOVE
//#define DEEPER_IF_ONLY_ONE_LEGAL_MOVE
#define TRANSPOSITION_TABLE_ENABLE
@ -98,10 +100,6 @@
//#define DONOT_PLAY_SOUND
#ifndef DEBUG_MODE
#define GAME_PLACING_DYNAMIC_DEPTH
#endif
#ifdef DEBUG_MODE
#define PLAYER_DRAW_SEAT_NUMBER
#endif

View File

@ -73,6 +73,7 @@ depth_t AIAlgorithm::changeDepth(depth_t origDepth)
depth_t reduce = 0;
#endif
#ifdef HARD_LEVEL_DEPTH
const depth_t placingDepthTable[] = {
6, 16, 17, 18, /* 0 ~ 3 */
19, 18, 18, 17, /* 4 ~ 7 */
@ -87,6 +88,22 @@ depth_t AIAlgorithm::changeDepth(depth_t origDepth)
12, 12, 12, 12, /* 16 ~ 19 */
12, 13, 14, 15, /* 20 ~ 23 */
};
#else
const depth_t placingDepthTable[] = {
6, 14, 15, 16, /* 0 ~ 3 */
17, 16, 16, 14, /* 4 ~ 7 */
12, 12, 9, 7, 1 /* 8 ~ 12 */
};
const depth_t movingDepthTable[] = {
1, 1, 1, 1, /* 0 ~ 3 */
1, 1, 11, 11, /* 4 ~ 7 */
11, 11, 11, 11, /* 8 ~ 11 */
11, 11, 11, 11, /* 12 ~ 15 */
11, 11, 11, 11, /* 16 ~ 19 */
12, 12, 13, 14, /* 20 ~ 23 */
};
#endif // HARD_LEVEL_DEPTH
#ifdef ENDGAME_LEARNING
const depth_t movingDiffDepthTable[] = {
@ -730,8 +747,9 @@ value_t AIAlgorithm::search(depth_t depth, value_t alpha, value_t beta, Node *no
#endif // DEAL_WITH_HORIZON_EFFECT
#ifdef DEEPER_IF_ONLY_ONE_LEGAL_MOVE
if (node->children.size() == 1)
if (node->childrenSize == 1) {
epsilon++;
}
#endif /* DEEPER_IF_ONLY_ONE_LEGAL_MOVE */
// 递归 Alpha-Beta 剪枝