Code Monkey home page Code Monkey logo

zagreus's Introduction

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.

zagreus's People

Contributors

dannyj1 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

zagreus's Issues

compilation error : solved

i see you worked on the evaluation functions .. when i compile this newest version (it says v3.0!) i get a compile error in evaluate.cpp no matching function for call to 'min' :

uint8_t pawnShieldCount = std::min(popcnt(pawnShield), 3ULL);

i solved it by :

uint8_t pawnShieldCount = std::min<int>(popcnt(pawnShield), 3ULL);

this solution i found at https://www.appsloveworld.com/cplus/100/155/no-matching-function-for-call-to-minuint8-t-int but i'm not into C(++) so this might be wrong .. probably the error is caused by the 2 parameters not having the same type.

[ i'm on Xubuntu 22.04 ]

v2.4 out ?

i just compiled the latest source by git clone and i see the uci command shows v2.4, however your GitHub page shows v2.3.1 being the latest version.

is v2.4 a development version ?
latest edit was 2 months ago ..

Time forfeits in uncountable quantity

Hi Danny,

In my last tournament for Zagreus 2.2.0 there were 192 time forfeits out of 576 games! I don't know if they all were caused by Zagreus but I suspect so.
Have you not noticed that before? Does 2.3.0 solve the problem?

I used Arena. Time control was 1.6 minutes + 0.8 seconds. Maybe Zagreus does not understand split seconds increment?

Zagreus 0.5 and 1.1.0 Hash

Zagreus 0.5 uses around 4GB of hash according to the task manager. Zagreus 1.1.0 uses 1GB. Atlhough WB GUI is set up for engines to use only 128 MB. I also tried Arena and CuteChess and the hash could not be set. Is there a way to configure it to use 128MB or less?

memory problem

letting the newest v3.0 (after PR 54) play in CuteChess i see Zagreus is using too much memory : it increases after each move, upto several Gb (5.9) and i had to cancel the game to keep my PC running .. i set 128 Mb hash for all engines, most of them claim that amount of memory (a bit more) to run.

[ i'm on Xubuntu 22.04 ]

Suggestion

Could you please include version number in zip file name?

Gabor Szots
CCRL testing group

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.