depth: 降低9子棋摆棋深度

This commit is contained in:
Calcitem 2019-10-26 00:38:54 +08:00
parent 0ec6cf9866
commit af96aaba67
1 changed files with 13 additions and 2 deletions

View File

@ -89,12 +89,18 @@ depth_t AIAlgorithm::changeDepth(depth_t origDepth)
12, 13, 14, 15, /* 20 ~ 23 */
};
#else
const depth_t placingDepthTable[] = {
const depth_t placingDepthTable_12[] = {
1, 7, 10, 12, /* 0 ~ 3 */
12, 14, 16, 16, /* 4 ~ 7 */
17, 16, 15, 14, 6 /* 8 ~ 12 */
};
const depth_t placingDepthTable_9[] = {
1, 7, 10, 12, /* 0 ~ 3 */
12, 13, 13, 13, /* 4 ~ 7 */
13, 13 /* 8 ~ 9 */
};
const depth_t movingDepthTable[] = {
1, 1, 1, 1, /* 0 ~ 3 */
1, 1, 11, 11, /* 4 ~ 7 */
@ -120,7 +126,12 @@ depth_t AIAlgorithm::changeDepth(depth_t origDepth)
#endif /* ENDGAME_LEARNING */
if (tempGame.position.phase & PHASE_PLACING) {
d = placingDepthTable[rule.nTotalPiecesEachSide - tempGame.getPiecesInHandCount(BLACK)];
if (rule.nTotalPiecesEachSide == 12)
{
d = placingDepthTable_12[rule.nTotalPiecesEachSide - tempGame.getPiecesInHandCount(BLACK)];
} else {
d = placingDepthTable_9[rule.nTotalPiecesEachSide - tempGame.getPiecesInHandCount(BLACK)];
}
}
if (tempGame.position.phase & PHASE_MOVING) {