All Projects → amanjpro → zahak

amanjpro / zahak

Licence: MIT License
A UCI compatible chess AI in Go

Programming Languages

go
31211 projects - #10 most used programming language
c
50402 projects - #5 most used programming language
assembly
5116 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to zahak

eschecs
UCI chess GUI
Stars: ✭ 32 (+60%)
Mutual labels:  chess, uci-protocol
liground
A free, open-source and modern Chess Variant Analysis GUI for the 21st century
Stars: ✭ 41 (+105%)
Mutual labels:  chess-engine, chess
elephantfish
elephantfish: 一个只有124行的中国象棋引擎
Stars: ✭ 129 (+545%)
Mutual labels:  chess-engine, chess
ConvChess
Convolutional Neural Networks learns to play chess moves
Stars: ✭ 14 (-30%)
Mutual labels:  chess-engine, chess
magic-bits
A C++ header-only library for efficient move generation in Chess using "magic bitboards" technique
Stars: ✭ 26 (+30%)
Mutual labels:  chess-engine, chess
uci
A thin wrapper on a uci chess engine
Stars: ✭ 33 (+65%)
Mutual labels:  chess-engine, chess
OpenChess
A cross-platform chess game.
Stars: ✭ 18 (-10%)
Mutual labels:  chess-engine, chess
Sunfish
Sunfish: a Python Chess Engine in 111 lines of code
Stars: ✭ 2,254 (+11170%)
Mutual labels:  chess-engine, chess
Realtime-OpenCV-Chess
♔ Chess-playing with Open-CV [Human vs AI (Stockfish engine)]
Stars: ✭ 18 (-10%)
Mutual labels:  chess-engine, chess
renpy-chess
A chess GUI built with Ren'Py, python-chess, and Stockfish. Version 2.0 of https://github.com/RuolinZheng08/renpy-chess-engine
Stars: ✭ 36 (+80%)
Mutual labels:  chess-engine, chess
Demolito
UCI Chess Engine
Stars: ✭ 41 (+105%)
Mutual labels:  chess-engine, chess
bot-o-tron
Try out lichess' bot interface
Stars: ✭ 36 (+80%)
Mutual labels:  chess-engine, chess
fastchess
Predicts the best chess move with 27.5% accuracy by a single matrix multiplication
Stars: ✭ 75 (+275%)
Mutual labels:  chess-engine, chess
seer-nnue
UCI chess engine using neural networks for position evaluation
Stars: ✭ 60 (+200%)
Mutual labels:  chess-engine, uci-chess-engine
Zerofish
An implementation of the AlphaZero algorithm for chess
Stars: ✭ 34 (+70%)
Mutual labels:  chess-engine, chess
rustic
Rustic is a chess engine. It is written from scratch, in the Rust programming language.
Stars: ✭ 68 (+240%)
Mutual labels:  chess-engine, chess
Bit-Genie
UCI chess engine in C++
Stars: ✭ 19 (-5%)
Mutual labels:  chess-engine, chess
Walleye
A chess engine written from scratch in Rust ♞
Stars: ✭ 82 (+310%)
Mutual labels:  chess-engine, chess
Koivisto
UCI Chess engine
Stars: ✭ 93 (+365%)
Mutual labels:  chess-engine, uci-chess-engine
littlewing
Chess engine written in Rust ♛
Stars: ✭ 27 (+35%)
Mutual labels:  chess-engine, chess

Zahak

Build Status

A UCI compatible chess AI written in Go. Still work in progress.

Courtesy to the OpenBench community, Zahak is now part of the official OpenBench instance

The name

Zahak (or Zahhak or Azhi Dahak) is an evil figure in Iranian/Kurdish/Perisan mythology, evident in ancient Iranian folklore as Azhi Dahāka, the name by which he also appears in the texts of the Avesta. Legend has it, that he had two giant snakes on his shoulders and he had to feed them two human brains on daily basis, you can read more about him here

Play Zahak online

Zahak is new to LiChess, you can play him and be impressed with him. His LiChess handle is zahak_engine.

Play Zahak on your Android Phone/Desktop

Zahak is a bare chess engine AI, that means it doesn't come with any GUI interface. That also means, it is easy to plug it into any chess GUI that supports UCI protocol.

Tournaments

Zahak recently got invitation to the TCEC tournament!

Zahak is also participating in ZaTour tournament series for open source and original chess engines. And many other tournaments, like the ones arranged by the amazing Graham Banks.

Rating

Zahak is in almost all major rating lists, here are the details:

