Teaching a computer to play chess is not easy
Ever since computers were first invented, many have dreamt of having them surpass human intelligence. One place to start is building computers that can beat us at games of logic, like chess, that test our ability for abstract thinking.
In 1948, Alan Turing, the father of modern computer science, designed a computer program to play humans at chess. He dubbed his program ‘Turbochamp’. Unfortunately, the computers at the time were not advanced enough to run Turbochamp. Turing used a paper printout to test the logic of his code. It failed to beat a single opponent.
Skipping forward to 1996, the IBM computer Deep Blue made history when it defeated Garry Kasparov. This was the first time a computer had bested a world-champion chess Grandmaster.
Since Turbochamp and Deep Blue, newer chess programs have easily dominated Grandmasters and amateurs alike. Far from putting us humans off, this has brought about a new era of chess playing madness. Anyone with an internet connection can now play, and be taught by, superb chess-playing computer programs.
Stockfish is the most famous computer chess program. It’s the engine behind Chess.com. Strong human players handcrafted the code within Stockfish, teaching it rules, strategies and thousands of sequences of moves based on real human games. It can calculate hundreds of thousands of moves and weigh all these options against each other.
The power of random chance
But it turns out, there is another way to teach a computer program to play chess. Using the power of randomness, and a little bit of probability. Instead of teaching the computer how to play, you simply teach it the rules and then let it play itself over and over and over again.

Our intuition might tell us that having chess players train the computer will ultimately lead to better strategies, and a better chess-playing computer. However, it turns out that computers learn better on their own.
Introducing AlphaZero, the program developed by Google’s DeepMind group in 2017. Over the course of nine hours, AlphaZero played forty-four million games against itself (!). After two hours, it began performing better than human players; after four, it was beating the best chess engine in the world, Stockfish.
How does it work? The AlphaZero program recognises that a game of chess is really a tree of possibilities. With each game, it codes each of these possibilities in terms of their probability of winning. At first, it played incredibly poorly, making lots of rookie mistakes. However, with each game, AlphaZero learns and improves its probability of winning. Very quickly it was mimicking advanced human strategies and sequences of moves.
Remember that AlphaZero had no knowledge of conventional strategies and wisdom. It developed its own intuition and strategy about the game. And it started to surprise everyone. It was making moves that go against every strategy ever conceived by humans. Prompting a lot of head-scratching in the chess community.
“The implications go far beyond my beloved chessboard…Not only do these self-taught expert machines perform incredibly well, but we can actually learn from the new knowledge they produce.”
Garry Kasparov, former world chess champion
Beyond the chess board
AlphaZero is adding an exciting and new dimension to chess, fueling an ever-growing interest in the game.

Back in 1996, Deep Blue had an impact on computing across many different industries. Although it was programmed to play chess, it enabled researchers to expand the limits of complex computer programs. This resulted in more complex computer programs and a decrease in processing time. A real win-win for the computer science community.
The story of AlphaZero will have a wider impact on our society. AlphaZero offers intriguing insights into the horizons of computers that can teach themselves. Not just in solving games, but in providing solutions for a wide variety of challenges in society.
Activity: Play Chess Now!
Visit Chess.com and you can start playing as a Guest right away. Click here to play online!
Check out more of our School Holidays stories and activities – click here!