Lazarus is a C++, bitboard-based chess engine with neural network and other cool stuff.
The origin of the name comes from the history of the project's creation and the multiple, deep refactorings it has experienced.
Unfortunately, this is not a final version of the project. Despite completing most of the key stages and bringing the project to a usable state, there are still some significant improvements and functionalities missing, without which the project cannot be considered ready. For this reason, the engine is not yet ready for final testing and measurement of its playing strength.
Among the milestones already completed, the most important ones can be highlighted:
- Board and pieces representation

- Sliding piece attacks, magic bitboards

- Full game rules implementation - enpassant, pins, checks and promotions

- Move generation algorithms

- Transposition table

- Basic search

- Quiescence search

- Selectivity heuristics

- Neural network model (NNUE) implementation and training

The most important missing functionalities are:
- Multi-threaded search

- Opening book & endgame tablebase connection

- Time management

- UCI and connection with custom GUI

To build and run the project, you need to have CMake and a C++ compiler installed. The project supports two build modes:
- CLI (Command-Line Interface): The engine runs in the terminal without a GUI.
- GUI (Graphical User Interface): The engine is linked with SFML and includes a graphical interface (requires the
USE_GUIflag).
Additionally, you can enable development mode with the DEV flag, which includes tests for internal validation.
- CMake version 3.10 or higher
- C++20 compiler (e.g., GCC, Clang, MSVC)
- SFML 2.5.1 (only for GUI mode)
If you haven't cloned the repository yet, you can do so using:
git clone https://github.com/IgorSwat/Lazarus.git
cd LazarusCreate a build directory where the project will be compiled:
mkdir build
cd buildTo configure the project and generate the appropriate build files, run the following command:
-
For CLI mode (default):
cmake .. -DUSE_GUI=OFF -
For GUI mode (with SFML 2.5.1 enabled):
cmake .. -DUSE_GUI=ONIf you already have SFML installed on your system, you can specify its location manually using the SFML_DIR option:
cmake .. -DUSE_GUI=ON -DSFML_DIR=/path/to/SFML-2.5.1/lib/cmake/SFMLIf SFML is not found, it will be automatically downloaded and built from source along with the project.
-
If you want to enable development tests (DEV):
cmake .. -DDEV=ON
Once the configuration is complete, you can build the project using:
cmake --build . --config ReleaseIt is recommended to use Release mode for optimal engine speed.
Run the engine from the build directory:
cd .. # Step back to the project root directory
./LazarusCLI is a default mode for the project. It does not require any external dependencies.
CLI allows you to specify position (with appropriate FEN notation), as well as search depth. Then, engine performs search at given depth and returns the best move and corresponding evaluation of the position (see example below).
GUI mode is an alternative to CLI. Since it was an optional part of the project and it's main purpose was to allow quicker testing, it's not necessarily of the highest quality. It requires SFMl 2.5.1 library and can be activated with USE_GUI flag set during compilation (see Build and run section).
GUI allows you to manipulate the position quickly - make and unmake moves, load position from FEN notation, reset to starting position and run the engine with given depth (see example below).
Not ready yet

