From 635a6723915cbd9c16d870a8b83e4db5a81827ee Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 1 Aug 2026 19:30:29 +0200 Subject: Update bot.cpp --- src/bot.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/bot.cpp b/src/bot.cpp index fea8784..cffa202 100644 --- a/src/bot.cpp +++ b/src/bot.cpp @@ -13,10 +13,9 @@ #include #include #include -#include #include -constexpr int MAXIMUM_DEPTH = 6; +constexpr int MAXIMUM_DEPTH = 7; constexpr int MAXIMUM_TIME_PER_MOVE = 7; constexpr int Q_DEPTH_LIMIT = 4; @@ -255,7 +254,7 @@ Move GetBestMove(Game *b, const int maxDepth) { Nodes = 0; int actualDepth = maxDepth > 0 ? maxDepth : MAXIMUM_DEPTH; - bool usingDefaultDepth = actualDepth == MAXIMUM_DEPTH; + bool usingDefaultDepth = maxDepth > 0; auto legalMoves = GetSortedLegalMoves(b, true, nullptr); if (legalMoves.empty()) { assert(false && "GetBestMove called with no legal moves"); @@ -289,7 +288,7 @@ Move GetBestMove(Game *b, const int maxDepth) { break; } depth++; - if (depth >= actualDepth) { + if (depth > actualDepth) { continueSearching = false; } int since_start = static_cast(difftime(time(0), start)); -- cgit v1.2.3