diff --git a/include/config.h b/include/config.h index 3cbaa310..1ae12e46 100644 --- a/include/config.h +++ b/include/config.h @@ -43,6 +43,8 @@ #define DEFAULT_RULE_NUMBER 1 +#define DEPTH_ADJUST (0) + //#define HARD_LEVEL_DEPTH //#define TIME_STAT diff --git a/src/ai/search.cpp b/src/ai/search.cpp index 7dd49f96..7743e7ec 100644 --- a/src/ai/search.cpp +++ b/src/ai/search.cpp @@ -156,6 +156,10 @@ depth_t AIAlgorithm::changeDepth(depth_t origDepth) d -= reduce; } + d += DEPTH_ADJUST; + + d = d >= 1 ? d : 1; + loggerDebug("Depth: %d\n", d); return d; diff --git a/src/game/types.h b/src/game/types.h index 9d56591e..90cfb530 100644 --- a/src/game/types.h +++ b/src/game/types.h @@ -23,7 +23,7 @@ #include "config.h" using step_t = uint16_t; -using depth_t = uint8_t; +using depth_t = int8_t; using location_t = uint8_t; #ifdef TRANSPOSITION_TABLE_CUTDOWN