> Checkmate: Mastering chess and the development of AI

It is back – and with a bang. The popularity of chess has soared in the past year, with a combination of society-wide lockdowns and the hit Netflix TV show The Queen’s Gambit sending sales of the board game through the roof. Uptake has also increased online, with tens of millions playing against friends, bots or AI opponents.

For coders, the chess renaissance represents something of a walk down memory lane mixed with next-generation programming expertise because chess has served as a yardstick in the measure of Artificial Intelligence development for decades.

Humans have been creating computer chess opponents since the 1950s, when engineers and developers first imagined the steps and processes needed for an AI program to match and beat a brain in this most complex of games.

Ever since 1997, when IBM’s Deep Blue famously beat world champion Garry Kasparov, programmers have been creating more complex chess engines through major advances in AI, neural networks and deep learning. Indeed, while it may have taken over 40 years to advance a computer that could beat the world’s best, humans have been unable to defeat a chess engine for the last 15 years.

The following engines all represent important milestones in coders moving the needle in the development of chess and AI...


After originally dismissing the idea that AI chess engines could defeat a top-level grandmaster, Kasparov’s claims looked solid enough following a 4-2 victory over Deep Blue under tournament conditions in 1996. A year later, Deep Blue turned the tables by recording a 3.5-2.5 victory over chess’ finest

The original Deep Blue machine in 1996 was a major breakthrough. The system boasted over 500 processors, 216 accelerator chips and a backroom team of grandmasters who played against the machine and built a library of moves to assess during games.

The revamped version in 1997, which featured a new chip with enhanced ability to evaluate chess concepts and figure out the best move, was capable of searching for up to 200 million options per second, double the capacity of its predecessor.

Aside from its landmark defeat of Kasparov, the development of Deep Blue inspired machine-based research that evaluated marketplace trends, explored risk analysis and analyzed molecular dynamics which helped medical teams researching the development of new drugs.


Since its release in 2008, this free and open-source engine has changed the game - largely thanks to inert ability to revise its playing code and change how it plays based on a transportation tables feature, a testing framework and ‘experience’ which translates as billions of games and over 4000 years of CPU time donated by volunteers


Released in 2017, AlphaZero is a more recent system that learned to play and master chess through self-play and deep reinforcement learning. Developed by Deep Mind, the UK-based AI company bought by Google in 2014, the engine was released with nothing but an imprint of the rules of chess.

Nine hours later, it had played a staggering 44 million games against itself thanks to a novel ‘Monte Carlo Tree Search’ algorithm, the heuristic search for decision processes, and its neural network. After only two hours, AlphaZero was performing better than the best human players, and after four hours it beat the best chess engine on the planet. In 100 consecutive matches, AlphaZero beat Stockfish 28 times and drew 72, with zero losses.


Having leveraged AI advances to create machines unbeatable by man, developers have now turned their attention to creating a new engine that can play like a human. In December, the Maia chess engine was released on the free online chess server lichess.org. The AI model of Maia has been trained in individual human chess moves - rather than the larger problem of winning a game - to mimic human behavior. To do this, researchers customized Leela, the open-source system based on the AlphaZero program and created nine bots designed to play with a range of skills – from novice to strong amateur standard.

The reason? To create a more enjoyable chess experience and to work on designing AI systems that have human collaboration in mind. There is a big difference between human and algorithmic behaviour, and Maia is an attempt to develop an AI that reduces the difference.


For budding coders, creating a chess game can offer as much of a challenge as taking on a grand master. Check out Github and open-source hubs before you start your project for many UCI engines and programmes in Python, Ruby, C++ and more, plus pre-built solutions and GUIs that will avoid the need to start from scratch.