aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bot.cpp11
-rw-r--r--src/opening_book.cpp3
-rw-r--r--src/opening_book.hpp24
3 files changed, 2 insertions, 36 deletions
diff --git a/src/bot.cpp b/src/bot.cpp
index 193e487..fea8784 100644
--- a/src/bot.cpp
+++ b/src/bot.cpp
@@ -2,7 +2,6 @@
#include "board/board.hpp"
#include "evaluate.hpp"
#include "moves.hpp"
-#include "opening_book.hpp"
#include "zobrist.hpp"
#include <algorithm>
@@ -10,9 +9,11 @@
#include <chrono>
#include <cmath>
#include <cstdint>
+#include <cstdlib>
#include <ctime>
#include <iostream>
#include <iterator>
+#include <print>
#include <vector>
constexpr int MAXIMUM_DEPTH = 6;
@@ -253,9 +254,6 @@ static void PrintInfo(const int depth, const int engineScore,
Move GetBestMove(Game *b, const int maxDepth) {
Nodes = 0;
- Polyglot_Book book;
- book.Load("book.bin");
-
int actualDepth = maxDepth > 0 ? maxDepth : MAXIMUM_DEPTH;
bool usingDefaultDepth = actualDepth == MAXIMUM_DEPTH;
auto legalMoves = GetSortedLegalMoves(b, true, nullptr);
@@ -273,11 +271,6 @@ Move GetBestMove(Game *b, const int maxDepth) {
int depth = 1;
while (continueSearching) {
- if (book.HasMove(*b)) {
- bestMove = book.GetMove(*b);
- continueSearching = false;
- break;
- }
SearchResult result = SearchDepth(b, depth, &bestMove);
bestMove = result.bestMove;
diff --git a/src/opening_book.cpp b/src/opening_book.cpp
deleted file mode 100644
index 3c3af9b..0000000
--- a/src/opening_book.cpp
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "opening_book.hpp"
-
-// todo implement
diff --git a/src/opening_book.hpp b/src/opening_book.hpp
deleted file mode 100644
index e37e8b3..0000000
--- a/src/opening_book.hpp
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef SRC_OPENING_BOOK_H_
-#define SRC_OPENING_BOOK_H_
-
-#include "board/board.hpp"
-#include <cstdint>
-#include <string>
-#include <vector>
-struct Polygot_Entry {
- uint64_t key;
- uint16_t move;
- uint16_t weight;
- uint32_t learn;
-};
-
-class Polyglot_Book {
-public:
- bool Load(const std::string &filename);
- bool HasMove(const Game &board) const;
- Move GetMove(const Game &board) const;
-
-private:
- std::vector<Polygot_Entry> entries;
-};
-#endif /* SRC_OPENING_BOOK_H_ */