Machines can play, but can they think?

Martin Vetterli
Digital Stories
Published in
3 min readSep 24, 2018

What a simple game like Tic Tac Toe can reveal about how computers “think”, from simple algorithms to artificial intelligence and human creativity.

“person playing board game” by Damian Patkowski on Unsplash

When I was in primary school in the 1970s, we would sometimes play Tic Tac Toe with a friend instead of listening to the teacher. So when we realized that there was a class called ‘’programming’’, we decided to teach the machine how to play games with us. We first chose chess, which of course was hopeless to program, and so we settled for simpler games. Obviously, we solved none of them.

Recently however, computers have been steadily beating professional players in more and more games. Last year, AlphaGo beat a professional Go player for the first time in human history (reminding us of chess world champion Garry Kasparov’s defeat in chess in 1997 by an IBM computer). But how do you “teach” a computer to play such games?

Let’s take the simple game of Tic Tac Toe and try to understand the process. Well, how do we humans play Tic Tac Toe? Most of us have some informal “rules” that we have learned as kids. One of these rules might be: when you go first, mark the center square. Another rule might be: when the opponent has two squares in a row, mark the third. With these two simple rules, you can already program a computer to play Tic Tac Toe (even if very poorly, of course). But, it turns out that with 8 such simple rules, the computer can already win or tie at every game!

Here is a completely different approach: we can list all the possible game situations of Tic Tac Toe that are possible, together with all best next moves from each of these situations. Then we could tell the computer to just look up the next move inside that very long list for each . It would of course be quite tedious to make this list, but doable.

But what if we programmed a computer to “learn” and memorize all the situations by itself? This is doable, and is what is called Machine Learning today (the basis of artificial intelligence). Assume for example that we program a computer to have only one basic rule of Tic Tac Toe above, and also tell it to play randomly, until the game ends, and to record each step of the game. Now, in its very first games the computer would lose immediately. But thanks to the recorded “bad moves” it could start to “learn” which move not to repeat in the future, and slowly over time, it would thus come up with a list of “good moves”. Now the more the machine plays, the more it will “learn” and win!

However, learning needs an opponent, usually a human. And the better the opponent is, the better the computer will become, and finally even the best human player will thus lose at some point. Which is exactly what we are observing in the recent years with chess, go and poker. But the most interesting aspect of this approach is that new machines also come up with new moves that have never been done by any human before. So one can start to wonder: are machines becoming creative?

--

--