Sunday, April 8, 2018

Turing Machine


Turing Machines. Roger Penrose. Artificial Intelligence. Colossus. Enigma. Chess. Machine Intelligence.

I’ve been trolling YouTube and fell into some videos about Alan Turing and the enigma machine. I like math and science videos. That led me to some history, plus some mathematics. And then AI, since Alan Turing created the Turing Test. That’s where you talk to ‘someone’ through a computer screen. You can ask them anything you want and say anything you want and consider their response. If, after a certain amount of time, you can’t tell whether you are connected to an actual human being or to a computer simulation creating appropriate sounding answers to your dialog, then you have to admit that that computer is demonstrating intelligence.

Maybe even consciousness.

This always bothered me. Simulated is not Real. Simulated is make believe. Simulated is generated according to rules without consequences. The simulation machine does not suffer or die if it gets the simulation wrong. It just gets reset and runs another simulation.

Ay, there’s the rub.

Take chess. It’s a game of mathematics. No, really. Pieces can move on a board a number of times. Two spaces forward. As many spaces diagonal as you can. Two forward and one left or right. Landing on another piece removes them from the board. Now there’re consequences. Putting the other player’s king in inescapable jeopardy wins the game. Ultimate consequences. All math. Math with a touch of death.

Let’s say we begin. You’re white. What are your choices? Well, you can move one of your pawns either one or two spaces, or you can move one of your knights forward two and one to the left or right one. That’s a total of 20 possible moves. Sixteen for the pawns. Four for the knights. Those are you legal, mathematical, moves.

There are 20 ways to start a game of chess. For each one of those, there are a number of legal, mathematical moves allowed to your partner. Twenty, just like you. So for each of your opening moves, your partner has 20 possible countermoves. This makes 400 possible first two moves in a game of chess.

Now. Imagine you are walking down a path. After a while you come to a divergence in the path. It may split into two or three or any number of new paths, in this case 20, and you have to choose one. Let’s say that each path has a sign in front of it. It has three numbers on it. The number of times you will die by taking this path. The number of times you will live by taking that path. And the number of times that, well, nothing, really. It’ll just end in a draw.

Now you can probably see where I am going here. Why not just calculate every possible chess move into the huge Chess State Space Almanac and follow each path down to its ending? Each move has a number of lines coming out of it to potential next moves by either white or black. Every move is a node on that total chess tree. And every node has many possible moves beneath it. Beneath each node are many paths for black and white to play. Another set of moves for each player. Each path ends in a number of possible wins for black, white, and a number of stalemates. Let’s assume that every chess game is limited to 200 moves. This will eliminate the games that end in two kings chasing each other around the board for ever. If no one wins in 200 moves, it’s a stalemate. That makes the total possible number of games of chess finite, though formidably huge. Now let’s figure out how many games are left.

Assuming these rules and the standard moves for each piece, each node in the state space chess tree can be assigned three numbers representing all of the results of all of the possible games beneath it. Wins for white. Wins for black. Stalemates. If I am white, I just have to look at the node that I am currently on, which is my opponent’s last move, and then at all of my possible next moves. There may be dozens. There may be few. I have to choose one. But they will all have numbers assigned to them telling me how many times white wins if I choose this path, how many times black wins if I choose this path, and how many stalemates. I just have to choose the one with the greatest number of wins for white beneath it.

And then black uses the same strategy. Just look at the Big Book of All Chess Games, identify where you are at the current move, and choose the path ahead with the greatest number of wins for black.

Is this intelligence? Is this statistics? Is this impossible? Well, yes. It is impossible to create a catalog of every possible, legal chess games that can be played in 200 moves. The numbers would confound Carl Sagan and take longer to compute than the life of the universe. But that’s not the point.

Still. This illustrates a point and raises a question. The point being that intelligence can’t just be about calculating all possible results and then choosing the one with the most desired outcome. The one with the highest number of wins. That would be computationally impossible. The question is; Is that what our brains are doing? Are they just creating a matrix of possible outcomes and then choosing the best? Are they calculating into the future and choosing the path that has the greatest number of successes for our survival strategy? Maybe only going down a fixed number of nodes and making the best guess of it? How is that even possible without knowing what will happen all the way to the end? How can you calculate ‘a fixed number of nodes’ what’s going to happen through all of eventuality?

I don’t think that is what intelligence is. That may be what brute force is. What computational efficiency is. Machines may be programmed to simulate intelligence and be shown how to work towards a goal. But what criteria will they adopt to achieve that goal? Simply grinding down numbers until they get the highest reward and then choosing that path? Sounds alien.

I think there is one thing missing in the whole AI debate. Machines can’t feel pain. Machines can’t feel consequences. Machines don’t live in time and don’t know they will die. All these things are a visceral part of our brains and our consciousness. A machine is not going to say; If I do this thing, it may come back to haunt me. Its calculation is going to be simply; What gives it the greatest benefit in the next transaction? No thinking ahead. No regrets. No bargaining for one’s life. No; How will this affect me in the future? My life? My children? My society? Basically, any machine intelligence is not going to be human. Not alive at all, actually. Just calculations without thought. Just brains without a conscience.

Simple math. If I do this I get three points. If I do that I will get four. No brainer.

Not subject to any rules that threaten its existence, nor frightened by any demon that can harm it, the machine will be a dumb thing unaware of itself and of what it is doing. Only following rules and mathematics. Not a bad thing. Depending on what goals we give it. But hardly self-aware. Or aware of anything else, really. But still. Very powerful in an unconscious way. Capable of madness even if it is not capable of awareness. Cruel in its anonymity. Playing by the numbers.

Let’s be careful where we are going with this, shall we?

No comments: