Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ForbaV2/water

 
 

Repository files navigation

water C++20 License LOC Last commit Formatting CI

A chess engine written in C++, powered by magic bitboard and neural networks.

Goals

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)

Getting Started

For a quick build of the project, run:

git clone https://github.com/Water-Engine/water.git
cd water
make -j4 run

The engine communicates through the UCI protocol for terminal interaction.

Dependencies

  • g++ with C++20
  • GNU Make
  • Clang-format
  • Catch2 (included in this repository)
  • cloc (for cloc make target > optional)
  • python for script running

Building water

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:

Build Specific Targets

  • 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 profiling
  • release: Builds the project with slightly fewer optimizations and no DEBUG define
  • debug: Builds the project with no optimization, defining both PROFILE and DEBUG
  • test: Run the project's unit tests Excludes perft testing
  • perft: Run the perft tests
  • run: Alias for run-release
  • run-dist: Build and run the dist binary
  • run-release: Build and run the release binary
  • run-debug: Build and run the debug binary
  • fmt: Format all C++ source and header files using clang-format
  • fmt-check: Validates C++ formatting rules without altering project files
  • clean: Remove object files, dependency files, and binaries

General Targets

  • cloc: Count the lines of code in the project's relevant directories
  • help: Print this help menu

For Developers

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.

Why Contribute?

  • 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

About

A Chess Engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.2%
  • Other 0.8%