aboutsummaryrefslogtreecommitdiff
path: root/src/bot.cpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-08-11 16:56:18 +0200
committerAdam <adammegarules1@gmail.com>2026-08-11 16:56:18 +0200
commit54d024aae8ca232e8da4cf4620ca9c5b3b599f23 (patch)
tree1b7a4ddce6ee1c59716d3c920fca172d02436438 /src/bot.cpp
parent9c305808704da692af3255a21f18cb8b975b2490 (diff)
fixing transpoition table bug
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 13e3c57..14f7cef 100644
--- a/src/bot.cpp
+++ b/src/bot.cpp
@@ -210,11 +210,10 @@ static int search(int depth, Game *b, int alpha, int beta, int ply) {
if (!searchStopped) {
Flag flag = EXACT;
- if (bestScore > beta) {
- flag = UPPERBOUND;
- }
- if (bestScore < alphaOrig) {
+ if (bestScore >= beta) {
flag = LOWERBOUND;
+ } else if (bestScore <= alphaOrig) {
+ flag = UPPERBOUND;
}
(*b->Transpositions)[gameHash] = {