Demonstrates loading an 8-ply opening book at construction time and letting the solver short-circuit early-game positions that are already resolved in the book.
Demonstrates loading an 8-ply opening book at construction time and letting the solver short-circuit early-game positions that are already resolved in the book. If the book file is missing the example still works; it just performs the full search.
#include <filesystem>
#include <iostream>
const std::filesystem::path bookPath = "openingbook_8ply.bin";
std::cerr << "(book not found, falling back to full search)\n";
}
const int score = solver.
mtdf(b, 0);
std::cout << "score from start = " << score << '\n';
return 0;
}
Connect-4 search engine that operates on BitBully::Board.
Perfect-play Connect-4 solver.
bool isBookLoaded() const
Was an opening book successfully loaded?
int mtdf(const Board &b, const int firstGuess, const int maxDepth=-1) noexcept
Solve a position using the MTD(f) driver.
Connect-4 position represented as a pair of 64-bit bitboards.
int main(const int argc, const char *const argv[])
Entry point of the benchmark binary.