version CCRL Blitz Rating CCRL Blitz (8CPU) Rating CCRL 40/40 Rating CCRL 40/4040 (4CPU) Rating
9.x 3278 3406 3213 3282
8.x 3133 N/A 3098 N/A
7.x 2964 (32 bit: 2897) N/A 2938 3006
6.x 2833 N/A 2800 (unstable rating) N/A
5.0 2730 N/A 2676 N/A
4.0 2570 N/A 2568 (unstable rating) N/A
3.0 2407 N/A N/A N/A
2.0.0 2105 (unstable rating) N/A N/A N/A
1.0.0 2011 N/A N/A N/A
0.3.0 1922 N/A N/A N/A
0.2.1 1824 N/A N/A N/A
version CEGT 40/4 Rating CEGT 40/20 Rating CEGT 5"+3' Rating (Ponder On)
9.x 3182 3162 3199
8.x 3046 3022 3051
7.x 2840 N/A 2858
6.x 2664 N/A 2676
5.0 2553 N/A N/A
4.0 2417 N/A N/A
  • Other well-known rating lists
version GRL 40/2 Rating SPCC Rating BRUCE Rating Fast GM 60+06 Fast GM 10m+6s
9.x 3244 3273 3283 N/A 3138
8.x 3140 N/A 3169 N/A 3057
7.x 2929 N/A 2981 2749 N/A
6.x 2785 N/A 2841 2584 2720
5.0 2686 N/A 2683 2505 N/A
4.0 2522 N/A N/A N/A N/A
3.0 2378 N/A N/A N/A N/A

Implemented Features:

Core Features

  • UCI Support
  • (Magic) Bitboards
  • Multi-stage move generation
  • Transposition Table
  • Pawnhash
  • PolyGlot opening book
  • Compliant with OpenBench
  • Syzygy Support
  • MultiPV
  • Skill Levels, 1 to 7 (strongest)

Search

Basics

  • Alpha-Beta search
  • Quiescence Search
  • Iterative Deepening
  • PV Search and PV
  • Search with Zero Windows
  • Aspiration Window with PVS
  • Pondering
  • Multi-Threading (LazySMP)

Move Ordering

  • Hash move
  • Promotions
  • Static Exchange Evaluation followed by LVA-MVV for equal captures according to SEE
  • Killer Moves Heuristics
  • Countermove Heuristics
  • Move History Heuristics
  • Countermove History Heuristics
  • FollowUp History Heuristics

Selectivity

  • Late Move Pruning
  • Null-Move Pruning
  • Delta Pruning
  • Reverse Futility Pruning
  • Futility Pruning
  • Late Move Reduction
  • Razoring
  • Check Extensions
  • Internal Iterative Deepening
  • SEE pruning both in QS and normal search
  • Threat Pruning
  • Singular Extension
  • Multi-Cut

Evaluation

  • NNUE

Command line options

bash-3.2$ bin/zahak -help
Usage of bin/zahak:
  Commands:
   ./zahak         Runs Zahak in UCI mode
   ./zahak bench   Runs Zahak in OpenBench mode
   
  Options:
  
  -book string
        Path to openning book in PolyGlot (bin) format
  -perft
        Provide this to run perft tests
  -perft-tree
        Run the engine in prefttree mode
  -gen-epds
        Generate opening EPDs for self-play
  -profile
        Run the engine in profiling mode
  -slow
        Run all perft tests, even the very slow tests
  -test-positions string
        Path to EPD positions, used to test the strength of the engine

Skill Levels

Anchored around Rustic Alpha 3, I found that, based on CCRL the ratings will probably translate to the following:

  • Skill Level 1: 1270
  • Skill Level 2: 1440
  • Skill Level 3: 1630
  • Skill Level 4: 1856
  • Skill Level 5: 2004
  • Skill Level 6: 2074

Opening Books

Currently only PolyGlot is supported. Then engine doesn't come with any books, but you can attach your favourite one easily by passing the path to -book command: zahak -book PATH_TO_BOOK.

A bunch of free books are available here

Training Networks

Please refer to this guide.

Building

To build the project, simply run make build, testing with make test, and running with make run. Other features exist, for example you can run perft with ./zahak -perft or profile it with ./zahak -profile. You can also run it in perfttree mode with ./zahak -preft-tree.

Contributors

Thanks to the following for their valuable contributions:

  • Basti Dangca: for generating data for training Zahak's network
  • Alan Cooper (Scally): for generating weaker networks for different skill levels.

Acknowledgement

Zahak wouldn't have been possible without:

  • VICE videos
  • Chess Programming Wiki
  • The official OpenBench instance, and the all the hardware donators (noopwn4ftw and others)
  • Aryan Parekh the author of Bit-Genie, who helped me with NNUE
  • Niels Abildskov the author of Loki, who helped me with Texel Tuning
  • Nasrin Zaza for the amazing logo
  • OpenSource engines like: Weiss, Ethereal, CounterGo, Cheng and Berserk (in no specific order)
  • OpenBench community on Discord
  • No4b for helping me with some evaluation terms
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].