KGS without Collateral Damage

The KGS Go server is almost certainly the most well-known Go server in the Western world, today. It is populated largely by friendly, English speaking players from American and European time-zones and, during popular hours, after work and on weekends, one is almost guaranteed a sufficiency of opponents at or very near to one’s own rank, from abject beginner to dan-level amateur. For beginners, it is a very good place to start playing online Go, for the more experienced, it is a good place to improve. Sadly, getting started on KGS is a little obtuse.

In light of the recent press frenzy surrounding the Google DeepMind Challenge Match and the great coverage that Go received, I present a tutorial in two parts that will dispel the fog of confusion that surrounds the fun and welcoming land of KGS. In this first part, I will explain how to install the KGS client, cgoban, without causing collateral damage to your Windows computer.

Official Method: Oracle’s JRE

If you have Oracle’s Java Runtime Environment installed or you are able and willing to download and install it, the official method is quite simple: navigate to the KGS Go Server homepage, download the executable file that will install cgoban, run it and follow the prompts.

If you cannot install Oracle’s JRE or, like me, you are repulsed by the thought of installing something which was bundled with malware in the form of the Ask Toolbar until very recently and now supposes to change your search provider and world-wide-web homepage, there is another option: you can use Zulu to run KGS and achieve an entirely portable installation with a very light-weight footprint.

Zulu is a build of OpenJDK, an open-source environment for Java programmes, and it can be downloaded as a primitive ZIP-file. Installation is a simple matter of extraction. It does not register processes that check for updates in the background, it will not nag you, constantly, to install said updates, it is not distributed with malware and, perhaps most importantly, it does not automatically integrate itself with your web browser — it does not present a security risk.

Note: at the time of writing, AZUL Systems only publish 64-bit builds of Zulu for Windows. My instructions, below, will not work for users on older processor architectures.

Portable Method: KGS with Zulu

Start by downloading Zulu from the AZUL Systems download page. I have tried several older versions, in the past, and version 8u72 at the time of writing — all of them worked.

2016-03-22 KGS without Collateral Damage 1

Each version has two download buttons: one for a ZIP file and one for an MSI installer. For this tutorial, you will want the ZIP format.

Next, download the KGS cgoban.jar file.

2016-03-22 KGS without Collateral Damage 2

You can do so by visiting the KGS home page and clicking the link entitled “Raw JAR File” or by navigating to:

Once both downloads have completed, copy both cgoban.jar and the contents of the ZIP file into a new folder on your computer, henceforth referred to as your target folder.

2016-03-22 KGS without Collateral Damage 3

Create a new shortcut inside your target folder.

2016-03-22 KGS without Collateral Damage 4

The shortcut should point to javaw.exe — we will modify it to run cgoban in but a moment.

javaw.exe should be found in the ./zulu8.13.0.5-jdk8.0.72-win_x64/bin subdirectory of your target folder although your version numbers might be slightly different. You may name the shortcut anything you like — “KGS” makes a lot of sense.

After you have created the shortcut, right-click on it and open its properties window. Two changes must be made, as shown in the screen-shot, below.

2016-03-22 KGS without Collateral Damage 5

Firstly, append -jar cgoban.jar to the target of the shortcut. Ensure that there is a space separating this command-line switch from the existing text in the box and, if that existing text ends with a double-quote, append the switch outside the quotes.

Secondly, set the start-in path to your target folder which contains cgoban.jar. This can be done manually or by removing the last two levels (zulu8.13.0.5-jdk8.0.72-win_x64/bin) from the existing text. If the path contains any white-space characters, it will need to be enclosed in quotes.

After closing the properties window, double-click on your new shortcut to launch the KGS client.

2016-03-22 KGS without Collateral Damage 6

Because you downloaded Zulu from the Web, you are likely to be prompted with a security warning like the one shown above when you launch the programme for the first time. If your download was not corrupt and the executable’s digital security signature is intact, the publisher should be listed as ‘AZUL Systems Inc.’ and it is safe to uncheck the box captioned “Always ask before opening this file” and to click the run button.

2016-03-22 KGS without Collateral Damage 7

Congratulations — you have achieved an operational installation of CGoban 3, the client for the KGS Go Server.

Your shortcut to launch KGS can be copied to your desktop or pinned to Start or your task-bar just like any other shortcut in Windows. Before you do that, you might want to change its icon by using the change icon button on the shortcut’s properties window — I created the icon I use by cropping the banner image from the KGS server’s home page.

In the future, if you need to update the client, simply download the latest version of cgoban.jar and overwrite your existing copy. If you wish to uninstall the client, you only need to delete your target folder since everything resides therein. You can also copy your target folder to other computers although you may need to update the shortcut’s target and start in paths.

