Chess Engine Vs Neural Net: Two Ways To Look At Chess

The promise of technology has always been to outpace human performance. And for decades, developers have worked tirelessly to mimic human thought by creating chess engines. Computer science and artificial intelligence, in particular, have progressed partly in thanks to using chess as a goal.

But what are we talking about when we discuss chess engines and neural networks? We're discussing two approaches that computer programs use to analyze chess. So, here's how chess engines, in general, and neural nets leverage AI.

What is a Chess Engine?

A chess engine is a computer program designed specifically to determine the best chess moves, using a function to evaluate positions.

Related: The Best Opening vs. Italian Game: The Rousseau Gambit

When you look at the history of chess and computers, you'll realize that there were many rocky attempts at producing a chess engine that could actually play a game in its entirety.

And it took until 1997 for a chess program to become sophisticated enough to beat a reigning World Chess Champion. It was only the start of AI in chess.

When is a Chess Engine Considered AI?

It's almost certainly the case that any chess engine you've gotten your hands on in the past decade uses some form of artificial intelligence. 

But it's actually not easy to define when a chess calculator meets the threshold for AI. Some could argue that any chess algorithm that involves a move tree is a form of AI.

But decision-making abilities are a cornerstone of what makes something artificial intelligence. And it's hard to distinguish decision-making from the illusion of the task.

Renowned mathematician and computer scientist Alan Turing created the imitation game, now known as the Turing Test, in 1949. It asks: At what point does a computer think like a human being?

This philosophical question of whether a computer can think, or whether it can only mimic thought, has been a central debate in AI innovation for decades.

The First Chess Engine

The first chess calculator was TuroChamp, created by none other than Alan Turing. When he first created the chess program in 1948, it was too strong for the contemporary computers of its time. Turing had to perform the chess engine's calculations by hand.

Sepia tone portrait of Alan Turing in 1936.
Here is Alan Turing, the "Father of Computer Science" and inventor of one of the first chess calculator programs. Credit: Wikimedia Commons

In a match against his colleague Alick Glennie, a British computer specialist, each move took around half an hour for Turing to calculate. Glennie won in just 29 moves.

To be clear, Turing's work and ideas were unprecedented, so unprecedented in fact that he is often called the father of computer science. The TuroChamp chess calculator program was a predecessor to AI.

Deep Blue: the First Chess Computer to Beat the Best

An example of a chess engine that falls under a weaker form of AI is Deep Blue. While Stockfish is the go-to chess engine for any player interested in chess training, Deep Blue might be the most widely known chess program among non-players for having beaten Garry Kasparov, the reigning World Chess Champion, in a highly publicized match in 1996.

Deep Blue utilized 32 processors to perform high-speed computations simultaneously. It could evaluate 200 million chess positions in a single second. And its technology would have use cases in the pharmacy and finance sectors. Surely this was a form of AI, correct?

Not so fast! A 1997 article by Richard E. Korf suggests that IBM produced a Deep Blue FAQ that same year, claiming that Deep Blue did not use artificial intelligence. His source for the quote leads to a broken page on IBM's website. 

Image of Deep Blue and its processor in a museum.
Here is Deep Blue, the chess computer that defeated Kasparov! Credit: Christina Xu: Wikimedia Commons

He goes on to argue that Deep Blue doesn't play chess like a human does. It's far stronger than the human mind. Therefore, he claims, it's not artificial intelligence. But we wouldn't dare define AI in this manner today.

A 2019 Forbes article describes Deep Blue as a form of explainable AI. It was a supercomputer processor with chess accelerator chips. The software performed basic chess computations, while the accelerator chips explored move trees.

The program could reach beyond depth 20. It also utilized an opening book to reduce the amount of brute force calculation needed in the earlier phases of the game.

Related: The 10 Best Chess Openings for White

What made Deep Blue explainable AI is that after a given game, programmers could audit the computer's decision by reviewing its decision tree and transparently explain how it arrived at its conclusion.

We are now in "black box" AI territory. This is AI that is so complex that its decision-making capacities are not accessible to developers. One type of black box AI is a neural network.

Neural Networks: A Crash Course in Chess Training Computers

