From af96aaba675aaed7a6a2c56b8685820aa77b94f4 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sat, 26 Oct 2019 00:38:54 +0800 Subject: [PATCH] =?UTF-8?q?depth:=20=E9=99=8D=E4=BD=8E9=E5=AD=90=E6=A3=8B?= =?UTF-8?q?=E6=91=86=E6=A3=8B=E6=B7=B1=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ai/search.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/ai/search.cpp b/src/ai/search.cpp index c4b728e4..fde89626 100644 --- a/src/ai/search.cpp +++ b/src/ai/search.cpp @@ -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) {