aboutsummaryrefslogtreecommitdiff
path: root/src/bot.cpp
diff options
context:
space:
mode:
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));