aboutsummaryrefslogtreecommitdiff
path: root/src/opening_book.hpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-08-01 13:44:57 +0200
committerAdam <adammegarules1@gmail.com>2026-08-01 13:44:57 +0200
commitf56178ec9afdd89b85fc0284bddefa5b3f9515d1 (patch)
tree3cb637768272e89bbc4d0dec31e5eb818c2ce868 /src/opening_book.hpp
parent980ac2bc1ccbe1b8bde626a964464bb018baa466 (diff)
none
Diffstat (limited to 'src/opening_book.hpp')
-rw-r--r--src/opening_book.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/opening_book.hpp b/src/opening_book.hpp
new file mode 100644
index 0000000..e37e8b3
--- /dev/null
+++ b/src/opening_book.hpp
@@ -0,0 +1,24 @@
+#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_ */