/Alexandria

bitboard chess engine

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Features

  • Engine

    • Bitboard representation
    • Zobrist hashing
  • Search

    • Negamax framework
    • Aspiration Window
    • Alpha-Beta pruning
    • Reverse Futility pruning
    • Late-move reduction
    • Late-move pruning
    • Null-move pruning
    • Razoring
    • IIR
    • SE
    • Check extension
    • PVS
    • Quiescence search
    • Transposition Table
    • Repetition detection
    • killer move, history, Countermove heuristic
    • MVV-LVA capture ordering
  • Evaluation

    • NNUE Evaluation (Big thanks to Luecx)
    • HCE based on material evaluation and a piece square table (legacy and not subject to ulterior development)

Things i tried that didn't work

  • Search
    • SEE

Things i might try in the future

  • Evaluation
    • Improve the nnue using a better architecture and generating more data
  • Search
    • Actually getting SEE to work
    • All the histories i don't comprehend at the time of writing (mostly FUH)

Building

$ git clone https://github.com/PGG106/Alexandria
$ cd alexandria/src
$ make 
$ ./Alexandria

How to use the engine

The Universal Chess Interface (UCI) is a standard protocol used to communicate with a chess engine, and is the recommended way to do so for typical graphical user interfaces (GUI) or chess tools. Alexandria implements the majority of its options as described in the UCI protocol.

Acknowledgements

This project would not have been possible without the following people

  • BluefeverSoftware for his Vice chess engine from which i learnt the basic structure and functionality of a chess engine
  • CodeMonkeyKing for his bbc chess engine from which i learnt how bitboards work and several refined search techniques
  • The whole Stockfish Discord server and Disservin in particular for the sharing of code and the avaliability in answering questions
  • A giant thanks to Luecx that helped me immensely in the process of setting up the NNUE and gave me some training data generated by Koivisto
  • Lucex (again) and Jay Honnold for the wonderlud CudAD trainer that was used to train the NNUE https://github.com/Luecx/CudAD
  • Andrew Grant for the OpenBench platform https://github.com/AndyGrant/OpenBench
  • Morgan Houppin, author of Stash for his "option" code https://github.com/mhouppin/stash-bot