Giter Site home page Giter Site logo

altairchessengine's Introduction

Altair

Altair

License Release Commits

Altair is a superhuman UCI-protocol chess engine named after the star Altair.

Ratings

Last Updated 2/8/24
(All rankings are based on single-CPU only for fairness of comparison, ratings without rankings are either old versions or on lists where the best engine version ranking is not shown)

CCRL Rating List
CEGT Rating List
MCERL Rating list

Version CCRL Blitz 2+1 CCRL 40/15 CCRL FRC 40/2 CEGT 40/4 MCERL
6.0.0 #33 3522 #36 3430 #18 3656 #37 3397 3502
5.0.0 3207 3170 3229 3043 3209
4.0.0 3069 3077 3082 2924 3069
3.0.0 3000 3036 ---- 2874 ----
2.0.0 2854 2820 ---- 2674 2649
1.0.0 ---- 2372 ---- 2205 ----

Download

The release page provides different binaries.
Altair's binaries in its newer releases follow the x86-64 Micro-architecture Level scheme.
Most modern computers will support x86-64-v3.

Altair can also be built from the source code with its makefile; however, it's mainly intended for testing purposes on frameworks. Building requires make and a C++20 compiler (Clang is suggested)

Example:

git clone [email protected]:Alex2262/AltairChessEngine.git
cd AltairChessEngine
make

Play

Altair currently supports standard chess and Fischer Random Chess (AKA Chess960)

Altair can be played by connecting it to GUIs such as Arena, Cutechess, Banksia, and other UCI-protocol supporting chess GUIs.

You can also play against Altair on lichess here, but it is not always online. Note: Lichess BOT ratings are deflated compared to their actual human relative strengths.

Analysis

Altair can be used for analyzing positions with software such as ChessBase and other GUIs.

It can also be used in lichess using its APIs with the external-engine repository.

Altair supports a configurable hash size, thread number, and MultiPV for analyzing multiple variations.

Board Representation

Altair currently uses bitboards, binary representations of the chessboard, as the internal board representation as of version 4.0.1
Versions 4.0.0 and prior used a mailbox (12x10), array board representation

Move Generation

Altair uses the magic bitboard approach for decently fast move generation speeds.

Search

Altair utilizes many techniques for its search—the calculation of moves and different positions. At the basis, Altair uses a version of minimax called negamax. On top of this, it uses the traditional alpha-beta pruning algorithm.

Furthermore, different methods of selection, pruning, and reductions enables it to narrow down the amount of positions and moves it has to calculate.

A brief description of Altair's search layout:

  • Iterative Deepening
  • Aspiration Windows
  • Negamax (Minimax)
    • Alpha-Beta Pruning
    • Different Search Enhancements
      • Transposition Tables
      • Pruning
      • Reductions
      • Extensions
  • Quiescence Search
    • Different Search Enhancements
      • Stand-Pat
      • Transposition Tables
      • Pruning

Move Ordering

It is advantageous for a chess engine to look at the best moves first, so worse moves can be easily pruned and discarded.

Altair's Move Ordering is structured like so:

  • Transposition Table Move
  • Promotions
  • Captures
    • Most Valuable Victim - Least Valuable Aggressor (MVV-LVA)
    • Capture History Heuristic
    • Static Exchange Evaluation (SEE)
    • En passant
  • Killer move Heuristic
  • Continuation History Heuristic
  • History Heuristic
  • Castling

Evaluation

The evaluation function is a heuristic function used to determine a non-terminal position's value to aid the search. Since the engine cannot possibly calculate all lines to a terminal state, it must estimate the evaluation of a position it reaches.

Altair used a classical evaluation from its creation to version 5.0.8, and currently uses NNUE (Efficiently Updatable Neural Networks) from version 5.0.9 and onwards.

Neural Network Evaluation

Implemented as NNUE

Data Originality:

Altair's neural networks are trained on completely original data.
The data was originally trained from Altair's classical evaluation, which was specifically tuned from zero values from 5.0.0 and onwards.
The current data has been repeatedly trained on previous data in a cycle of reinforcement learning of sorts from an initial state of zero knowledge.

Current Net (Solaris):

Solaris is a neural network trained on over 2B FENs including a portion of standard data and DFRC (Double Fischer Random Chess) data. Altair currently has king buckets in the input layer, and material output buckets in the output layer.

Architecture:

+----------+----------+----------+ 
| Input    | Hidden   | Output   | 
| 768x4 -> | 768*2 -> | 1x8      | 
+----------+----------+----------+

The x4 in the input layer indicates input buckets, *2 in the Hidden Layer for perspective, and x8 in the Output for output buckets.

Classical Evaluation

This is the legacy evaluation with specifically defined terms, features, and values. It is not used anymore due to strength reasons; however, it can still be used by setting UseNNUE to false.

Note: Altair 5.0.0, the last release using a classical evaluation, is stronger than any other version of Altair using a classical evaluation—including current releases with UseNNUE turned off.

Data Originality:

Altair's classical evaluation from versions 1.3.6 to 5.0.0 was tuned on public Zurichess data, Lichess data, and Ethereal data.
From version 5.0.1 and onwards, Altair's classical evaluation was completely reset to zero values and re-tuned on self generated data from an initial state of zero knowledge.

Features:

These are some evaluation features present in Altair's classical evaluation (a more detailed list can be found in src/evaluation_constants.h):

  • Tapered evaluation between the middle-game and end-game
  • Material
  • Piece Square Tables
  • Mobility
  • Pawn Structure
  • King Safety
  • Piece Threats
  • Bishop Pair
  • Tempo
  • Specialized endgame scaling
  • Specialized Opposite Colored Bishop endgame scaling

Credit and Thanks

Altair was created with the help of many people and usage of many resources, and has taken inspiration from other strong and notable engines.

External Programs / Files:

Altair uses @jw1912's Bullet for training neural networks as of version 5.0.9
Altair uses Dale Weiler's incbin utility for including binary files

Versions 1.3.6 to 5.0.8 used @GediminasMasaitis's Texel Tuner for tuning Altair's classical evaluation.

People:

  • @archishou has supported me a lot in the development of my engine with many ideas and invaluable help in implementing bitboards.
  • @Ciekce has helped me fix many issues in my engine and improved my understanding of programming greatly. His engines Polaris and Stormphrax have also served as great resources. On top of this, he has also helped train Altair's latest neural network with his hardware.
  • @GediminasMasaitis has also helped me a lot in the development of my engine. His engine Chessdotcpp has inspired me with many ideas.
  • Everyone in this OpenBench Testing Instance for their extensive support, gracious contribution of hardware, and help in many other ways.

Additional Mentions:

All mentions above are in no particular order

Furthermore, thank you to all contributors and everyone who has helped to test Altair.

Many people have helped me along the development of this chess engine. Without them, Altair would have never reached this stage.

altairchessengine's People

Contributors

alex2262 avatar iudwgerte avatar archishou avatar kz04px avatar

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.