BitBully is a high-performance perfect-play Connect-4 solver written in modern C++. It reaches every win/loss/draw verdict for any position by combining a bitboard representation, a hand-tuned alpha-beta negamax, a transposition table and pre-computed opening books.
This documentation covers the C++ core of the project.
| Component | Header | Purpose |
|---|---|---|
| BitBully::Board | Board.h | Bitboard position with legal-move generation |
| BitBully::BitBully | BitBully.h | Negamax + MTD(f) solver driver |
| BitBully::TranspositionTable | TranspositionTable.h | Direct-mapped score cache |
| BitBully::OpeningBook | OpeningBook.h | 8-/12-ply opening database loader |
| BitBully::MoveList | MoveList.h | Tiny priority queue used for move ordering |
The score follows the convention introduced by Pascal Pons: positive means the side to move wins, negative means it loses, and 0 is a draw. Use BitBully::BitBully::scoreToMovesLeft to translate the compact score into the actual number of plies remaining.