Mostrar mensagens com a etiqueta AlphaGo. Mostrar todas as mensagens
Mostrar mensagens com a etiqueta AlphaGo. Mostrar todas as mensagens

domingo, maio 19, 2019

Shinfuseki: "Go with the Flow - How the Great Master of Go Trained His Mind" by Hunhyun Cho, Jungmin You (Trans.)



"The game of Go is not just a sport that one needs to win; it is a form of art, just like music or paiting, with which one expresses one's unique individuality. In order for it to a be a work of art, it needs to have a creative and unique aspect that can speak to us. Go is not just about winning. More importantly, it is about expressing oneself."

Master Shuko in a letter to Lee Changho, In "Go With the Flow"


I became infatuated with Go in 2016 during the AlphaGo vs. Lee Sedol match.

It is quite a simple game. Players take turns to place a piece (stone) on the board, at the intersections of a 19x19 grid (for a full size match). If you manage to surround your opponents stones such that they have no empty grid lines around their stones, then you capture those stones and remove them from the board. At the end of the match you count up how many empty grid spaces are surrounded by your stones, and add that to how many you have captured. The player with the highest score wins.

There are a couple of other rules for special cases, but that is all there is to it. Chess on the other hand, has far few possible moves each round (1st player 1st move has 8 pawns with at 1 or 2 jumps, and 2 knights with 2 options each = 20 first moves, opponent then has 20 options and so on with generally only perhaps 15-20 options a move) and so is amenable to Monte Carlo approach (consider each move and calculate strength of the game, and for each of those moves consider each possible subsequent move, assess each board strength and then consider every possible next move. If have 6 rounds to consider then perhaps 20 ^ (6 rounds * 2 players) = 64 million boards to consider as the match clock ticks away a few minutes, seek to assess a few further rounds ahead for a Grandmaster vs a competent amateur and Deep Blue computer had a tough task to compete against Kasparov.

With Go firstly the number of options becomes excessive (361 moves for black, 360 moves for white, then 359 options for black... so 6 rounds is 361x360... x 349 = 1.3 billion trillion trillion possibilities ). Secondly it can be very difficult, even for professional players, to assess overall board strength. So a move might be locally strong or weak, but it can also have influence latter in the game of a player's or their opponent's other groups. Now of humans have difficulty with this, then how is an AI to assess might possible moves are worth consider further.

AlphaGo is in several parts and it is their combination of approaches that has worked so well. Firstly experience - AlphaGo was given thousands of professional matches to look at and learn common patterns and responses. This helps Alpha Go narrow down the number of moves that it needs consider. Secondly AlphaGo includes a module that tries to assess the strength of a board. AlphaGo second learning was by playing millions of games against itself adapting its neural network to learn what is a stronger board position. This is AI, as opposed to a clever programming code, because there is no specific coding as to what a stronger board looks like - instead the neural network has to adapt to see what works best. AlphaGo also played against previous versions of itself to help it get stronger. Yes humans get stronger by playing lots of games, but a committed amateur on an internet gaming site might only play several thousand games as they rise up the amateur rankings, and a profession at Go school will from young childhood played a few games a day and studied go problems so their few thousand game exposures a year over 10 or 20 years still does not compare to how many millions of games AlphaGo has already tried with itself. The neural network of strong board position is not enough to play Go well - one need to have past experience (the deep-learning that gives rise to the company's name of Deep Mind) of what are likely to be strong patterns of responses to limit the number of sensible moves to decide between. The deep learn is though not enough without learnt expertise of assessing the merits of a play.

DeepMind AlphaGo uses a brute-force approach, albeit a different one from Deep Blue, as well as a different one from Deep Throat which was a different one from the original Deep Throat. But it's brute-force nonetheless, as it relies upon being able to sample millions of variations before it makes a move. So, what we have learned from the last couple of days is not that Go, unlike chess, requires an AI solution, but that Go is more like chess than we used to think.

However, there is another side to this: even without doing any look-ahead at all, an AlphaGo-style " artificial neural net" can play a respectable amateur-level game just by itself, which demonstrates that such an artifice is capable of learning to "see" patterns in an image and "know" what they "mean" (i.e., what to do about what it sees, i.e., which move to make). The pattern recognition side of things is what the DeepMind company and the Google Brain project are focused on, and even if they overhype what they are doing, their technology still represents a kind of intelligence that is indeed artificial, as it is not told what to do. but how to learn what to do.

Nevertheless, the so-called singularity is, as Noam Chomsky adroitly put it, science fiction. Sure, it will happen one day, but that day will be long after sea levels have risen substantially and London, Tokyo and New York become Waterworld.

It is is a trivial matter for Alpha to spit out what I figure to be the most probable sequence variation, but the next giant leap in AI will be when someone figures out how to map convolution configurations into symbolic expressions that relate to a hierarchical description of the position in terms of things like group safety, influence, and potential territory, so that Alpha’s daughters will be able to explain what they are thinking about in something resembling any Natural Language.

sábado, julho 22, 2017

Beyond the Usual Alpha-Beta Search: "Deep Thinking - Where Machine Intelligence Ends and Human Creativity Begins” by Garry Kasparov, Mig Greengard



“In 2016, nineteen years after my loss to Deep Blue, the Google-backed AI project DeepMind and its Go-playing offshoot AlphaGo defeated the world’s top Go player, Lee Sedol. More importantly, as also as predicted, the methods used to create AlphaGo were more interesting as an IA Project than anything that had produced the top chess machines. It uses machine learning and neural networks to teach itself how to play better, as well as other sophisticated techniques beyond the usual alpha-beta search. Deep Blue was the end; AlphaGo is a beginning.”

In “Deep Thinking - Where Machine Intelligence Ends and Human Creativity Begins” by Garry Kasparov, Mig Greengard 

My personal experience with Go dates back at least a decade. I remember getting slaughtered every time by the free GNUgo software, just as I had been by every human opponent for the last 20 years. Never got the hang of it, though I was school chess captain back in the day. Totally different mindset. I first came across it in a little-remembered crime series called 'The Man in Room 17', with Richard Vernon and Denholm Ellit eponymously solving crimes without leaving their office, where they were always playing go. I also remember a funny little story while I was attending the British Council. Back in the 80s, a Korean guy gave me a game. After every move I played, he stifled a laugh and started a rapid fire of, "No! Cos you purrin ['put in', I presume] there, then I purrin here, after you purrin there an' I purrin here, you lose these piece" None of which made anything clearer. At chess, the first (okay, tenth) time I got mated on the back row by a rook, I learned not to leave the king behind a wall of pawns. Never got my head round the simplest 'joseki' (corner opening) at Go. Beautifully elegant game though.

When reading about the game in Kasparov’s book, I just got sidetracked. Back in the day, along with Chess, I tried to develop a Go AI engine. Sad to say, I could never build it to my full satisfaction; I was able to beat it 9 out of 10 times.  Not so with chess. My AI Chess developed in C, if I may say so, was quite good. Does AlphaGo's success tell us something about the mindfulness of its technology, or does it instead tell us something about the mindlessness of games like chess and Go? Back in the day I studied AphaGo's performance, and impressed though I was by its playing strength, I did notice that it seemed to not understand two basic concepts of Go called "sente" (seizing the initiative) and "aji" (leaving a rock in the road for the opponent to trip over later), as was evidenced by opportunities it missed. What is quite remarkable is that AlphaGo doesn't understand a single thing about Go, except how to count the final score! AlphaGo circumvents the problem of understanding the toy world of Go by using two mathematical tricks: (1) learning knee-jerk reactions and (2) statistically sensible guesswork. A knee-jerk reaction is an automatic reaction to an event that seems to match a pattern; we rely upon such reactions to avoid dangers such as the edge of a cliff or a fire. Such reactions are essential for survival, but they are also unreliable because what we think we see is not always what is there. A pretty face does not necessarily imply a pretty mind. Anyone who has used Google's search engine will know that whereas it is superb at finding information, it is also somewhat clueless as it pulls up a wastepaper basketful of irrelevant snow as well as the one or two nuggets you were looking for. Because Google doesn't speak English. It knows nothing about the world we live in so relies instead solely upon statistical pattern matching to find its answers, much the same as IBM's Jeopardy champ "Watson" does. Jeopardy and document search are tasks well-suited to mindless association-seeking. AlphaGo is of the same breed as Google search and Watson; there are nuances of difference in their pattern-matching algorithms, but the underlying principle is the same: they all search for matching patterns, without troubling to understand what the patterns mean in terms of an ontology of cause and effect. In AlphaGo's case, the patterns it looks for are ones it has inferred by using an artificial intelligence technology called an "(artificial) neural network" that has had some success in learning to recognise a specific object in photographs - most famously, whether there is a cat in a YouTube video.

A Go game in progress is nothing more complicated than a very simple digital photograph, made of just 19x19 pixels, each of which can have just one of three colours: black, white, or empty. So people thought that what works for seeing cats in videos might also work for seeing good moves in Go.

And it does.

In convolutions of artificial neurons, information flows both ways through a stratified network. They are capable of learning patterns more complex than simple one-way networks - although perhaps it would be better to say that they can learn probable patterns, since the mathematics they use creates a probability spectrum of possible identifications. And that is just what's needed to play Go against people, for not even a Go grand-master can say unequivocally what is the best move in the middle of a game. AlphaGo's neural network was trained by showing it what good players did in over 30 million positions taken from a database of expert-level games. It produces a spectrum of knee-jerk reaction good move possibilities, but it doesn't stop there. It goes on to imagine what might happen in the future. AlphaGo's future-guessing methods are different from those used by Deep Blue to defeat chess champ Gary Kasparov, but both their methods are essentially brute-force techniques, relying on sampling millions of possible sequences rather than examining a few pertinent lines by goal-directed knowledge-based search.

AlphaGo can do one thing that Deep Blue could not: it can learn. Right now, it is learning to improve its stockpile of patterns by playing itself every day and teaching itself which moves worked out well during those experiments. However, the rate of improvement of a convolutional neural network reduces over time, so there is every reason to doubt that AlphaGo will become strong enough to beat Lee Sedol.

Nevertheless, both Deep Blue and AlphaGo have reached a game-playing ability higher than 99% of those of us who have also tried to play chess or Go, so we humans should perhaps hang our heads in shame at being so incompetent at reasoning that an unreasoning machine can better us at games we thought to be intellectual challenges requiring sophisticated strategy and tactics! However, although computers can now beat us at board games as well as see a cat in a video, we need not fear that they are about to take over the world and turn us into their domesticated animals. The 0.1% have already won that game.

NB: I closely followed the match between Deep Blue and Kasparov at the time. The 6th (last) game was especially unfathomable. I remember thinking how could Kasparov play into a well-known opening trap in the Caro-Kann. WTF? When a world champion plays like a beginner, there is not much to be said, and much to be sad about. It wasn’t that Deep Blue “outmaneuvered” Kasparov, it was that Kasparov defeated himself. My disenchantment with chess started with this specific game. This match was a travesty and I never recovered from it.