aboutsummaryrefslogtreecommitdiff
path: root/src/bot.cpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-08-01 19:30:29 +0200
committerAdam <adammegarules1@gmail.com>2026-08-01 19:30:29 +0200
commit635a6723915cbd9c16d870a8b83e4db5a81827ee (patch)
treeebe50880ac41e102a67444a6aca84a3bcb2ebfa3 /src/bot.cpp
parentcfe75795ef5f3afb384760affdb746eb4b0f41f7 (diff)
Update bot.cpp
Diffstat (limited to 'src/bot.cpp')
-rw-r--r--src/bot.cpp7
1 files 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 <ctime>
#include <iostream>
#include <iterator>
-#include <print>
#include <vector>
-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<int>(difftime(time(0), start));