aboutsummaryrefslogtreecommitdiff
path: root/src/bot.cpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-08-16 11:22:34 +0200
committerAdam <adammegarules1@gmail.com>2026-08-16 11:22:34 +0200
commit8e47b8f9f8a017f25a1c9a9baba05b0bf9b12d2d (patch)
tree6ee118919928e33d4115d78a6565940f26c8b30c /src/bot.cpp
parentb0ed5c409f822fa120ef2e2c830842204b0945c1 (diff)
perf(draw) instead of having a hash map for three fold repetion check now we have
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 0e959d0..7abe516 100644
--- a/src/bot.cpp
+++ b/src/bot.cpp
@@ -154,10 +154,9 @@ 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);
- if (repIt != b->ThreeFoldMap.end() && repIt->second >= 2) {
- return 0; // repetition -> draw
- }
+ if (isRepetionDraw(gameHash, b)) {
+ return 0;
+ };
TranspositionsEntry *entry = nullptr;
if (auto it = b->Transpositions->find(gameHash);