Codfish is a strong chess engine written in C++.
Currently, Codfish doesn't support opening books, endgame tables, multi-threading or any kind of neural network evaluation. Some of these features will certainly be implemented in future releases.
The main goal of this project is to provide a simple introduction to newcomers to the chess programming world. The code is meant to be efficient and fast but also clean, maintainable and, above all, understandable.
- UCI Mode for GUI interaction
- CLI Mode for Terminal Usage
- Bitboard Representation
- Pre-calculated Attack Tables
- Magic Bitboards
- Pseudo-Legal Move Generation
- Make Unmake Approach
- PeSTO inspired evaluation function
- NegaMax Search
- Quiescense Search
- Move Ordering with PV, Killer, History and MVV LVA moves
- Triangular PV-Table
- Iterative Deepening
- Principal Variation Search
- Late Move Reduction
- Null Move Pruning
- Null Window Search
- Transposition Table
- Repetition Detection
Codfish is meant to be built only for Unix systems (although it may be built for other target platforms with little to no effort).
To compile the source code and the unit tests into their respective binaries:
mkdir build
cd build
cmake ../
cd ../
cmake --build build --config Release --target all
- C++ Standard Library
- Catch2 (header included) for Unit Tests
codfish --uci
codfish --cli
If this argument is not specified at startup the engine will default to UCI mode. Once in UCI mode mode you can use any UCI compliant chess GUI to interact with the engine, some examples are CuteChess and Arena.
Codfish consists of the following files:
CMakeLists.txt
, a file that contains the rules for building the engine using cmake.src
, a subdirectory that contains all the source code for the engine.tests
, a subdirectory that contains all the source for the unit tests.Doxyfile
, a file for generating documentation for the source code using Doxygen.
Everyone is more than welcome to contribute to the development of the project. In case you want to help improve this project here's a list of resources to get you started with chess programming:
- Bitboard Chess Engine in C Video Tutorials Playlist
- Chess Programming Wiki
- Chess Programming Youtube Channel
- FEN Editor
- Load PGN Files
Codfish is free, and distributed under the MIT License.
For full details, read the copy of the MIT License found in the file named LICENSE.