Codfish
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.
Features
Interfaces
- UCI Mode for GUI interaction
- CLI Mode for Terminal Usage
Move Generation
- Bitboard Representation
- Pre-calculated Attack Tables
- Magic Bitboards
- Pseudo-Legal Move Generation
- Make Unmake Approach
Move Picker
- 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
Building and Installation
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:
cmake --build build --config Release --target all -j 10 --
Build Dependencies
- C++ Standard Library
- Catch2 (header included) for Unit Tests
Usage
Starting in UCI mode
codfish --uci
Starting in CLI mode
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.
Files
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.
Contributing
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
Terms of Use
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.