Have fun playing on KGS, comfortable in the knowledge that your computer has not been sullied. In the second part of this series, I will explain how to register a new user account on the server and talk about some issues that are not obvious to newcomers. (In light of my work on KGS Leben, my research for the second part of this article has ceased entirely. I had planned to talk about registering accounts, guest accounts, etiquette in the E.G.R., the escaper policy, the infamous tilde and other oddities. This may yet happen – one day.)


AlphaGo vs. Lee Se-dol: Haylee’s Synopsis

Hajin “Haylee” Lee, 3 dan professional Go player, secretary general of the International Go Federation, streamer, blogger, writer and creator of Haylee’s World of Go / Baduk, has published a long and somewhat rambling account of the recent challenge match between Google DeepMind’s AlphaGo (honorary 9 dan) and Lee Se-dol (9 dan professional) and I heartily recommend that you watch it.

It is a tale of clandestine phone calls and secret dinner parties, of people and the press and camera men and wives and daughters and friends. Haylee briefly touches on the games themselves, giving a light and digestible overview of the important moves in each game that will be immediately understood by anyone who plays Go and watched the games but her story is about more than the moves themselves — it offers a glimpse behind the scenes, told in a friendly and familiar and unassuming style by someone who was instrumental in organising the spectacle that millions watched, earlier this month.

At one point, during the video, Haylee singles out a camera man, named Greg, from Google’s documentary team, giving away clear evidence that a professionally produced story of the event is almost certainly in the works — something I would be very excited to watch.

Coincidentally, it was while I was perusing the text-chat during the American Go Association’s broadcast of the first game of the challenge match that I first discovered Haylee’s World of Go, Hajin Lee’s YouTube channel. I subscribed to it immediately and, since then, I have been enjoying her streamed games during which she plays Go on Tygem, a Korean server, and offers Malkovich-style comments on her thoughts and ideas and plans — her videos have become a regular source of entertainment and cerebral stimulation for me and, although I am only a single-digit kyu player, I find her commentary to be quite understandable and educational. I believe she has also published a book — an autobiographical account of her quest to become a professional player.

AlphaGo vs. Lee Se-dol: Game Five

Lee Se-dol resigned before the last handful of “yose” or end-game moves had been played in this morning’s game, bringing the Google DeepMind challenge match between AlphaGo, their Go-playing programme, and the 9 dan professional human player to a close. The artificial intelligence won the match by defeating Lee Se-dol in four of five games.

Lee Se-dol took the black stones and began with a solid, dignified opening that emphasised territory. He resisted white’s attempts to disrupt his plan and denied white the time to reinforce the boundaries of the areas of influence that white acquired in exchange. When a large group of white stones was cut off by a sequence that involved the infamous “stone tower” shape, it seemed like black was in the lead – he had gained thickness and resolved several weaknesses in exchange for a tiny number of points.

Slowly but surely, with calm and sensible late middle-game and end-game fighting, AlphaGo turned the game around once more and by the time the temperature of the end-game moves had fallen to nothing more than one point a move, it was apparent that black would be behind.

Lee Se-dol’s resignation was clear proof of his finely honed ability to count the score in his head because his deficit was barely measurable.

During the pre-match discussion, Google DeepMind talked about the fourth game of the match, the game that AlphaGo lost. They explained that move 78, the tesuji or skilful play that precipitated the demise of AlphaGo in that game, had “surprised” the engine and forced it to build a new plan for a branch in the game tree that it either hadn’t seen or had only explored perfunctorily. A human player in a similar situation would take a lot of time to re-evaluate and recalculate but AlphaGo’s time-control strategy is apparently very simple and primitive and it neglected to invest much of the abundance of time available on its clock.

Today, the post-match press conference was handled ineptly, the English translation coming and going and generally chaotic. A few interesting points could be gleaned from the chaos, including the fact that an ethics committee was set up inside DeepMind as a condition of their sale to Google.

Lee Se-dol also took ownership of his performance once again, saying that he believes that humans can do more against A.I. Go engines and admitting regret that he was unable to show us how. He reminded the audience of the importance of human creativity, said he began to question some classical beliefs about the game “a little bit”, and indicated that he had more studying to do.

AlphaGo’s skill with the stones is not superior to that of top human professionals, according to Lee Se-dol, its advantages are concentration and the psychological facets of the game.

During the ceremonies that followed the game, AlphaGo was awarded an honorary rank of 9 dan by the Korean Baduk Association.

This match is over but its culmination should be considered a beginning rather than an ending. Google DeepMind have executed a historic début, winning five-nil against Fan Hui (2 dan professional) towards the end of 2015 and four-one against Lee Se-dol, but AMD and Facebook and other contenders are yet on their way to the party. AlphaGo developed its strength through self-play – what will happen when these learning algorithms start to train against each other, like human insei, and new blood-lines are introduced to this gene pool?

