Alexandria Chess Engine: How Modern AI Learns, Evaluates, and Plays Like a Grandmaster

XB

December 4, 2025

a 5:3 featured image illustrating the concept of modern computer chess engines. Focusing on a sleek, futuristic chessboard with glowing neural-network patterns, representing AI thinking.

With a name evoking the ancient world’s greatest repository of knowledge—the Library of Alexandria—this engine has quickly established itself as a “Super Grandmaster” level entity. It is a testament to the power of open-source development, modern C++ programming, and the revolution of neural networks in chess.

This article explores the origins, technology, playing style, and significance of the Alexandria chess engine, breaking down complex technical concepts into simple terms.

1. What is the Alexandria Chess Engine?

Alexandria is a UCI (Universal Chess Interface) chess engine. Like other engines, it does not have its own graphical board; it is the “brain” that you plug into a user interface (like Arena, Banksia, or Fritz) to analyze positions or play games.

It is a free, open-source project developed primarily by Tejas Rao (known in the coding community by the handle PGG106). Unlike some engines that are secretive about their inner workings, Alexandria is transparent. Its code is available on GitHub, allowing other programmers to study, learn from, and even contribute to its development.

Since its release, Alexandria has climbed the ranks with astonishing speed. It currently sits comfortably in the top tier of all chess engines, boasting an Elo rating that rivals the very best in the world.

The Name: A Symbol of Knowledge

While the developer has not written a lengthy manifesto on the name, the choice of Alexandria is poetic for a chess engine. The Library of Alexandria was intended to be a collection of all human knowledge. Similarly, a modern chess engine, equipped with neural networks, compresses millions of chess games and positions into a single file, effectively a “library” of chess understanding that exceeds any human’s capacity.

2. Under the Hood: C++ and the “Bitboard” Standard

To understand why Alexandria is so fast and strong, we have to look at its architecture.

The Language: C++

Alexandria is written in C++, the gold standard programming language for high-performance software. While newer languages like Rust (used by the Reckless engine) are gaining popularity, C++ remains the language of choice for the absolute fastest engines, including Stockfish. It allows the developer to micromanage how the computer uses memory, ensuring that the engine can calculate millions of positions per second without slowing down.

Board Representation: Bitboards

At its core, Alexandria sees the chess board not as squares and pieces, but as a series of 64-bit numbers called Bitboards.

  • Imagine a string of 64 zeros and ones.
  • A “1” might represent a square where a white knight is standing, and a “0” represents an empty square.
  • By using math operations (like AND, OR, XOR) on these numbers, Alexandria can calculate complex moves—like “where can all the knights move?”—in a single processor cycle.

This efficiency is the foundation of its strength, allowing it to “see” deeply into the future.

3. The Brain: The NNUE Revolution

If efficient code is the engine’s body, NNUE is its soul.

NNUE stands for Efficiently Updatable Neural Network. Before 2020, chess engines relied on “hand-crafted” evaluation functions. A human programmer had to write code that said, “If a pawn is in the center, give it +10 points” or “If the King is open, subtract 50 points.”

Alexandria, however, does not rely on human rules. It uses NNUE technology, which combines the brute-force calculation of a traditional engine with the intuition of a neural network.

How It Learns

Alexandria’s neural network has been trained on millions of chess positions. Interestingly, it often uses data generated by Leela Chess Zero (Lc0), another famous AI engine that taught itself chess from scratch.

  • The Process: The engine looks at a position and its neural network assigns it a score (e.g., “White is winning by 0.5 pawns”).
  • The Speed: Unlike older, massive neural networks that required heavy graphics cards (GPUs), NNUE is incredibly light. It runs efficiently on the computer’s main processor (CPU), allowing Alexandria to evaluate tens of millions of positions per second while still maintaining a “human-like” understanding of the board.

This gives Alexandria a unique flavor: it has the tactical sharpness of a calculator but the positional “feeling” of a Grandmaster.

4. Playing Style: The “Strategic Scholar”

How does it feel to play against Alexandria? Or to watch it play?

If the Reckless engine is the “bad boy” of chess, Alexandria is the “Scholar.” It is precise, incredibly knowledgeable, and extremely hard to trick.

1. Positional Squeeze

Because its neural network is trained on Leela data, Alexandria excels at “quiet” chess. It understands concepts that older computers struggled with, such as:

  • Space advantage: It knows when to push pawns to cramp the opponent.
  • Piece activity: It values active pieces over material. It might sacrifice a pawn just to make sure its Bishop has a clear diagonal.
  • Prophylaxis: It often plays moves that stop your threats before you even make them.

2. Tactical Precision

Despite its positional understanding, it is still a computer. If you make a tactical error—even one that leads to a checkmate in 25 moves—Alexandria will find it instantly. It does not possess “mercy.”

3. The “Human” Touch

Users often report that NNUE engines like Alexandria play moves that feel more “natural” than older engines. Instead of making weird, robotic moves that only make sense 20 moves later, Alexandria often builds attacks in a way that human experts can understand and appreciate (even if they couldn’t calculate it themselves).

