From a550620aa894e218a738b62b9ecd042b03f7858f Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 31 Jul 2026 12:11:58 +0200 Subject: changes --- src/uci.cpp | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) (limited to 'src/uci.cpp') diff --git a/src/uci.cpp b/src/uci.cpp index ad1e89e..818da90 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -21,34 +21,6 @@ std::ofstream uciLog("cache/uci_log.txt", std::ios::app); -bool LoadTable( - const std::string &filename, - std::unordered_map *transpositions) { - std::ifstream file(filename); - - if (!file.is_open()) - return false; - - uint64_t hash; - int depth; - int eval; - - while (file >> hash >> depth >> eval) { - transpositions->operator[](hash) = {depth, eval}; - } - - return true; -} -void SaveTranspositionTable( - const std::unordered_map &table) { - - std::ofstream file("cache/positions.txt", std::ios::trunc); - - for (const auto &[key, value] : table) { - file << key << ' ' << value.depth << ' ' << value.Eval << '\n'; - } -}; - void LogUci(const std::string &message) { if (!uciLog.is_open()) { return; @@ -117,11 +89,6 @@ void Uci() { if (cmd == "quit") { break; } - if (cmd == "save") { - SaveTranspositionTable(transpositions); - cout << "done\n"; - cout.flush(); - } if (cmd == "board") { for (int rank = 0; rank < 8; rank++) { std::printf("%d |", 8 - rank); @@ -135,11 +102,6 @@ void Uci() { std::printf(" | %d\n", 8 - rank); } } - if (cmd == "load") { - LoadTable("cache/positions.txt", &transpositions); - cout << "done\n"; - cout.flush(); - } if (cmd == "uci") { cout << "uciok\n"; cout.flush(); @@ -166,7 +128,7 @@ void Uci() { } } - Move best = EngineGetBestMove(&game, depth); + Move best = GetBestMove(&game, depth); cout << "bestmove "; cout << (char)(best.From.file + 'a') << 8 - best.From.rank -- cgit v1.2.3