16 Free and Open-source Chess Engines

16 Free and Open-source Chess Engines

Chess is a strategic board game played between two players, aiming to checkmate the opponent's king. Each player starts with 16 pieces: one king, one queen, two rooks, two knights, two bishops, and eight pawns. The game is renowned for its deep tactical and strategic complexity.

Playing chess on computers has surged in popularity, with platforms like Chess.com and Lichess hosting millions of games daily. Statistics show that there are over 600 million active chess players worldwide, with online platforms attracting millions of users. Chess.com alone has over 70 million members. Studies reveal that regular chess players tend to have higher grades in school, showcasing improved cognitive and problem-solving skills.

What is a Chess Engine?

A chess engine is a software program designed to play chess at a high level, analyzing positions and calculating the best possible moves.

These engines use algorithms and vast databases of opening moves, endgames, and positions to evaluate and determine optimal strategies, often surpassing human capabilities.

They are integral tools for players seeking to improve their game, providing insights, move recommendations, and post-game analysis.

Open-source Chess Engines!

Open-source chess engines are freely available for anyone to use, modify, and distribute. They foster community collaboration, allowing enthusiasts and developers to contribute to their improvement. Notable examples include Stockfish and Lc0 (Leela Chess Zero), which are renowned for their strength and continuous development.

These engines are widely used in online platforms, tournaments, and research, offering transparency and innovation in the chess world.

What is a Universal Chess Interface (UCI)?

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.

1. ChessCoach

ChessCoach is a neural network-based chess engine capable of natural-language commentary. It plays chess with a rating of approximately 3450 Elo, which means it should usually beat even the strongest human players at 2850 Elo, and many other engines, but will often lose to the strongest, such as Stockfish 14 at 3550 Elo.

As with all engines, ChessCoach relies on examining millions of chess positions to decide on the best move to play. It uses a large, slow neural network just like AlphaZero or Leela Chess Zero (Lc0) to evaluate each position, unlike classical engines which aim for speed with a much simpler evaluation, or more recent NNUE engines, which are a stronger hybrid of both styles.

The neural network at the core of the engine is trained by playing against itself, using a feedback cycle to start from almost zero knowledge – just the rules of chess – and learn new ways to beat itself as it grows stronger.

Stronger neural network evaluations let it search better, and stronger search results let it train its neural network evaluation more effectively.

ChessCoach can also feed its chess knowledge into an additional neural network to comment on moves and positions in English. It is not very insightful and often wrong but shows some promise for the limited data it has been able to train on.

GitHub - chrisbutner/ChessCoach: Neural network-based chess engine capable of natural language commentary
Neural network-based chess engine capable of natural language commentary - chrisbutner/ChessCoach

2. Alexandria (C++)

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.

GitHub - PGG106/Alexandria: bitboard chess engine
bitboard chess engine. Contribute to PGG106/Alexandria development by creating an account on GitHub.

3. Sunfish (Python)

Sunfish is a simple, but strong chess engine, written in Python. With its simple UCI interface, and removing comments and whitespace, it takes up just 131 lines of code! (build/clean.sh sunfish.py | wc -l). Yet it plays at ratings above 2000 at Lichess.

Because Sunfish is small and strives to be simple, the code provides a great platform for experimenting.

People have used it for testing parallel search algorithms, experimenting with evaluation functions, and developing deep learning chess programs.

GitHub - thomasahle/sunfish: Sunfish: a Python Chess Engine in 111 lines of code
Sunfish: a Python Chess Engine in 111 lines of code - thomasahle/sunfish

4. Avalanche (Zig)

Avalanche is the first and strongest chess engine written in the Zig programming language, proving Zig's ability to succeed in real-world, competitive applications.

GitHub - SnowballSH/Avalanche: UCI Chess Engine written in Zig.
UCI Chess Engine written in Zig. Contribute to SnowballSH/Avalanche development by creating an account on GitHub.

5. Berserk Chess Engine (C)

UCI Chess Engine written in C.

GitHub - jhonnold/berserk: UCI Chess Engine written in C
UCI Chess Engine written in C. Contribute to jhonnold/berserk development by creating an account on GitHub.

6. Stockfish

Stockfish is a free and strong UCI chess engine derived from Glaurung 2.1 that analyzes chess positions and computes the optimal moves.

Stockfish does not include a graphical user interface (GUI) that is required to display a chessboard and to make it easy to input moves. These GUIs are developed independently from Stockfish and are available online. 

