aboutsummaryrefslogtreecommitdiff
path: root/src/bot.cpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-08-01 08:14:20 +0200
committerAdam <adammegarules1@gmail.com>2026-08-01 08:14:20 +0200
commit839b4740af77743c7141e113eb7f110b4f6a9983 (patch)
tree4d9e6ac57e6ecdace3c1e86dc26afd87bc4a863d /src/bot.cpp
parent1b006985ba2381a29dd9aa34aec1dafbae224897 (diff)
optimalization and naming changes
Diffstat (limited to 'src/bot.cpp')
-rw-r--r--src/bot.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bot.cpp b/src/bot.cpp
index 3ea6620..c269665 100644
--- a/src/bot.cpp
+++ b/src/bot.cpp
@@ -138,7 +138,7 @@ static int quiescenceSearch(Game *b, int qdepth, int alpha, int beta, int ply) {
return beta;
}
}
-static int minimax(int depth, Game *b, int alpha, int beta, int ply) {
+static int search(int depth, Game *b, int alpha, int beta, int ply) {
const uint64_t gameHash = GenerateZobristKey(b);
auto repIt = b->ThreeFoldMap.find(gameHash);
@@ -190,7 +190,7 @@ static int minimax(int depth, Game *b, int alpha, int beta, int ply) {
for (Move move : moves) {
UndoMove undo = MakeMove(move, b);
- int score = minimax(depth - 1, b, alpha, beta, ply + 1);
+ int score = search(depth - 1, b, alpha, beta, ply + 1);
UnMakeMove(undo, b);
@@ -216,7 +216,7 @@ static int minimax(int depth, Game *b, int alpha, int beta, int ply) {
for (Move move : moves) {
UndoMove undo = MakeMove(move, b);
- int score = minimax(depth - 1, b, alpha, beta, ply + 1);
+ int score = search(depth - 1, b, alpha, beta, ply + 1);
UnMakeMove(undo, b);
@@ -261,7 +261,7 @@ static SearchResult SearchDepth(Game *b, int depth, const Move *previousBest) {
for (Move move : moves) {
UndoMove undo = MakeMove(move, b);
- int eval = minimax(depth - 1, b, -INF, INF, 1);
+ int eval = search(depth - 1, b, -INF, INF, 1);
UnMakeMove(undo, b);