A modern chess engine written in C++23, built as a learning project around bitboards, move generation, search, and engine architecture.
BitBishop is a personal project focused on learning by building a real engine. The codebase is organized as a layered architecture with dedicated modules for compile-time geometry, occupancy-aware attacks, legal move generation, reversible move execution, evaluation, search, and a UCI-facing interface.
The goal is not just to "have a chess engine," but to keep the code readable, testable, and well documented for anyone curious about chess programming or modern C++.
- UCI executable via
bitbishopwithuci,isready,ucinewgame,position,go,stop, andquit - FEN parsing and UCI move parsing
- Legal move generation with checks, pins, castling, en passant, and promotions
- Reversible move execution with position history and Zobrist hashing
- Basic evaluation using material and piece-square tables
- Negamax search with alpha-beta pruning and quiescence search
- Perft tooling and a tiered GoogleTest suite
- CMake Presets, vcpkg integration, linting hooks, and coverage targets
BitBishop is already usable for development and basic UCI-driven experiments, but it is still under active development. The UCI layer exists today, though protocol coverage and search strength are not yet "finished engine" level.
- stronger search features and move ordering
- richer UCI support and time-control handling
- continued validation with perft and targeted tests
- ongoing documentation improvements across the codebase
- CMake 3.27 or newer
- Clang on Unix-like systems, or MSVC 2022 on Windows
- vcpkg with
VCPKG_ROOTconfigured - Ninja on Unix-like systems, or Visual Studio 2022 on Windows
Optional developer tools:
clang-format(code formatting)clang-tidy(code linting)llvm-cov(code coverage)llvm-profdata(code coverage)
Typical Unix-like workflow:
cmake --preset clang_debug
cmake --build --preset clang_debug
ctest --preset quick-validation-clang-debugTypical Windows workflow:
cmake --preset msvc_debug
cmake --build --preset msvc_debug
ctest --preset quick-validation-msvc-debugThe project uses CMake Presets for configure, build, and test workflows. For the full preset matrix, coverage targets, and packaging notes, see the CMake guide.
On Unix-like systems, the executable is typically produced under the selected build preset directory:
./build/clang_debug/main/bitbishopMinimal UCI smoke test:
uci
isready
position startpos moves e2e4 e7e5
go depth 4
quit
For more information about available commands, see this doc.
- Engine commands (UCI and extensions)
- Build the project with CMake
- Run CI on GitHub
- Internal architecture
- Debug with perft
- Andrew Healey - Building My Own Chess Engine
- Chess Programming Wiki
- UCI overview on Chessprogramming
BitBishop/
├── build/ # Build artifacts
├── cmake/ # CMake helper scripts
├── docs/ # Documentation and guides
├── include/bitbishop/ # Public headers and architecture docs
├── main/ # Executable entrypoints
├── src/bitbishop/ # Library sources
├── tests/bitbishop/ # Unit and validation tests
├── CMakeLists.txt # Build configuration
├── CMakePresets.json # Preset-based workflows
├── vcpkg.json # Dependency manifest
└── ...
For a more detailed view of the engine layers, see include/bitbishop/readme.md.
- Learn and demonstrate low-level C++ techniques through a real project
- Keep the architecture explicit and easy to navigate
- Maintain strong test feedback with tiered validation
- Document the reasoning behind the implementation, not just the APIs
This is primarily a personal learning project, but suggestions and constructive feedback are welcome.
Before opening a pull request, please read:
Feel free to:
- Open issues for bugs or suggestions
- Submit pull requests with improvements
- Share your own learning experiences
Note
This is a personal project for now. Community documentation has been written in case one day, someone wants to contribute.
BitBishop is functional enough for development, experimentation, and basic UCI-based testing, but it is still an in-progress engine rather than a polished competitive one.
This project draws heavily from the chess programming community and the many people who document engine design in public.
Repository: github.com/Hardcode3/BitBishop
