AlphaZero and the Artificial Intelligence Singularity : Part I

AlphaZero and the Artificial Intelligence Singularity : Part I

Reading Time: 8 minutes

 This is going to be an n-part article on the recent developments with Alpha Zero, the latest AI superplayer to come out of the Google DeepMind stable. This is part I.

In his zany series of novels—the Hitchhikers’ Guide to the Galaxy—Douglas Adams classifies life on planet Earth thus : Humans are the third most intelligent species. Dolphins are smarter, while mice are the smartest. To keep things sane—well, mostly sane—he admits that mice are projections of hyper-intelligent pan-dimensional beings who are obsessed with asking the Ultimate Question to Life, Universe and Everything1. Humans, naturally, didn’t quite subscribe to this particular viewpoint.

Science fiction abounds with titanic battles between Man and Machine, between naturally evolved Intelligence and artificially created Intelligence, between the Biological and the Silicon, between Emotion and Logic2. However, in each instance, the battle for dominance or of survival has primarily been between the two races, if I may. In most cases, artificially intelligent machines have turned on their human creators, and are now bent of either wreaking havoc or wiping out their erstwhile masters. Countless reams of pages within sci-fi sections of books and local libraries, dusty attic bookshelves and coffee-stained cafe tables, have been filled with the machines taking over, the humans fighting back, and an eventual stalemate making it possible for the natural and the artificial to coexist, if not peacefully, then at least with a modicum of live-and-let-live. A draw between two more-or-less evenly matched foes, rather like the one that happens in chess, so to speak. The Matrix ends in such a semi-hopeful tone, while Terminator does not, and Philip K Dick’s chilling Second Variety seems to weigh towards a checkmate for purely biological beings. Seldom has it been that such a battle has evolved into one between various Machine/AI factions, with humans relegated to a mere annoyance, meatbags too weak and out-evolved to be a factor any more. Philip K Dick had explored this idea in Second Variety, but even there, the machines were still at AI level, and only marginally better than the biological beings that once ruled the planet. Never, at least not to my knowledge, have science fiction authors contemplated the possibility of an Synthetic Intelligence superior not only humans, but to most versions of Artificial Intelligence humans could have ever envisioned. Given the developments of last week, that possibility might well become science fact.

Chess is considered by many to be the ultimate strategic/tactical game ever invented3. From its humble origins in India in the sixth century AD to today, it has taken humans fourteen hundred years to master chess to a level where the best players look like gods to the laypeople. Lasker, Alekhine, Spassky, Fischer, Karpov, Kasparov, Anand and Carlsen are superhumans, with mental abilities that far exceed normal intelligent humans and are, quite possibly, on par with scientific and mathematical greats such as Einstein, Landau, Euler and Riemann. The current world chess champion, Magnus Carlsen of Norway, is considered by many to be one of the most brilliant human chess players ever.

Consider, for a moment, the above sentence. Especially the fourth word from the end. The most brilliant human chess player.

In the late nineties, the reigning chess world champion (note the lack of a modifier here) was Garry Kasparov of Russia. A supreme strategist and a superb tactician, Kasparov had won the world championship from fellow Soviet Anatoly Karpov in the eighties, and hadn’t lost it since, having defended against the likes of Karpov and Vishwanathan Anand of India. However, in 1998, Kasparov was invited to play a series of very unusual chess matches. His opponent was known as Deep Blue, a chess supercomputer designed by IBM. On February 1996, the first match took place between these two unlikely opponents. The venue was Philadelphia, USA. In the first game, playing with white, Deep Blue, to everyone’s surprise, defeated a shell-shocked Kasparov. However, the world champion bounced back and won the 2nd, 5th and 6th games handsomely, with the other two being drawn. The final scoreline of 4-2 should have made him happy. But it didn’t, because this was the first time a computer program had defeated a world champion under what are called classical rules.