In the coming months, we will learn more details about what happened in these five games. We will learn what Google DeepMind plan to do with their creation and how it will impact the worlds of Go, artificial intelligence and machine learning. We will see how Lee Se-dol moves forward in his own, human career. We live in exciting times.

AlphaGo vs. Lee Se-dol: Game Four

Lee Se-dol obliterated Google DeepMind’s AlphaGo with an inspired ‘wedge’ in this morning’s game, the fourth game of the challenge match between the 9 dan professional human player and the upstart A.I.

2016-03-13 __go4go_20160313_Google-AlphaGo_Lee-Sedol0000
The moves leading up to Lee Se-dol’s incredible move: white 78

Absolutely everyone showered praise on Lee Se-dol for his fantastic play, among them, Gu Li, a 9 dan professional player from China who is considered to be one of the strongest professional players on the planet and particularly relevant because of the international rivalry that exists between him and our champion facing DeepMind’s engine, today.

After the game, Lee Se-dol was finally ready to tell us where the weaknesses lie in this version 18 of the distributed AlphaGo programme. He said that the A.I. struggled, holding the black stones, and said that “surprises” like his skilful wedge in the centre forced “bugs” to show in the bot’s play.

He even put his money where his mouth is by explicitly requesting to play as black in Tuesday’s match. Presumably, now that he has identified a vulnerability, he intends to show the world that he can defeat AlphaGo even when it is playing its preferred role in the game.

During the press conference that followed the game, one reporter raised concerns that AlphaGo’s database of professional game records equipped it with extensive knowledge of Lee Se-dol but, to his disadvantage, the man knew almost nothing about the machine. He dubbed this imbalance “information asymmetry” and, in response to his question, Demis Hassabis, one of the founders of Google DeepMind, made some intriguing statements. Firstly, Mr Hassabis stated that AlphaGo’s training database did not contain any game records from professional games played by Lee Se-dol. He said that its database was populated with amateur dan-level games only and, from there, AlphaGo had trained by playing against itself. He pointed out that even a thousand records of real-world games would be insignificant amongst the millions of records created by self-play. What he says makes sense but I do wonder why they didn’t prime the system with professional game records in addition to amateur ones — it seems like an easy thing to do.

In the first three games of the challenge match, AlphaGo exhibited a high level of skill and mostly played moves that made sense, even to us humans. It earned the respect of its opponent and the Go community in general. Lee Se-dol said it was not unreasonable; I was among those who praised it for its human-like play. When it was ahead, it played moves that could be considered sub-optimal but even those were not absurd. Today, things were very different.

Even after Lee’s wedge, all was not lost, but AlphaGo sealed its fate by playing appallingly once behind on the board — many of its moves were simply ludicrous — and spurned its hard-won good-will by charging blindly onwards when its situation had become hopeless and the only responsible act was prompt and polite resignation. Both of these behaviours are familiar to anyone who experienced the laughable death-throes of the Monte-Carlo Tree-Search Go engines and, unfortunately, today’s performance presented an ugly glimpse of AlphaGo’s pedigree.

Yesterday, we saw proof that AlphaGo has conquered the mystical art of Ko and that assures me that, one day soon, these bots will also be able to fight to the fore after falling behind and learn to resign with dignity but, for now, DeepMind’s ‘prototype’ still needs work.

AlphaGo vs. Lee Se-dol: Game Three

This morning, Lee Se-dol lost a third and deciding game in the challenge match against Google DeepMind’s AlphaGo. The fourth and fifth games will be played but the prize goes to the programme and the prize money will be paid to various benevolent causes.

The game started with a high ‘Chinese’ fuseki which was soon broken up by a vital battle that affected the whole board, a product of Lee Se-dol’s aggressive style and AlphaGo’s refusal to capitulate. Black fought for his heavy and inefficient stones but white, played by the bot, acquired a huge territory that black simply couldn’t match. In desperation, black invaded and a scuffle lead to a complicated situation with multiple Ko fights. Black resigned when it became clear that his stones were lost and, elsewhere on the board, the cost of the scrap became too great to bear.

One incontrovertible fact was proven during the match: AlphaGo does not struggle with Ko fights in the slightest. AlphaGo showed that it can handle extremely tricky Ko situations that play havoc with the game-tree and would have completely flummoxed its ancestors, the MCTS engines of yester-year.

Lee Se-dol admitted that AlphaGo defeated him, taking ownership of his defeat and lamenting that he did not show us a better game, today. He said that today’s defeat was his defeat, not a defeat of human beings.

