From 618b2942807b65a98a0df036ac2e5ced9444c6b8 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Wed, 16 Oct 2019 00:42:31 +0800 Subject: [PATCH] =?UTF-8?q?ids:=20=E5=AF=B9=E6=9C=80=E4=BD=B3=E8=B5=B0?= =?UTF-8?q?=E6=B3=95=E6=89=80=E5=9C=A8=E7=BB=93=E7=82=B9=E4=BB=B7=E5=80=BC?= =?UTF-8?q?=E5=8A=A0=E4=B8=80=20(=E9=BB=98=E8=AE=A4=E5=85=B3=E9=97=AD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 性能下降明显 --- include/config.h | 1 + src/ai/search.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/include/config.h b/include/config.h index b4114fcf..d871a56b 100644 --- a/include/config.h +++ b/include/config.h @@ -62,6 +62,7 @@ #define IDS_SUPPORT #define IDS_DEBUG +//#define IDS_ADD_VALUE //#define CLEAR_PRUNED_FLAG_BEFORE_SEARCH //define DEEPER_IF_ONLY_ONE_LEGAL_MOVE diff --git a/src/ai/search.cpp b/src/ai/search.cpp index f41ca489..5e9ab1b6 100644 --- a/src/ai/search.cpp +++ b/src/ai/search.cpp @@ -803,6 +803,16 @@ value_t AIAlgorithm::search(depth_t depth, value_t alpha, value_t beta, Node *no #ifdef IDS_SUPPORT // 排序子节点树 sortMoves(node); + +#ifdef IDS_ADD_VALUE + if (tempGame.position.sideToMove == PLAYER_BLACK) { + node->children[0]->value += 1; + node->value += 1; + } else { + node->children[0]->value -= 1; + node->value -= 1; + } +#endif /* IDS_ADD_VALUE */ #endif // IDS_SUPPORT #ifdef TRANSPOSITION_TABLE_ENABLE