BitBully 0.0.78
A fast, perfect-play Connect-4 engine in modern C++
Loading...
Searching...
No Matches
OpeningBook.h File Reference

Read-only access to BitBully's pre-computed Connect-4 opening books. More...

#include <Board.h>
#include <cassert>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <limits>
#include <tuple>
#include <vector>
Include dependency graph for OpeningBook.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BitBully::OpeningBook
 Sorted in-memory table mapping Huffman-encoded positions to scores. More...

Namespaces

namespace  BitBully
 Top-level namespace for the BitBully Connect-4 engine.

Detailed Description

Read-only access to BitBully's pre-computed Connect-4 opening books.

Two database flavours are supported:

  • 8-ply (small, 8-stones positions): used for shallow lookups.
  • 12-ply (large, 12-stones positions): the main book; available either with packed scores in the lower bits of the key or with a separate distance-to-mate byte.

The on-disk layout follows the format produced by the offline solver and the file size unambiguously identifies the variant; clients usually rely on the inferring single-argument OpeningBook constructor.

Definition in file OpeningBook.h.