You might dare to ask: What is a neural network anyway?

That's a loaded question! Here's what a neural network is in… the simplest terms.

Neural Networks are a specific kind of AI that "learns." We often hear terms in AI used interchangeably. So let's get some relationships straight:

  • AI is an algorithm that makes decisions based on data.
  • Machine learning is a subset of AI.
  • Deep learning is a specific kind of machine learning.
  • A deep learning algorithm is composed of more than three neural networks.
  • Neural networks are made of nodes, or neurons, that are organized into layers.
  • Nodes take an input, perform a computation, and release an output.

AI refers to machines that apply problem-solving capabilities to achieve complex tasks that humans typically perform. These tasks may involve pattern recognition or decision-making. 

Machine learning refers to AI that is optimized to reduce errors over time. Non-deep machine learning depends on human inputs to structure data for the computer to learn from. On the other hand, deep learning can take unstructured data and learn without the need for human intervention.

Deep learning algorithms use at least three neural networks. Each network consists of node "neural network" layers:

  • one input layer
  • one or more hidden layers
  • and one node layer

Deep learning is "deep" because it has many layers.

Graphic of deep learning circle nested in machine learning circle, which is nested in artificial intelligence circle.
Here is a representation of how deep learning is a subset of machine learning, which is a subset of AI. Credit: Lollixyzc/Wikimedia Commons

Still confused? Here's a post from IBM to learn more about the relationship between AI, machine learning, deep learning, and neural networks. 

It's a big topic. In the context of chess, neural networks are unique in that they can perform chess training on their own from scratch, as opposed to being hard-programmed to function as chess calculators.

The Computer Chess Championship

The Computer Chess Championship (CCC) is Chess.com's constantly running tournament that pits top chess engines and lesser-known chess calculators against each other to determine the best.

The CCC should not be confused with the World Computer Chess Championship and the Top Chess Engine Championship.

The point of all of these competitions is to allow us to analyze moves that we can see the logic behind but might not be able to find on our own.

Chess.com occasionally posts analysis videos of such moves on its YouTube channel that players can use for chess training.

Meet the Chess Engines of the CCC

Here are some well-known chess programs in the CCC.

Stockfish is an open-source chess engine that was introduced in 2008. Stockfish version 16 was its first iteration that leveraged NNUE neural networks.

A visual representation of Stockfish's Neural Network. A series of small squares varies in brightness in shades of green.
Here is a visual representation of Stockfish's neural network. This network is the most widely used for chess training today. Credit: SFisGOD/ Wikimedia Commons

Leela Chess Zero (LCZero) is an open-source neural network-based chess engine inspired by DeepMind's AlphaZero project.  It has learned chess "entirely through self-play," according to its website. 

Komodo is a commercial chess engine derived from Doch, a previous engine, in 2010. In 2020, new iterations of the game were called Dragon and contained an embedded neural network.

Torch is Chess.com's own chess engine. It was first launched in 2023 and uses a neural network.

Concluding Thoughts: Chess Engines and Neural Nets

As you can see, it's now widely common for chess engines to use neural networks. Chess technology will continue to evolve. The future is exciting for both chess engine developers and players interested in chess training tools.

FAQ: Chess Engine Vs Neural Net: Two Ways To Look At Chess

How have chess computers changed chess?

Chess calculators and computers have significantly altered the way chess players prepare for chess. Now, chess players use engines to prepare opening surprises and review mistakes. Chess AI also makes it easier for players to cheat, both online and in person.

How can I tell if my opponent is using a chess engine?

Some ways you can tell an opponent is using an engine is if they are playing moves in regular 3-5 second intervals, are flawlessly winning consecutive games, or are suddenly playing substantially more accurately for their skill level.

If you suspect your opponent is cheating in an online game, you can report them to Chess.com or LiChess, which will use their anti-cheating tools to check if your opponent exhibits telltale signs of cheating based on their metrics.

Which is better, a traditional chess engine or a neural network?

Neural networks have the opportunity to learn independently, giving them more opportunity to outpace traditional engines. With that said, LiChess performed consistently well in the TCEC even when competing against neural nets before the NNUE update.