AlphaGo beats Lee Sedol. Lessons from 1997

Go was praised as the last frontier for AI. Computer programs were not good enough to tackle the complexity of the game because they lacked the intuition and creativity shown by human professional Go players — that studied the game all their life. This lead to the idea that Go players, as opposed to chess players, were protected from the silicon invasion.

But now it is GAME OVER. Google’s AlphaGo demonstrated that silicon is now able to win against the best Go players. Is this a Shock? Why would anyone think so?

While the line of players queuing up to lose to AlphaGo is growing, the important think about AlphaGo is not to play against it, but to use it as a machine for improving. The line of Professional Go players wanting to buy a copy of AlphaGo is growing bigger.

Like in chess, where the Stockfish and Rybkas of the game changed the training process of the players, the same will happen in Go. Professionals already use computer databases of Go games. Now they will embrace the computer style of play to become stronger players. Others, like in chess, will do the opposite and try to do what the computers lack. Creative play, even if objectively inferior against other humans, might give some players the pleasure of taking the fight to places where the machine has not been before and might have a blind spot.

After 1997 defeat to Kasparov, the world of chess was also in shock. The end of the human domination. #AI was here to control us. In the end no one worried much and even had a little bit of fun when in 2006 Kramnik played Deep Fritz and left a mate in one on the board for the computer to win. That’s the reality of AI engines. We have fun and make mistakes like Kramnik. They are just machines and can’t loose like that.

The problem of having strong silicon players available is that cheating will now become an issue they will need to deal with. Cheating in chess is a problem and strong measures have been put in place to try to solve the issue. Will we have a Go Toiletgate? Go play will certainly have to adapt.

Another final point about the match. Lee Sedol is one of the Go monsters and there’s nothing to be sorry for this match. He won one game against the computer, and not many players will be able to say the same from now on. Anyone that comes next in the line to play AlphaGo, is just going to face a stronger engine and will have diminished chances to win. Meanwhile Sedol deserved his place in history.

The game of Go, like the game of chess, sees changes in the style of play from time to time, namely when some genius grandmaster comes and starts applying a new style. AlphaGo greatest legacy will be how humans will start playing Go in the future. Maximising winning chances instead of maximising winning margin will be on everyones mind and those seemingly spurious moves will be analyses until understood fully. The game of Go will not be the same in the future and for that AlphaGo alone is the most important stone in the board of the XXI century.

What’s next for #AI? Well, the game Arimaa — that was invented after Kasparov’s defeat to Deep Blue, and can be played with a traditional chess set — was specially constructed to be difficult for computers to master, was beaten in 2015 (And honestly, what were they thinking with that childish set pieces of the comercial Arimaa, cats, dogs and rabbits?). My suggestion is that the next challenge to #AI has to be in games were information is not complete as Vitorino Ramos puts it:

Will #AI move in that direction? Backgammon is a game were the roll of the dice can change the results. Poker depends also on chance and human strategies (bluff) that are difficult for the computer to understand. Talking about adaptability, can #AI move in a direction where the same program learns the rules of all these different games and starts playing them well without human tweaking of the underlying computational paradigm? That would be truly revolutionary.

As for me, I tried Go but I’m just a stone thrower. I’ll stick to that inferior game of Chess, play some gambits, and loose in many creative ways.

Chess and Territory: My FEN Viewer

One important notion in chess (and in other board games as Go) is the notion of territory. Which squares on the board do you control? How many of your pieces are attacking a certain square, and how many of your opponent are trying to control it too? This is an important concept to have in mind and I never saw this idea implemented in chess software.

Many chess software uses highlighted squares to provide some kind of information like the last move played, possible destination squares for a piece, etc… Also in some cases some chess software provides sound cues to what’s happening, e.g. the clocking running down or announcing checks. Digital chess software is changing the way the game is played, but I haven’t seen any chess software implementing the territory information idea.

fen-viewer Chess Influence Viewer

So, I decided to hack a bit of code and do it myself. Create a territory viewer for chess. It just adds how many pieces are attacking a certain square. Positive for white, negative for black. You can fork the code from github.

The idea is that each square displays the difference between the number of white and black pieces attacking that square. It doesn’t take into account the value of the pieces attacking (that could also be done). But it the most interesting thing is that it provides a visual, on the board, display of territory and influence, something that could be useful in many situations.

Right now this code just parses FEN strings to display the territory controlled by each player. Maybe latter this can evolve into something more elaborate, either as a pgn viewer or chess app that you can use to play against others. Probably the best solution would be to someone to write plugins to already existing good chess database software like chessx or raptor.


update: Comment from Vitorino Ramos