5. Performance and Rating

In the objective world of computer chess, feelings don’t matter, results do. Alexandria has proven itself in the fiercest battlegrounds: the CCRL (Computer Chess Rating Lists).

  • Rating: As of late 2024/early 2025, Alexandria consistently holds an Elo rating above 3600.
    • To put this in perspective, Magnus Carlsen (the greatest human player) has a peak rating of 2882.
    • Alexandria is roughly 700-800 points stronger than the World Champion.
  • Rankings: It frequently ranks in the Top 10 of all engines globally, trading blows with other giants like Obsidian, Berserk, Ethereal, and Koivisto.
  • Stability: One of Alexandria’s key strengths is its stability. It rarely “crashes” or loses on time, making it a reliable tool for analysis.

It is specifically noted for being very strong in Blitz time controls, meaning it can think incredibly fast.

6. Why Use Alexandria Instead of Stockfish?

You might ask: “If Stockfish is the #1 engine, why should I care about Alexandria?

This is a valid question. Stockfish is indeed the strongest. However, there are compelling reasons to keep Alexandria in your toolkit:

1. A Second Opinion: Computers are not perfect. Sometimes Stockfish gets “stuck” in a position, thinking it is a draw (0.00). Alexandria, having a different neural brain, might look at the same position and see a winning chance (+0.40) because it values different patterns. Using multiple engines gives you a more complete “truth” about a chess position.

2. Diversity of Play: If you are using an engine to play training games, playing against Stockfish can feel like hitting a brick wall. Alexandria, while still unbeatable for humans, offers a slightly different style of resistance. It might choose different openings or different defensive setups, broadening your experience.

3. Supporting the Ecosystem: Using and testing engines like Alexandria supports the open-source community. These developers work for free to push the boundaries of science. By downloading and using their engines, you validate their work and help them find bugs.

7. How to Install Alexandria

Getting Alexandria running on your computer is simple, even if you aren’t a “tech wizard.”

Step 1: Download a Chess GUI

You cannot run the engine file directly (it has no graphics). You need a “chessboard” program. Excellent free options include:

  • Arena (Classic, feature-rich)
  • Banksia GUI (Modern, beautiful)
  • Cute Chess (Simple, fast)

Step 2: Download Alexandria

  1. Go to the official GitHub page (search for “PGG106 Alexandria GitHub”).
  2. Look for the “Releases” section on the right side.
  3. Download the latest file for your system (usually ending in .zip or .7z). Inside, you will find an executable file (e.g., alexandria.exe).
    • Tip: If you see versions like avx2 or bmi2, choose the one that matches your processor. If you are unsure, the popcnt or “modern” version is usually a safe bet.

Step 3: Install

  1. Open your Chess GUI.
  2. Find the menu option for “Engines” -> “Install New Engine” (or “Manage Engines”).
  3. Navigate to the alexandria.exe file you downloaded and select it.

Step 4: Play or Analyze

Start a new game and select “Alexandria” as your opponent, or open an analysis window to let the “Strategic Scholar” teach you the secrets of your favorite openings.

FAQ: Alexandria – The Strategic Scholar of Computer Chess

1. Is Alexandria free to use?

Yes. Alexandria is completely free and open-source. You can download it directly from the developer’s GitHub repository.

2. Is Alexandria as strong as Stockfish?

Stockfish is still the strongest engine in the world. However, Alexandria consistently ranks above 3600 Elo, placing it firmly among the top engines globally.

3. How is Alexandria different from Stockfish or Lc0?

  • It uses NNUE like Stockfish but often draws training data inspired by Lc0.
  • Its playing style is more strategic and patient—earning it the nickname “The Scholar.”
  • It provides alternative evaluations that differ from Stockfish’s perspective, making it a useful second opinion.

4. Do I need a GPU to run Alexandria?

No. NNUE is optimized for CPU performance, meaning a standard computer is enough to run Alexandria efficiently.

5. What is Alexandria best suited for?

  • Deep analysis of positions
  • Training games
  • Getting a second viewpoint alongside Stockfish
  • Research and experimentation for programmers

6. Does Alexandria have its own graphical interface?

No. It is a UCI engine and must be loaded into a GUI such as Arena, Banksia, Cute Chess, or Fritz.

7. Which Alexandria version should I download (AVX2, BMI2, POPCNT…)?

If you’re unsure about your CPU capabilities, the POPCNT or Modern version is the safest choice.

8. Is Alexandria strong in blitz?

Yes. Alexandria is known for its speed and stability, making it exceptionally strong in Blitz and Bullet time controls.

9. Does Alexandria crash often?

Very rarely. The engine is praised for being stable, consistent, and compatible with a wide range of hardware.

10. Is Alexandria useful for beginners?

Absolutely. Despite being extremely powerful, its NNUE-based play style feels more “natural,” helping beginners and intermediate players better understand strategic concepts.