GitHub - official-stockfish/Stockfish: A free and strong UCI chess engine
A free and strong UCI chess engine. Contribute to official-stockfish/Stockfish development by creating an account on GitHub.

7. Java Chess Engine (UCI compatible)

Bagatur chess engine is one of the strongest Java chess engines in the world. It runs on Android as well as on "desktop" Computers

GitHub - bagaturchess/Bagatur: Java Chess Engine (UCI compatible)
Java Chess Engine (UCI compatible). Contribute to bagaturchess/Bagatur development by creating an account on GitHub.

8. Clover (C++)

Clover is a chess engine, written in C++, inspired by my favorite plant. Since the 2020 lockdown, I got bored and decided to combine the 2 things I love the most: chess and programing, into making a program that can beat me.

GitHub - lucametehau/CloverEngine: UCI chess engine
UCI chess engine. Contribute to lucametehau/CloverEngine development by creating an account on GitHub.

9. Caissa Chess Engine (C++)

Caissa Chess Engine is an open-source free strong, UCI command-line chess engine, written from scratch in C++ in development since early 2021. It is optimized for regular chess, FRC (Fischer Random Chess) and DFRC (Double Fischer Random Chess).

GitHub - Witek902/Caissa: Strong chess engine
Strong chess engine. Contribute to Witek902/Caissa development by creating an account on GitHub.

10. Mister Queen (C)

Mr. Queen is a chess engine written in C.

Features

  • Bitboards and "magic" bitboards for board representation and super-fast move generation.
  • Custom, hash-based opening book based on over three million games from the FICS database.
  • Zobrist hashing and a transposition table storing exact values and the best move.
  • Null move pruning, aspiration windows, iterative deepening, quiescence search.
  • Supports the Universal Chess Interface (UCI).
  • Passes all perft tests.

Limitations

Despite its amazing features list, it still comes with some limitations that include:

  • Unaware of draw by repetition.
  • Basic evaluation includes only material and piece-square values.
GitHub - fogleman/MisterQueen: A chess engine written in C.
A chess engine written in C. Contribute to fogleman/MisterQueen development by creating an account on GitHub.

11. CrazyAra

CrazyAra is an open-source A Deep Learning UCI-Chess Variant Engine written in C++ & Python 🦜

GitHub - QueensGambit/CrazyAra: A Deep Learning UCI-Chess Variant Engine written in C++ & Python :parrot:
A Deep Learning UCI-Chess Variant Engine written in C++ & Python :parrot: - QueensGambit/CrazyAra

12. Andoma

♟️ A chess engine with alpha-beta pruning, piece-square tables, move ordering, and command-line UI.

GitHub - healeycodes/andoma: ♟️ A chess engine with alpha-beta pruning, piece-square tables, move ordering, and command-line UI.
♟️ A chess engine with alpha-beta pruning, piece-square tables, move ordering, and command-line UI. - healeycodes/andoma

13. Pleco (Rust)

Pleco is a chess Engine & Library derived from Stockfish, written entirely in Rust.

GitHub - pleco-rs/Pleco: A Rust-based re-write of the Stockfish Chess Engine
A Rust-based re-write of the Stockfish Chess Engine - pleco-rs/Pleco

14. Chess AI

A chess engine by someone who doesn't know how to play chess.

GitHub - zeyu2001/chess-ai: Simple chess AI in JavaScript. Uses the chess.js and chessboard.js libraries.
Simple chess AI in JavaScript. Uses the chess.js and chessboard.js libraries. - zeyu2001/chess-ai

15. Koivisto UCI (C++)

Koivisto is a strong chess engine written primarily by Kim Kåhre and Finn Eggers in C++. Koivisto in itself is not a complete chess program and requires a UCI-compatible graphical user interface.

GitHub - Luecx/Koivisto: UCI Chess engine
UCI Chess engine. Contribute to Luecx/Koivisto development by creating an account on GitHub.

16. Walleye

Walleye is a UCI-compatible chess engine written using the classic alpha-beta style AI.

GitHub - MitchelPaulin/Walleye: A chess engine written from scratch in Rust ♞
A chess engine written from scratch in Rust ♞. Contribute to MitchelPaulin/Walleye development by creating an account on GitHub.






Read more




Open-source Apps

9,500+

Medical Apps

500+

Lists

450+

Dev. Resources

900+

/