David, the idea is excellent, and really I never saw it implemented anywhere. Maybe you could try the following, in order to have an idea of the relational forces on each square, as you mention, value pieces are important here. Let’s have in mind the e4 square. Two black pieces are controlling it (N=3+B=3 =>6) and just one white piece is defending (p=1 =>1). Now, besides the fact that your colour code shows black is controlling that square, who really wins (at least in material form, not the rest, could be a good sacrifice) if black decides to play either Ne4 or Be4? E.g. Knight (N) plays e4, pawn takes, and Bishop takes e4. That is a -2 loss for black or +2 for white. So maybe you should colour that square +2! Now, let’s see what happens in d4 (black to play): Q takes d4, Q takes d4, Knight takes d4. According to the new code rule, that is now a -1 (in this case, as it was).Remember, that you should start exchanging from minor pieces to more valued ones, whenever possible. For instance in e6 we assume black will take the white pawn with f7 not with the Bishop in f5.Also according to this, c2 and d3 are +3 squares, that is where black should by “any means” avoid. Unless, again as I said earlier, it would be a good sacrifice. This is chess, not checkers :) But that, will be hard to code!

Thank you for these suggestions Vitorino. In reality I’ve just hacked a Java App for with a simple attacking pieces count, but with a bit more work this could be even more powerful. I think this could be a very good teaching tool to show the importance of square control to kids just starting to learn chess.

update Jan 28: There’s a ongoing discussion about this chess software and chess visualisation going on on Reddit

Anand, who do you prefer?

By this time Viswanathan Anand must be siting home and thinking “couldn’t imagine better future opponent!” as the candidates match is coming to an end with Boris Gelfand and Alexander Grischuk deciding who will challenge the world champion. Against both players Anand has positive scores and the last time they met, was this year in the 20th Amber Tournament where Anand beat both for a total of (as in chessgames.com):

So with this record, is the best candidate to beat Anand coming out of this candidates format?

Speedlinking dos ovos de Páscoa!

Como resolver o problema criado pela Apple.: Um vídeo que mostra como dar a volta aos ecrãs brilhantes do iMac, que mais parecem espelhos de casa de banho. A Apple faz asneira para agradar ao departamento de marketing… e alguém tem que limpar a sujeira.

Xadrez no terminal – Se por acaso estiver a aceder remotamente a algum Mac e lhe apetece jogar uma partida de xadrez já sabe onde se dirigir. A aplicação de chess tem incorporado o motor open source sjeng que pode ser invocado a partir do terminal.

Ainda a falar de Xadrez, Dennis Monokroussos colocou mais um vídeo instrutivo sobre como reagir a surpresas durante a abertura.

O TouchPC baratucho? Ou tablet ou como lhe queiram chamar. A ideia do touch PC é um absurdo. Não faz sentido aceitar o tapar a visão do que se escreve com as mãos como algo de positivo. Em vez de gastarem rios de dinheiro a procurar o Cálice da eterna juventude talvez fosse melhor pensar em novas formas de interacção com o computador que não utilizassem a metáfora do papel imposta pela Xerox à Apple nos anos 70.

O Ubuntu como aplicação do Windows. – Até que um dia quem sabe se transforma no inverso… o Windows como uma má memória à qual se recorre de tempos a tempos para qualquer software arcaico que não exista noutra plataforma.

Energia Nuclear – Excelente artigo no “De Rerum Natura”. Leitura obrigatória, também no Público, apesar dos comentários no blogue fugirem um pouco do que é discutido e como em todos os assuntos polémicos, logo haja quem aproveite a praça para se fazer arauto da desgraça. Ler até à secção dos comentários…

Zune Rip à vista? Será que vai mesmo atirar a toalha para o ringue? Duvido. Seria uma humilhação forte demais para a Microsoft. Penso que preferirá continuar a ter um aparelho com margens marginais e mesmo sem grandes lucros, a assumir a derrota para a Apple.

Mais histórias de leis anti-pirataria na Dinamarca. E mais uma vez que se lixa é o mexilhão…

Qualitative Comparative Analysis – Estudar fenómenos qualitativos é uma chatice. Pior ainda se forem gerados por pessoas. Aí o aspecto social tende a complicar tudo e um sem número de teorias, ideias e metodologias. O QCA é uma forma de análise que recorrendo à lógica permite atacar este tipo de problemas. Muito interessante. Para todos os que tiverem que lidar com dados dos quais algum humano se tenha aproximado… :)

E o speedlinking termina aqui… Deve dar para entreter nesta Páscoa e assim evitar comer muitas amêndoas…

Motores de Xadrez para MAC Intel

Depois de andar à procura de vários motores de xadrez para o MAC verifiquei que normalmente não há versões para MAC Intel, existindo apenas as versões para Power PC. Assim decidi pegar nas sources de alguns e compilei os binários do Polyglot, do Fruit 2.1 e do Toga II.

O Polyglot não é um motor de xadrez, mas um intermediário entre os motores que utilizam o protocolo UCI e os ambiente gráficos que utilizam o protocolo Winboard.

O Fruit e o Toga (este é derivado do Fruit) são dois dos mais poderosos motores de xadrez existentes (podem não ser os melhores, mas chegam para vencer a qualquer um dos comuns mortais).

Links de Xadrez

Infelizmente a minha vida não me permite andar sempre a controlar o que se passa no mundo do xadrez de computador, por isso abri esta entrada para registar coisas que vou encontrando sobre o assunto.

Engines:

GUIs:

Leituras:

    • Os meus favoritos.