From beating Kasparov to self-learning: Chess AI has come a long way
With next-generation programs, computer chess competitions may well be the sites of the most exciting chess matches.
May 11, 1997, might not appear to be a significant date in history, but, that day redefined what machines are capable of. On that day, Gary Kasparov – the then-reigning World Chess Champion considered by many as the greatest chess player ever – lost a chess match to a chess-playing computer called Deep Blue.
The match consisted of six games; Kasparov won the first, lost the second and drew the third to fifth games. Then, on the decisive day, Kasparov lost the ultimate match to his non-human counterpart.
A match that changed everything
Kasparov beat the machine by 4-2 points during a match in 1996, but, the second time around, the machine was stronger, faster and – as claimed by its makers IBM – smarter. It outsmarted one of the sharpest minds in the world. However, this took a long time to happen. An expert team from Carnegie Mellon University, in the US, predicted in 1957 that a computer would beat the World Champion within a decade – it took forty years.
After the defeat, Kasparov complained about the machine. He claimed it behaved too human-like, and demanded IBM's log data. Kasparov doubted that a machine alone, without human intervention, was behind Deep Blue while it played the games. However, IBM did not give him the log data of the matches.
Later in an interview, Kasparov admitted that he had made peace with the fact that he had been defeated by a machine.
"1997 was an unpleasant experience, but it helped me understand the future of human-machine collaboration. We thought we were unbeatable, at chess, Go and shogi. All these games, they have been gradually pushed to the side [by increasingly powerful AI programs]. But it doesn't mean that life is over. We have to find out how we can turn it to our advantage", Kasparov told an American media outlet last February.
After the series, IBM dismantled Deep Blue, so, neither Kasparov nor any other chess player had another shot at the IBM supercomputer.
How do computers play chess?
Since Deep Blue's retirement, a lot has changed in the last 23 years. Now, a handheld device can have more mathematical power than that of Deep Blue. Better, faster and smarter chess-playing programs have been constructed and they regularly take part in global tournaments like the World Computer Chess Championship and Top Chess Engine Championship.
Newer chess-playing programs have arrived such as Stockfish, Komodo and Houdini. These are more advanced and complex than the machine that defeated Gary Kasparov.
Let us try to figure out how a computer usually learns to play chess. In simpler terms, programmers make the computer learn a special algorithm, through which it can evaluate chess moves. It judges hundreds and thousands of possible positions for a piece in advance. For example, Deep Blue was able to look at 200 million possible moves per second. Meanwhile, it has been estimated that great chess champions like Kasparov can look at a maximum of three per second. Chess champions usually analyze hundreds of chess matches and practice them in their heads or on the chessboard.
Interestingly, there is a similarity in the way that Stockfish – which is a free, open-source engine that is one of the best chess computers – plays chess the way that Deep Blue did two decades ago. It also approaches the game with sheer power, analysing 70 million moves per second.
The age of artificial intelligence
The situation started to change in the last decade or so. Google's artificial intelligence (AI) unit Deep Mind, started to work on AI technology and chess. The result was AlphaZero, an AI-based computer program that, in 2018, defeated the world's best chess engine, Stockfish. AlphaZero won by a score of 28 wins, 72 draws and zero losses.
This might seem trivial since this is the age of technological advancement and machine updates – a machine toppling another machine is hardly news these days. However, in Alpha Zero's case, the difference between the two computers was hardly external or device-dependent.
AlphaZero does not work like its predecessor. Unlike Stockfish – which analyses possible moves – AlphaZero taught itself chess. After learning the rules of the game, it played itself over and over, essentially ending up going through millions of self-played games.
Through a technique AI programmers call reinforcement learning, the machine took note of the patterns that led to a win, and then installed that information into its playing style. AlphaZero also looks at the number of positions per move, but significantly lower than Stockfish and Deepblue – just around 80,000.
AlphaZero's creators went on to say that it does not just play differently than Stockfish does, it plays more like a human.
Chess experts like Gary Kasparov see this advancement as a blessing for the game itself. He braces the idea of AI mastering chess.
"It was a mistake to think that if we develop very powerful chess machines, the game would be dull, that there will be many draws, manoeuvres, or a game will be 1,800, 1,900 moves and nobody can break through. AlphaZero is totally the opposite. It found that it could actually sacrifice material for aggressive action. It's not creative; it just sees the pattern, the odds. But this makes chess more aggressive, more attractive," he said.
What next for the game of chess?
Many classic chess players might have deferred with Kasparov about his aforementioned comment. Raul Capablanca, the best player of the 1920s and 30s did not believe in the supremacy of the machines over human minds regarding chess.
"Chess can never reach its height by following in the path of science," Capablanca once said. "Let us, therefore, make a new effort and with the help of our imagination turn the struggle of technique into a battle of ideas."
However, modernising the game has fallen short of contemporary chess players' recommendations the game be made more exciting and competitive plus avoid draws. The current top-ranked player Magnus Carlsen has suggested changes to the classic format – a shorter time spell for games could lead to more results by encouraging greater risk-taking.
With next-generation programs like AlphaZero, computer chess competitions may well become the sites of the most exciting chess matches.
Then again, what AlphaZero does reinforces the fact that the true human virtue comes from their capacity to create something anew. As AI approaches creativity, it may seem as if it is bridging the gap between humans and machines. However, there is another way to look at it. Kasparov caps the discussion by saying that humans will always guide AI – not the other way round.
"With AlphaZero and future machines, I describe the human role as being shepherds. You just have to nudge the flock of intelligent algorithms," he observed.
"So far, we see very little evidence that machines can operate outside of these terms, which is a sign of human intelligence. Let's say you accumulated knowledge in one game. Can it transfer this knowledge to another game, which might be similar but not the same? Humans can. With computers, in most cases you have to start from scratch", he said.