From 1789c25dac31f5266a829d6e15f974a5b8ae0c59 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sun, 20 Oct 2019 03:14:20 +0800 Subject: [PATCH] =?UTF-8?q?ids:=20=E5=9B=A0=E4=B8=BA=E6=9D=80=E6=A3=8B?= =?UTF-8?q?=E6=8E=A2=E6=9F=A5=E5=BC=82=E5=B8=B8=E6=95=85=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/config.h | 1 + src/ai/search.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/config.h b/include/config.h index f1e3349d..56b7b4bf 100644 --- a/include/config.h +++ b/include/config.h @@ -61,6 +61,7 @@ //#define DEAL_WITH_HORIZON_EFFECT #define IDS_SUPPORT +//#define IDS_WINDOW #define IDS_DEBUG //#define IDS_ADD_VALUE diff --git a/src/ai/search.cpp b/src/ai/search.cpp index 9ceb55b2..e60d912a 100644 --- a/src/ai/search.cpp +++ b/src/ai/search.cpp @@ -500,8 +500,10 @@ int AIAlgorithm::search(depth_t depth) } #endif +#ifdef IDS_WINDOW alpha = value - VALUE_IDS_WINDOW; beta = value + VALUE_IDS_WINDOW; +#endif // IDS_WINDOW } #ifdef TIME_STAT @@ -517,9 +519,14 @@ int AIAlgorithm::search(depth_t depth) #endif #ifdef IDS_SUPPORT +#ifdef IDS_WINDOW value_t window = game.getPhase() == PHASE_PLACING ? VALUE_PLACING_WINDOW : VALUE_MOVING_WINDOW; alpha = value - window; beta = value + window; +#else + alpha = -VALUE_INFINITE; + beta = VALUE_INFINITE; +#endif // IDS_WINDOW #endif // IDS_SUPPORT value = search(d, alpha, beta, root);