From 839b4740af77743c7141e113eb7f110b4f6a9983 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 1 Aug 2026 08:14:20 +0200 Subject: optimalization and naming changes --- src/bot.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/bot.cpp') 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); -- cgit v1.2.3