Skip to content

Zagreus is a UCI Chess Engine. Currently around ~2100 ELO Rapid on Lichess.

License

Notifications You must be signed in to change notification settings

Dannyj1/Zagreus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zagreus Logo

License Downloads GitHub commit activity GitHub commits since latest release (by date including pre-releases)

Zagreus Chess Engine

Zagreus is a work in progress UCI Chess Engine. You can play against Zagreus on Lichess: https://lichess.org/@/Zagreus_Engine. You will also be able to find it's elo rating on there. At the time of writing this is around ~2100 ELO rapid. Zagreus is a constantly changing engine with hopefully an increase in elo every update.

You can download binaries here: https://github.com/Dannyj1/Zagreus/releases

This engine requires a GUI that supports the UCI (Universal Chess Interface) protocol to use it. I personally use CuteChess.

Development

Development of all new changes and bug fixes happens in a separate branch for each change. When the change is properly tested using OpenBench and proven to improve ELO, it will be merged with the master branch. Because of this, the master branch is not the latest released version and may contain bugs. Every stable release (as in the version has been uploaded under releases) will have a tag. If you want to compile the stable version for yourself, you can use the tag. You can list all tags and search for tags under the branches dropdown on GitHub.

Features

  • Bitboard board representation with Plain Magic Bitboards for sliding piece move generation
  • Tapered Evaluation with:
    • Material
    • Piece-Square Tables
    • Several evaluation terms per piece type (e.g. passed pawn, king safety, etc.)
    • Penalty for undefended minor pieces
    • And more
  • Evaluation values automatically tuned using a gradient descent tuner with the Adam optimizer.
  • Principal Variation Search with Alpha-Beta pruning
  • Quiescence Search with delta pruning and SEE move ordering
  • Move ordering using MVV/LVA, killer moves, history heuristic, countermove heuristic
  • Transposition Table
  • Null Move Pruning
  • And more! This list is constantly growing and changing, but it is difficult to keep track of all features and changes.

UCI Options

Zagreus Engine has the following UCI options that can be changed:

  • MoveOverhead - The amount of time that will be substracted from the internal timer for each move. This helps when using the engine over the internet, to prevent it from losing on time due to lag. The default is 0.
  • Hash - The size of the transposition table in megabytes, rounded to the nearest power of 2. The default is 512MB.

Build Instructions

To build Zagreus, you will need to use LLVM. On Windows, I use LLVM MinGW. On Linux I just use LLVM, but it is also possible to use GCC. LLVM seems to have slightly better performance. Zagreus uses CMake to build. On Windows you can use the CMake-GUI. On Linux, use the following commands:

Clone the repository:

git clone https://github.com/Dannyj1/Zagreus.git

If you want to use Clang/LLVM, set the compiler to clang++ (not required. If you don't run these commands, your default compiler will be used which works fine in most cases):

export CC=/usr/bin/clang-<version here>
export CXX=/usr/bin/clang++-<version here>

Build:

cd <directory of Zagreus engine>
cmake -DCMAKE_BUILD_TYPE=Release .
cmake --build .

Credits

Thanks to:

License

Copyright (C) 2023 Danny Jelsma

Zagreus is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Zagreus is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with Zagreus. If not, see https://www.gnu.org/licenses/.

This project uses the Senjo UCI Adapter by zd3nik which is licensed under the MIT license. All files from the Senjo UCI Adapter retain their original copyright and license notices.