AlphaZero and How It Changed the Way AI Played Computer Chess


Computer chess engines are fairly old technology. It first came into the limelight when the DeepBlue engine of IBM defeated Garry Kasparov when he was at his peak time in 1997. This defeat shocked the world. The machine had beaten humans in a game of intellect. Since then, chess engines have been updated and improved continuously. In 2017, DeepMind announced a new engine, AlphaZero.

On December 5, 2017, the chess world was shocked to its core once again when AlphaZero beat Stockfish 8, the strongest chess engine of the time. During a time-controlled 100-match game, AlphaZero won 28 matches, drawing 72, and 0 losses.

What is AlphaZero?

In the beginning, AlphaZero wasn’t developed as a chess engine. It was a program that could learn board games like Shogi, Chess, and Go by playing with it. Scientists at DeepMind used Neural Network System to develop the engine. From there, it trained itself numerous times to learn chess.

Before, chess engines used brute force techniques to find the best move. This technique worked by calculating millions of movesets to find the best possible result. In this case, engines were provided with as much data as possible to teach them chess. It required a very powerful computer to calculate millions of positions and evaluate them quickly. The program would try to predict the possible outcome of every legal move of each piece for the next few moves. It used the Alpha-Beta Pruning method to make this process as fast as possible.

However, AlphaZero used Neural Network and Self-learning model. It worked by only looking for the best positions from its experience of training. It used the Monte Carlo Tree Search algorithm to find the board’s best possible move. AlphaZero had no human teaching or knowledge to learn chess.

Why AlphaZero was so powerful?

AlphaZero used Tensor Processing Unit (TPU) that Google programs use. It used 5,000 first-gen TPUs and 64 second-gen TPUs to train itself. Scientists at DeepMind estimated that the engine was playing at a higher ELO rating level after only 4 hours of training without any opening books or endgame tables.

While AlphaZero searched for 80,000 positions in a second, Stockfish 8 searched for around 70 million. This huge difference in number was covered by searching only for promising positions. This made AlphaZero more performant.

After DeepMind released the results of the first 100-match game, everyone was in disbelief and awe. Stockfish was completely thrashed with 28 losses and 0 wins. In a 1,000-match game, AlphaZero won 155, lost 6, and drew 839 matches. Garry Kasparov commented that by learning from playing with itself, AlphaZero had developed strategies that “reflect the truth”. The engine used moves that no one had seen before because it learned chess all by itself without any help from traditional chess openings or endgames.

A chess game between Stockfish and AlphaZero
Image: Tasin Khan/TechAcute

Artificial Neural Networks conquered computer chess

Pretty soon, every other prominent chess engine began to have a neural network and self-learning system in place. AlphaZero was closed-source and ran on Google hardware, so it was impossible to create something identical. But enthusiastic programmers managed to create Leela, an Open Source Chess engine that used the same method as AlphaZero.

Stockfish NNUE (efficiently updatable neural network) version was created and merged with Stockfish in 2020. AlphaZero project was discontinued later. The program was never made public, but their paper is available in the Science journal. Despite its brief appearance, it changed and reshaped computer chess and the chess world.

YouTube: AlphaZero: Shedding new light on the grand games of chess, shogi and Go

Photo credits: The feature image has been taken by Gorodenkoff. The screenshot in the body of the article was taken by the author for TechAcute.
Sources: James Somers (The New Yorker) / Stockfish / Science

Was this post helpful?

Tasin Khan
Tasin Khan
A unity developer with a passion in Technology and Gaming
- Advertisment -
- Advertisment -
- Advertisment -
- Advertisment -
- Advertisment -
- Advertisment -