In a rematch held more than a year later in New York City, USA, the tables were turned. This time Kasparov drew first blood, winning the first game playing with white. Deep Blue won the next game, and the next three games were draws. With the score tied at 2.5-2.5, Kasparov tried a few risky deviations from tried-and-tested play, and paid for it with a defeat. The final score, 3.5-2.5 in favour of Deep Blue, was the first time a world champion had been defeated in a full match by a chess computer4. Humans, it seemed, were no longer the most intelligent species on planet Earth, no matter whether they subscribed to this viewpoint or not. The time of AI was at hand!

Well, not quite.

Deep Blue was created with a particular goal in mind : to play chess. It could do so magnificently. It could do nothing else. If it could be characterised as an intelligence, then that characterisation, that designation had to be a very tight one indeed. However, within the chess community, things had changed. Chess programs, even the most average ones running on 128 MB of RAM on Intel Pentium II processors regularly defeated human players who had played for years. And the method it used to do so was something human beings could not hope to ever best : brute-force computation.

At every move, depending upon the distribution of the board, chess gives one the option of n number of legal moves. Each move can then be countered by the opponent in m ways, each of which in turn can be answered with p possible moves, and so on. Thus a decision tree is built up at each move, and the best human players were those who could see deepest into these branches and pick, using an algorithm or a computation trick that humans haven’t quite figured out in entirety, the best possible branches and thus play the corresponding move. Since the number of nodes in the decision tree increases exponentially as we go deeper, checking every branch to pick the most optimum would take an impossible amount of thought. For humans. Chess software or engines around the turn of the millennium became fast enough and had enough memory to be able to delve deep enough into the decision tree by simple brute force, and thus pick the optimum route. Humans could not compete with such power, and it became a race to develop the next chess engine with enough power to beat not the reigning human champion, but the machine one. Algorithms were devised, discarded, implemented, supplanted. Techniques were developed to minimise the brute force aspect as much as possible so as to use less and less computer space and time. In parallel, computers became faster and had larger memories, so that the development of such engines reached a fever pace. The world’s best chess player as of 2016 was Stockfish 8, an open-source chess program. It boasts an Elo rating of 3400+, compared to Magnus Carlsen, who has the highest Elo rating of any human ever at 2882.

What did the last sentence mean? What are Elo ratings, and what did it mean for Stockfish 8 to be almost 500 points ahead of Carlsen? To answer that, we would need to take a quick history trip.

The game of chess is believed to have evolved in the sixth century AD, in India, during the Gupta Empire. The game was initially called Chaturanga, since it was essentially a simulation of an actual battle with the quartic army structure of infantry, cavalry, elephants and chariots. These would of course later become the pawns, knights, bishops and the rooks of the Western world. From India, chaturanga travelled eastward and westward along the Silk Road, ending up in China and Persia respectively. In China and later Japan, the game evolved and gave rise to the modern games of xiangqi, janggi, and shogi. In Persia, the game sustained, and its name evolved to chatrang at first, then shatrang and finally shatranj. The primary piece was, of course, the Shah, which meant King in Persian. From Persia the game travelled to Europe via Moorish Spain, or what was then Al-Andalusia. The name and the powers of the pieces further evolved, especially in fifteenth century Spain. The Queen, which had for a while replaced the earlier Persian Vizier or Mantri/Wazir piece, gained its modern powers. The pawns gained the advantage of being able to jump two squares on the first move. It was proclaimed that White would always move first. Finally, the rules of castling were finalised. The end of the game, called Shah maat in Persian (meaning “the King has been bested”) became checkmate in English, and shakhmati in Russian.

Here, a slight personal interlude.

I learnt chess at Diamond Harbour, a small town about 60 km south of Kolkata, India. My teacher was my uncle, and the rules he taught me and the names he used were, as I found out later, the Indo-Persian ones. For instance, in Bangla, we call the Queen Montri, which means “minister” or “wazir”. We did not have castling, and we did not have pawns who could enter the long jump event at the Olympics. There was no en passant. I might be mistaken, but I feel pretty sure these are the rules that Mirza Sajjad Ali and Mir Roshan Ali follow during their eternal games in the Satyajit Ray film Shatranj ke Khiladi (The Chess Players).

End interlude.

