The Original Chess Engine: Alan Turing's Turochamp
If you think reading's lame and just want to play Turochamp, click here.
We all know that Deep Blue was the first computer to beat a reigning world chess champion. But what was the first engine to beat ANY human?
The answer is of course Turochamp, created by Alan Turing in 1948. After shortening the second world war by several years, Turing apparently had time to write the first algorithm capable of playing a full game of chess.
Of course, being himself "the father of computer science", Turing didn't have a computer that could run his algorithm. So instead he wrote his algorithm on paper, and evaluated it himself by hand. Each move took about half an hour to complete. But it worked! And Turing used it to play at least two games, one of which survives:
Neat, huh? Turing's original algorithm has been lost to the sands of time, but an attempt to reconstruct it was made by ChessBase in 2004. Their engine produces nearly the same moves as Turochamp, with some deviations (which they speculate could be due to Turing's own calculation errors). The full reconstructed algorithm is easily available online; a Python implementation can be found here.
You might have heard that Turing made a mistake in evaluating his algorithm on the first move: The algorithm decides on 1. e3, while Turing himself made the move 1. e4. But I suspect Turing wouldn't have bothered calculating white's first move, because a simple conditional to force 1.e4 would work just as well.
Turochamp's search algorithm was simple: Calculate every possible move to 2 ply, and then continue with all forced moves, checks, and recaptures until no more were possible. Its evaluation was likewise simple, with a handwritten function much like every other pre-AlphaZero engine. Evaluations included terms for:
- Piece values (1/3/3.5/5/10)
- Piece mobility
- Piece defense
- King safety
Readers who are knowledgeable about chess engines, or have followed my blog, will know that many modern engines use the same approach. Maybe this Turing guy was kind of clever?
In 2012, the resurrected Turochamp was used as part of a Turing-Centennial celebration. This time, however, it had to play the great Kasparov.
(Spoiler alert: it didn't go well.)
And now you, too, can play Turochamp! In recent years a number of people have put their own implementations online. The simplest to play is at https://mdoege.github.io/nimTUROCHAMP/
I actually managed to lose to it:
So take it seriously! And once you're done, go ahead and share your games in the comments!
Thanks for reading!