A chess engine written in C++, powered by magic bitboard and neural networks.
While this project is still a major WIP, the end-goal is a dual-mode engine:
- An iterative search engine with Alpha-Beta Pruning, Quiescence, etc.
- A neural network-powered engine using Monte Carlo Tree Search (MCTS)
For a quick build of the project, run:
git clone https://github.com/Water-Engine/water.git
cd water
make -j4 runThe engine communicates through the UCI protocol for terminal interaction.
- g++ with C++20
- GNU Make
- Clang-format
- Catch2 (included in this repository)
- cloc (for cloc make target > optional)
- python for script running
The project's build system uses C++20 and GNU Make, and it is recommended that you run make with the flag -j4 to run batch jobs. Below is a list of targets with their requirements where applicable:
default: Builds the release configuration (default)install: Builds the dist config (to be updated)all: Builds all optimization configurations for the project (dist, release, and debug)dist: Builds the project with maximum optimization and disabled profilingrelease: Builds the project with slightly fewer optimizations and no DEBUG definedebug: Builds the project with no optimization, defining both PROFILE and DEBUGtest: Run the project's unit tests Excludes perft testingperft: Run the perft testsrun: Alias for run-releaserun-dist: Build and run the dist binaryrun-release: Build and run the release binaryrun-debug: Build and run the debug binaryfmt: Format all C++ source and header files usingclang-formatfmt-check: Validates C++ formatting rules without altering project filesclean: Remove object files, dependency files, and binaries
cloc: Count the lines of code in the project's relevant directorieshelp: Print this help menu
Contributing guidelines, information on tests, formatting, and profiling can be found in CONTRIBUTING.md. You can also check out a WIP roadmap for the project at ROADMAP.md.
- Learn engine internals such as move generation, evaluation, and search
- Work on low-level performance optimizations in modern C++
- Explore and improve machine learning fine-tuning for chess