Over the past few decades, chess and computers have gone together like peanut butter and jelly. However, what’s perhaps most interesting is how the approach to making superior chess-playing programs has changed over the years.

Famed polymath Alan Turing, specialising in computer science and many other related fields, was the first person to put forth a playable chess computer for a full game. In a twist of irony that some might find amusing, the computational processing power in 1951 (when the program was first devised) was so weak that Turing himself could run the operations by hand faster than the computer itself could process each position.

Of course, even a modestly equipped PC in today’s day and age can execute billions of processes per second, but to say we’ve come a long way since then would be an understatement comparable to losing all four engines on a 747 and saying there was a small problem, which, incidentally, actually occurred. But that’s a tale for another time.

Now, as I implied above, the first chess computer was actually one designed to play and win Rook and King vs. King endgames, created way back in 1912. The engine, ‘El Ajedrecista’ (English: ‘The Chess Player’), was designed by Leonardo Torres y Quevedo, a Spanish civil engineer and mathematician. While modern computers can find the optimum mating line from any 3-piece position without breaking a sweat, this wasn’t the case with the limited computational power of the day.

Considered the first computer game in history by some, El Ajedrecista used an algorithm to solve any position with the aforementioned endgame scenario, sometimes taking more than 50 moves to do so — a fact that would make it draw using modern chess rules. Nevertheless, 50-move rule aside, the machine was a technological marvel in its day, deservedly getting the attention it attracted in its day.

Fast-forward 100 years or so — and skipping over Deep Blue’s famous victory against Kasparov in 1997 (which primarily used brute force in its approach rather than heuristics like 21st-century engines usually do) — and we end up with Deep Mind’s AlphaZero program. Instead of brute force or the kind of tailor-made heuristics employed by contemporary chess engines such as Stockfish or Houdini, AlphaZero used machine learning to play millions of games against itself, improving rapidly over nine hours and thrashing Stockfish, the world’s strongest chess engine, in a 100-game match.

AlphaZero, which had an entire team of computer scientists and high-end hardware to formulate the program, proved itself to be the strongest chess computer in the world (although some have argued the fairness of the tournament conditions, which have been speculated to serve as a disadvantage to Stockfish, which was also running a slightly outdated version).

Nevertheless, the writing was on the wall: machine learning was clearly the future. Ironically, unadulterated from human input (as is not the case with more orthodox engines such as Stockfish), machine learning has proven to be the best long-term solution to further the development of chess knowledge. Moreover, it inspired development on a new machine-learning engine: Leela Zero, originally designed for the ancient Chinese board game called ‘Go’; this, in turn, got forked into Leela Chess Zero—and you can play against it right now on your own computer.

The main difference between AlphaZero and Leela Chess Zero is how the processing power is sourced. Whereas AlphaZero had the might of Alphabet’s (aka Google’s) resources, Leela Chess Zero relies on sharing the workload between thousands of volunteers across the planet to improve the program. The program itself uses deep learning that is actually based on the AlphaZero paper, albeit this version is an open-source project, meaning anyone can contribute to the project (like Stockfish) by lending graphical processing power (sometimes called ‘crowd computing’ or crowdsourced computing).

Leela uses a combination of GPU and CPU — instead of the more common CPU alone — primarily because of a GPU’s parallelism and efficiency for the task at hand. The ‘Zero’ designation in the names of both engines refers to the fact that none of the games that either program uses is influenced by human play; this is to prevent any human-imposed biases that may adulterate the long-term calculation and improvement of the engines.

Side note: For people who don’t care much for chess, this kind of technology has far-reaching applications that go well beyond the scope of smoking humans at ancient board games. It’s not just chess engines that are making use of deep learning; many successful companies, such as Amazon and Netflix, use AI and deep learning to optimize efficiency in customer retention (and, therefore, profits).

Business use aside, with an ELO rating already eclipsing 3000 and closing in on other strong chess engines, Leela may one day become the best there is in the chess world, and its usefulness for helping humans in certain positions might become invaluable, especially to professionals. A 4-chip TPU (as used for AlphaZero) does this by assessing only about 80,000 positions per second (on average), which, even 20 years later, is 2,500 times less than Deep Blue’s 200 million positions per second; Leela, on the other hand, can evidently crush a grandmaster calculating only a couple thousand positions per second when running consumer-grade hardware.

On April 22, 2018, a series of games comprising a 44-game exhibition match was played between by 18-year-old American grandmaster Andrew Tang and a version of Leela Zero (ID 125). The overall score was 40 to 4, in favour of Leela, with only one victory for Tang (which came under ‘ultrabullet’ time controls, whereby both players had only 15 seconds each to make all their moves). If Leela continues its meteoric progress, I suspect that it will soon be impossible for a human player to achieve any victories against it under any time controls whatsoever. The sole human victory in this match was an unexpected win in an otherwise painful 2-hour slog against Leela Chess Zero. Developers are expected to update Leela’s handling of time management for future iterations.