Category Archives: Artificial Intelligence

Explaining Chess

One of the great things about chess is that it is a crucible for so many aspects of computer technology. The development of chess engines has transformed chess over the last 25 years. Computers famously became much stronger players than humans. The latest artificial intelligence innovations from DeepMind’s AlphaZero combine neural networks with Monte-Carlo tree searches to produce new insights into chess theory (see Matthew Sadler and Natasha Regan’s talk). The approach is now popular with the emergence fo the Leela Chess Zero project: an open-source chess engine based upon AlphaGo.

The well-known drawback to neural networks is that although they may produce excellent results, they are like a black box. You cannot interrogate a neural network in the same way that you could ask questions of an expert or indeed an expert system. If you look under the bonnet of a neural net you just see a bunch of numbers, no doubt finely tuned, but in themselves meaningless. Even if you use the leading conventional chess engine Stockfish you are stuck with its evaluations. It is not showing you, it is telling you. Step forwards Decodea’s Gideon Segev who articulated the issue and the solution.

Decodea is an Israeli company in the rapidly expanding field of Explainable AI. Their approach is take the output from an AI system, Stockfish in the case of chess, and then to provide an explanation based upon high level concepts such as deduction chains (“if this then that”) and counterfactuals (“if this hadn’t happened”). Gideon shows some examples from games in which surprising moves are shown to have an inevitable logic to them. These explanations convert the mysterious into the familiar. Where chess leads, other domains will follow.

Game Changer – The Alpha Zero programme

Each of the sessions at the London Chess Conference 2019 contained a wealth of wisdom none more so than the presentation given by Matthew Sadler and Natasha Regan on their book Game Changer published by New in Chess which has received glowing reviews. The book won the English Chess Federation Book of the Year award and so we were pleased to invite them to explain what the book is about and why AlphaZero has been such a “game changer”. AlphaZero is world-beating chess software developed by Google’s Artificial Intelligence specialists at DeepMind.

The commotion caused by AlphaZero in the chess world relies upon the coincidence of two extraordinary factors. Firstly, there is the revolutionary “self-learning” software. This comprises a suite of algorithms that evaluate game performance and provide automatic feedback to update the move decision parameters. With fast processing, it only took 9 hours to process 44 million games which was sufficient to reach the pinnacle of chess strength – and to crush Stockfish. Until then, Stockfish was the top chess engine in the world, incorporating expertise from generations of chess players. By contrast, AlphaZero did not include any prior knowledge of chess. This is the significance of the suffix “Zero” – there is zero human chess expertise. In fact, the technical programmers of AlphaZero are not chess players.

The founder of DeepMind, Demis Hassabis, invited his old friends Matthew and Natasha to look over the games that had been generated in a private experimental match between the “machine learning” AlphaZero and the “expert system” Stockfish. Former British champion Matthew Sadler doesn’t play chess professionally nowadays but nevertheless remains (at the time of the presentation) the 2nd ranked player in England. He retired from chess pre-Magnus for a career in software architecture but keeps abreast of developments and practises on chess engines. His co-author Natasha Regan is a titled chess player and also a player of Go and Shogi. AlphaZero had emerged from a previous implementation (AlphaGo) in the game of Go where the world’s top player Lee Sedol from South Korea was comprehensively defeated – drawing the world’s attention to the potential for deep learning – the multi-level approach to machine learning.

The second extraordinary factor is the nature of AlphaZero’s games – brilliant and dazzling – a giant step for mankind. We are familiar with chess engines exploring deep and wide to analyse variations. What we get extra with AlphaZero is strategic vision. All of a sudden, the middlegame tomes have to be rewritten. Themes which were previously disparaged are now centre stage. AlphaZero has unearthed a new range of themes as described in Game Changer. The byword is strategic flexibility – e.g. being able to switch plans depending upon the position.

Perhaps the most visually striking theme is advancing the rook pawns as far as it will go. We tell beginners to keep their rook pawns back lest the king’s position becomes compromised. AlphaZero shows that this traditional advice is too cautious and that there are attacking possibilities as well as defensive advantages e.g. allowing room for the king to escape. AlphaZero also drew attention to the advantages of opposite-coloured bishops. The fear of draws is outweighed by the offensive capabilities. AlphaZero is much less materialistic than conventional theory. Pawn and exchange sacrifices are commonly used to increase piece mobility and open up long term attacking chances even though the justification may not seem obvious for several moves. Conversely, AlphaZero seeks to restrict the mobility of the opponent’s pieces.

Game Changer is their second book together. Their previous book was called Chess for Life and contained fascinating analyses, augmented with statistical analysis, of how to play against particular people and positions. I asked Natasha whether AlphaZero made them reconsider their opinions. She freely admitted that AlphaZero has led to a complete re-evaluation and gave the example of the Carlsbad pawn structure which typically arises in queen’s pawn games. White is conventionally expected to launch a minority attack. However, AlphaZero was much more inventive and just as inclined to launch a kingside attack. Whether ordinary players are able to follow these new precepts is debatable. In the video below there is a cameo from Magnus Carlsen in which he admires AlphaZero but recognises that he is not a computer.

Carlsbad Structure

We have Matthew and Natasha to thank for having brought to the world’s attention the breakthrough represented by AlphaZero. Clearly chess authors have a new lease of life as they update the theory of the middlegame. You can find more Game Changer videos from Matthew and Natasha on their YouTube channel.