Chess of course really took off during the late nineteenth and early twentieth centuries, with greats such as Emmanuel Lasker and Alexander Alekhine bringing in new strategies and tactics into chess. Unlike the no-holds-barred winner-takes-all death-or-glory approach of the previous century, players such as Lasker and Alekhine and their peers converted the game into a more thoughtful, careful, and considered pastime. Openings were discovered, and the importance of openings was understood. Positional play and exploiting opponent’s weaknesses subverted the need to capture pieces, while the chess board got demarcated into invisible regions of graded power and influence. Developing pieces also gained traction, and the Queen started entering the midgame instead of early game. Post World War II, the Soviets dominated the chess scene, with champions such as Botvinnik, Smyslov, Petrosian, Spassky, Karpov and Kasparov ruling the chess world. The only non-Soviet champion in the interval between 1948 and 1995 was Bobby Fisher, and his match against Boris Spassky in 1972 is widely known as the Match of the Century. The new millennium has seen only three world champions : Vladimir Kramnik of Russia, Vishwanathan Anand of India, and Magnus Carlsen of Norway.

People love rating and ranking the best people from different fields, as well as people in the same field from different times. Who was the better physicist, Newton or Einstein? Who created better music, Mozart or Beethoven? Who was the premier painter, da Vinci or van Gogh? Who the better footballer, Pele or Maradona? In most cases, such questions cannot be answered objectively, since quantifying a person’s talent and skill is not a simple job. Also, comparing Pele or Maradona’s game with Messi’s or Cristiano Ronaldo’s is unfair, for the latter have access to better equipment, training and pay. Chess, on the other hand, is very susceptible to such an attempt, since its basic features do not change much over time. Which is why, in 1970, the World Chess Federation (FIDE) adopted Arpad Elo’s proposed system. Arpad Elo was a Hungarian physics professor who suggested a system of rating based on head-to-head wins and losses, and had a statistical system of ranking. The best players of chess in the world, called grandmasters, have Elo ratings of 2500 and above. The highest ever Elo rating was 2882, achieved by Magnus Carlsen in 2014.

Stockfish, the chess computer program, has an Elo rating of 3400+.

I am repeating this because I want this bit of information to sink in. There is a 500+ point difference between the highest rated human player ever and a slightly older version of the most powerful chess engine ever designed5.

Well, given what has transpired last week, perhaps I should say : The second most powerful chess engine ever designed.

AlphaZero, the chess program conceptualised, designed and built by Google’s DeepMind team, convincingly defeated Stockfish 8 over a series of 100 matches held last week. Each chess behemoth played 50 games as white. AlphaZero won only 3 games playing black and drew the other 47. While playing white, however, AlphaZero drew 25 games, winning a whopping 25 times! Stockfish finished with 0 victories, 72 draws, 28 losses.

Chess has found a new champion!

The AI battles have begun!

Well, not quite. But to find out what this means, stay put for part II of this article, the link to which I shall put up as soon as it is up. For the time being, here’s The Nerdruid signing out.

Reference and sources will be updated after all the parts are published. The header image is sourced from here.

 

Facebook Comments

Footnotes

  1. The Answer is 42.
  2. For instance, among Hollywood movies and tv shows: The Matrix, The Terminator Series, Battlestar Galactica, Star Trek (the Borg Wars), I Robot, Stargate (the Replicator Wars), Doctor Who (the Cybermen) etc.
  3. At least to those who are unfamiliar with Go or Shigo, or discount computer strategy games such as Starcraft II as frivolous.
  4. It is instructive to study this game in detail. In the seventh move, in reply to Deep Blue’s (white) 7. N1f3 Kasparov (black), plays 7. …h6, instead of the 7. …Bd6 he would normally play in such a circumstance against human players. White’s next move : 8. Nxe6 made the situation tough for Black. Kasparov deviated from standard opening book play because he thought, quite erroneously, that a computer would not play as humans do, would not be able to develop and handle an 8. Nx36 situation, and would thus be pre-programmed to not go down that path. Unfortunately for Kasparov, Deep Blue played as a human might and, twelve moves later, it was curtains for the human.
  5. The current (2017) version of Stockfish is quite a bit faster and meaner than Stockfish 8.

Leave a Reply

Your email address will not be published. Required fields are marked *