Michael Redmond, the 9 dan professional westerner who provided the official English commentary during the match, brazenly declared that AlphaGo “beat Lee Se-dol at his own game!” In front of a veritable army of reporters, in the ballroom of a hotel in down-town Seoul, he went on to suggest that AlphaGo would herald a “third revolution” in Go opening theory, mentioning AlphaGo in the same sentence as Honinbo Dosaku and Go Seigen, two legendary human players who sparked extensive, novel innovation in the fuseki in the past.

When a member of the audience questioned Redmond’s prophecy, Lee Se-dol answered that he thought AlphaGo is not at the level of the so called ‘Divine Gods’ and described the bot’s play as ‘different’ and ‘superior at times.’

Meanwhile, in the Go community, speculators questioned whether Lee Se-dol (9 dan professional) was, in fact, the best player to champion humanity in this duel against the machine. Some pointed to his aggressive and frequently precarious fighting style and hypothesised that AlphaGo’s cold and heartless play was ideally suited to winning in such situations – situations in which mere mortal, human professionals might become flustered or overwhelmed by the complexity. Some suggested that calmer, more placid players might fare better against the A.I.

Lee Se-dol reassured the audience at the post-match conference that AlphaGo is not yet perfect. I believe him. If he does not defeat AlphaGo, another will, but I do hope that he shows us the way over the course of the next two games.

AlphaGo vs. Lee Se-dol: Game Two

Lee Se-dol (9 dan pro.) conceded another match to AlphaGo, today, in Seoul. Google DeepMind’s lead now stands at two games to none and a straight-sets victory over the human player seems entirely possible. We will have to wait until Saturday to find out.

During the press conference that followed the game, Lee Se-dol admitted that he felt that black, played by AlphaGo, never fell behind or gave him an easy chance at any point during the match and that the programme made moves that he considered entirely reasonable. Reading between the lines, I suspect he even felt some sort of respect for the thing! He attributed his loss to an inability to find the bot’s weaknesses.

Google DeepMind claimed that the A.I. itself was confident of victory for most of the game, particularly during the opening and end-game phases, but that the team behind the scenes were nervous because the opinions of other strong human professionals were widely varied – some predicting that white, Lee Se-dol, would ultimately come out in front.

The development team also claimed that their only role, during the game, was ensuring that the programme had access to the computational resources and infrastructure that it required.

In the coming months, I would dearly like to know more about the level of human intervention that took place behind the scenes, the computational resources that powered the engine, and the learning and improvement that took place between the games of the match.

Personally, I will be cheering for the man who is opposing the machine, on Saturday. AlphaGo has already acquitted itself skilfully and Google DeepMind have already made a smashing début; a close match will be far more satisfying than a clean sweep by the engine.

While we wait to see what transpires in game three, it is time to start considering what AlphaGo’s victories mean for the future of the game of Go itself, the future of professional, competitive play and the future direction of research in the field of Computer Go. Perhaps we should all start reading and remembering the ripples that IBM’s DeepBlue sent through the world of Chess.

AlphaGo vs. Lee Se-dol

In the wee hours of this morning, I watched Google DeepMind’s AlphaGo programme defeat Lee Se-Dol (9 dan professional) in the first game of a five game match that will continue for the rest of this week. They played on a full-sized (19 by 19) board, AlphaGo played white and Lee Se-Dol paid komi. The field was entirely level, the game entirely fair. This simply wasn’t supposed to happen during my lifetime!

When I first encountered the game in 2007, my friend and fellow programmer promoted it as a game that bots simply couldn’t play. At that time, GNU Go was available but barely stronger than an improving double-digit kyu journeyman like myself – I soon learned to defeat it. A few bots exploited Monte Carlo Tree Search (MCTS) and they could achieve low single-digit kyu strength on a regular desktop computer or amateur dan strength on exceptional hardware but that was about all.

Everyone knew that MCTS was the way forward, that heuristics used in the random Monte Carlo simulations would improve with time, and that the inexorable increase in exploitable computational power would permit an ever-increasing number of simulations to be run. Everyone knew that even the professionals would fall, one day. That day was supposed to be decades away and the DeepMind team proved everyone wrong.

This morning, the outcome of the game was far from the only impressive feat that DeepMind’s programme demonstrated: the human-like nature of its moves and the mature management of the clock were a wonder to behold, as was the calm and steadfast way in which it handled Lee Se-dol’s cunning but unorthodox opening that seemed like an attempt to deviate from more common and well-known openings that would exist in databases and opening books that the artificial intelligence was surely using.

I was strangely sad when I saw Lee throw in a prisoner to indicate his resignation, this morning. In that instant, something ineffable changed in a way that can never be reversed. I will continue to watch in fascination as this match unfolds but, even if Lee wins the four remaining games, history was made this morning and I am very happy to have watched it as it happened.