Thanks to visit codestin.com
Credit goes to github.com

Skip to content

kz04px/AltairChessEngine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Altair

License Release Commits

Altair is a strong UCI-protocol chess engine that succeeds my old python engine Antares.

Ratings

CCRL Rating List
MCERL Rating list

Version CCRL Blitz CCRL 40/15 CCRL FRC MCERL
1.0.0 ---- 2406 ---- ----
2.0.0 2879 2808 ---- 2639
3.0.0 3012 3002 ---- ----
4.0.0 ---- ---- 3082 ----

Download

The release provides different binaries.
Altair can also be built from the source code with cmake, using the CMakeLists.txt, and make, using the makefile.

Play

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-strength.

Board Representation

Altair uses a 10x12 mailbox array. This board representation gives padding around the 8x8 board for faster move generation. Altair also features piece lists.

I hope to use bitboards instead in the future since they can be much faster if implemented well. The benefits of implementing bitboards would be a hundred elo gained in strength; however, it would require most of the engine to be rewritten.

Move Generation

Offsets / Increments are used in loops to generate the pseudo-legal moves. Within the search and perft, the moves are tested for legality, and if the move is not legal, we skip to the next move.

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

These are some of the evaluation features present in Altair:

  • Material
  • Piece Square Tables
  • Mobility
    • Open and semi-open files for rooks and queens
  • Pawn Structure
  • King Safety
    • King Danger Zone
    • King Tropism
    • Pawn Shield
    • Pawn Storm
    • Open Files
  • Piece Threats & Support
  • Bishop Pair
  • Tempo
  • King Tropism (Distance from pieces to a King)
  • Tapered evaluation between the middlegame and endgame
  • Scaling based on the likeliness of a draw

Credit and Thanks

Altair was created with the help of many people and usage of many resources. Altair is also inspired from other strong and notable engines.

Mentions:

  • The Chess Programming Wiki contains invaluable resources that I have used.
  • The Bitboard Chess Engine in C Playlist is a nice video series that contains implementations for different ideas and features.
  • @archishou has helped and supported me a lot in the development and improvement of my engine.
  • @GediminasMasaitis has also helped me a lot in the development of my engine. His engine Chessdotcpp has inspired me with many ideas. Since version 1.3.6 and beyond, I have also used his Texel Tuner for tuning evaluation parameters.
  • Weiss is another great inspiration and resource.
  • The Engine Programming Discord Server for answering many of my questions.
  • Everyone in this OpenBench Testing Instance for their support and contributions in testing my engine.

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

About

A chess engine made in c++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.0%
  • Other 1.0%