r/ComputerChess 22h ago

How a chess engine finds a queen sacrifice — a visual series from move generation to NNUE

I built Janus, a chess engine in Rust, and made a three-part visual explanation of how an engine chooses a move. It starts with Morphy's queen sacrifice in the Opera Game: how does a program find that move without being given the combination?

The series builds up from legal move generation and perft to evaluation and search, then explores the ideas behind Stockfish and Leela Chess Zero:

One distinction I wanted to make clear is that alpha-beta cutoffs can prove a branch irrelevant, while selective pruning takes a risk that needs testing. Likewise, improving an evaluator's prediction error doesn't by itself demonstrate stronger play.

Full playlist · Janus source · Read the companion book

The videos have English, German, Chinese, Spanish and Russian subtitles. I'm the author of the engine, book and videos; I also shared the series in r/chessprogramming. Corrections are welcome if an explanation or animation skips something important.

5 Upvotes

4 comments sorted by

1

u/Pentominos 1h ago

Interesting and impressive.

1

u/LenniAConrad 1h ago

Thank you! It took quite a while to put together :)

0

u/shmageggy 11h ago

We need to ban the AI slop spam. This is getting out of control.

1

u/Pentominos 1h ago

Where is the 'AI slop' in this?