Driverless Cars Driven By Rules of Chess, AI Making Smarter Moves
Dr. Lance Eliot, AI Insider
If you are interested in AI, you likely would want to know about chess since the game has been used to help derive many of the AI techniques that we use today for all kinds of other endeavors.
Chess is a deceptively easy game because the nature of the rules are relatively simple and readily described, and yet playing games successfully can be quite challenging (when I say successfully, I mean winning at chess).
Chess Offers Cognitive Challenges Helpful To AI Progression
Humans have been competing against each other since perhaps the Middle Ages to see who can be the best at chess.
It has always been hoped that we might be able to figure out how humans play chess so that we could then improve how humans can further play chess. Furthermore, chess playing tactics and strategies can be used to reveal how humans think overall, along with extending these same approaches to other areas, including for other game playing and for many non-game playing real-world activities.
A black-box approach to analyzing how to best play chess can be undertaken by studying step-by-step what transpires in chess matches. In that manner, you really don’t know anything about what is happening in the person’s head, and all you have to go with is the result of their chess moves.
A means to try and open-up the black-box involves asking the chess players why they made the moves that they did.
Here’s a question for you: Did I really in fact intentionally and with my mental thinking faculties come to the choice of moving a pawn to open up space for the knight, or did I just say that to try and justify my move?
Neither you or me really can know what occurred in my brain that led to the moving of the pawn. Maybe I moved the pawn because it was Thursday and there was going to be a full moon that night, which is to say that there might be any number of explanations for why I really made the move of the pawn. My telling you one particular explanation is not necessarily what really happened in my head. I have no way to know what really happened, and nor do you.
Note that I am not suggesting that I was maybe lying to you about why I believed that I moved the pawn. It is genuinely possible that I have a belief that I moved the pawn for the reason I articulated. Can I somehow inspect my own neurons in my brain and be able to physically and biologically explain how those neurons and the brain functioned to make that actual choice? Nope. Can’t do it.
The point being that to better play chess we only have the ability to analyze the results of chess matches and try to derive from that data what seem to be good tactics and strategies, which we can couple with those rationalizations or explanations that chess players claim they did and that are presumably good chess playing tactics and strategies. None of that reveals the true inner workings of our brain and what our minds were doing. We instead have reasoning's that offer seemingly logical explanations for the chess playing behavior.
Chess as a Path to Thinking About AI
The hope is that the more we understand chess, the more we understand how we think.
There’s another angle too on chess, namely the desire to create artificially intelligent systems, and for which maybe chess will help us to get there.
If we can create an AI system that plays chess well, presumably we might discover how humans think and be able to embody that into machines. Once again, we would be using chess as a means to an end, wherein the end-game is to be able to create AI systems. The fact that we might have done so by also being able to create really good chess playing AI is not as consequential as the notion that by doing so we elevate the capabilities of AI overall.
One difficulty though is that we might be able to make machines play really well at chess, even being able to best humans, and yet this might not necessarily mean that we are getting closer to understanding how humans think and nor that the machine embodies that capability.
I offer that caution because the latest AI systems to play chess are continually being touted as “superhuman” — a phrase that I find disconcerting. When you refer to an AI system in terminology that says it is superhuman, I’m concerned that many people assume you are suggesting that the AI system does what humans do, namely thinking, and do it even better.
Let’s be clear about things and all agree that the manner in which the “superhuman” AI playing chess systems operate is not necessarily how humans think.
Chess as a Driving Metaphor
I often find myself mentally wandering over to the topic of chess when doing other kinds of mental activities. Perhaps you do so too.
Each morning I get onto the freeway to drive to work. I have about an hour or more commute that I drive while on the freeway. At times, I play chess games while driving. I don’t mean that I have a chessboard setup in my car. Instead, I am refereeing to “chess” in a metaphorical kind of way.
While driving my car, I look at the traffic ahead of me on the freeway and I envision a kind of chessboard. The cars directly ahead of me are particular chess pieces. That blue sports car to my left, its like a rook, and seems to go directly forward, while that beige sedan to my right Is more like a bishop, as it has been veering into other lanes at sharp angles. That big truck can go wherever it wants to go and no one will challenge it, as such I consider it to be the queen on the chessboard at the moment.The gaps between the cars are equated to empty spaces on a chessboard.
Which car, with each being essentially a chess piece, will next occupy that open board spot to my right, and how will they get there?
And so the chess game begins. If the open spot is immediately available, I can move my car directly into the opening. Suppose though that the opening is “guarded” by other nearby cars. I can potentially get to that open spot by first pulling ahead of the car to my left and maneuvering in front of that car by getting into its lane.
That topic brings up something that is perhaps not quite the equivalent of normal chess play. In chess, you finish a chess game as either a winner, a loser, or with a draw.
When I am driving my car and using a chess metaphor, there isn’t quite an overall win, lose, or draw that happens to be the end-goal. Usually, I am desirous of getting to work in the fastest way that also includes being safe. In that sense, you could suggest that a win is when I get to work at a shortest feasible time and do so without having gotten into a car accident. Each move must encompass the risks involved in safely driving the car. The overall safety of the driving journey is paramount and would usually be considered a much higher priority than the timing of getting to work.
AI Self-Driving Cars and Chess Play
At the Cybernetic AI Self-Driving Car Institute, we are developing AI software for self-driving driverless autonomous cars. The use of chess as a metaphorical way of looking at driving can be quite insightful, and aids in the advances being made towards developing true AI self-driving cars.
I’d like to first clarify and introduce the notion that there are varying levels of AI self-driving cars. The topmost level is considered Level 5. A Level 5 self-driving car is one that is being driven by the AI and there is no human driver involved.
For self-driving cars less than a Level 5, there must be a human driver present in the car. The human driver is currently considered the responsible party for the acts of the car. The AI and the human driver are co-sharing the driving task.
Another key aspect of AI self-driving cars is that they will be driving on our roadways in the midst of human driven cars too.
Chess Playing AI in Modern Times
Let’s consider how AI systems have become good at chess playing and then recast those aspects into undertaking the driving task for a self-driving car.
I’ll start my discussion with a quick overview of the progression of game playing by citing AlphaGo Zero to AlphaZero, which are well-known game playing AI-based programs, and also discuss Deep Blue, an AI-based chess playing game that defeated the world chess champion in 1997.
IBM’s Deep Blue (or some called it Deeper Blue) application achieved popular notoriety when in May 1997 it was able to best Garry Kasparov, the reining world chess champion at the time, doing so in a final score of 3 ½ games to 2 ½ games (a draw was worth a half point) and the chess match abided by the official chess competition rules including time constraints.
The design of Deep Blue was that it had been based on the data of thousands upon thousands of positions and chess games, out of which an evaluation function was mathematically formulated. The evaluation function would take as input the chessboard pieces and positions and spit out what the next move should be. The evaluation function was subdivided into specialties. There were around 8,000 different segments or portions of the evaluation function, each having a particular specialty as to the chess game status.
In addition, the program had a database of over 4,000 opening game positions and around 700,000 grandmaster games. The application had been pieced together with the assistance of various grandmasters consulting with the developers of the code. During a chess match, the code would do a look-ahead to try and ascertain various moves and counter-moves, which is referred to in game playing as levels of ply.
Deep Blue was setup to consider at times six ply to eight play ahead, and in other cases look ahead at 20 ply or more. I’m guessing that some of you might be wondering why you would not always look ahead as far as possible, maybe looking ahead to the very end of the game. In essence, when at any given state or position of the chess game, why not try to imagine all of the moves and counter-moves that would lead to the end of the game and therefore you could anticipate whether the move you might make now will lead to you winning, losing, or earning a draw.
Moving forward in time to today’s game playing applications, AlphaGo Zero and Alpha Zero have departed from the Deep Blue kind of coding that was dominant during the 1990s and into the early 2000s. The older method was to create an elaborate evaluation function, which I’ve mentioned Deep Blue had, and do so via a smorgasbord of handcrafted human provided tweaks and twists. The search space for the tree search was relatively large and not especially confined, and the algorithm used to do the tree search was the alpha-beta search approach.
The alpha-beta tree search uses two key factors, called alpha and called beta, which are used during the search through the tree that represents the various moves and counter-moves ahead in the game. Alpha is used to represent the minimum score that the player seeking to maximize their score will get depending upon which move they might make, while beta is the maximum score that the other minimaxing player would get. In a simplified manner, if you walk through the moves and counter-moves on a pretend basis, I would want to maximize my chances of winning while you would want to minimize my chances of winning. Therefore, at each move, I try to pick the maximum winning choice, and you would counter with picking the minimum winning choice for me.
Today’s AlphaGo Zero and the newer AlphaZero have shifted away from the use of an elaborated evaluation function that was coupled with the use of the alpha-beta tree pruning algorithm. Instead, the latest approach consists of using a Deep Learning reinforcement algorithm based on Artificial Neural Networks (ANN), and coupling this with the use of the Monte Carlo Tree Search (MCTS).
In brief, it is a large-scale neural network that is considered “deep” because it has a multitude of layers and many “neurons,” and it uses “reinforcement learning” in the sense that it does self-play and rewards itself or penalizes itself based on what happens during the self-play (that’s called reinforcement), leading to it being able to adjust the neural network accordingly for future play.
The Driving Task and Chess AI Techniques
I’ve laid the foundation of the nature of today’s chess playing AI techniques and I’d now like to explain how this dovetails into the arena of AI self-driving cars.
We’ll begin with the sensors of AI self-driving cars.
Does an image that was just captured contain a car in it? Is the car near to the AI self-driving car or far ahead of it? Is there a pedestrian in that image? Is the pedestrian near or far away? Somehow, the sensor detection and interpretation aspects of the AI self-driving car need to discern what kinds of objects are out there surrounding the AI self-driving car.
To-date, much of this interpretation is done via the use of Artificial Neural Networks (ANN). A neural network is trained beforehand to identify objects in say images or radar data or whatever, such as finding cars, light posts, pedestrians, and the like.
When you consider chess playing such as the use of Deep Learning with reinforcement, we can use the same AI techniques for doing the sensory data assessment and training for the deep ANNs for an AI self-driving car. This can be done in the backroom, so to speak, when preparing the ANNs for use on-board the self-driving car.
There is also the possibility of doing so in real-time while the AI self-driving car is underway, depending upon the boundaries that we put around the scope of the learning and also the speed at which it can perform. This is ongoing research.
The AI self-driving car then updates the virtual world model which indicates the status of the objects surrounding the self-driving car. It also has attributes about those objects such as whether they are in motion or stationary, where they are most likely headed, their speed and projected speed, etc.
Rather than being a chess playing metaphor in the mind of a human driver, we can embody the same kinds of principles into the AI self-driving car system and particularly in the AI action planning element.
Consider these aspects about my daily drive to work:
- Chess strategy => Driving Strategy = overall approach to driving the self-driving car, style of driving, overall journey goal, etc.
- Chess tactics => Driving Tactics = moment-to-moment driving actions such as switching lanes, taking an exit ramp, allowing another car into my lane, etc.
- Opening game => Driving Journey Start = backing out of the garage, driving down the local street, making way to the freeway
- Middlegame => Driving Journey = getting onto the freeway, navigating and maneuvering while on the freeway, getting off the freeway, etc.
- Endgame => Driving Journey End = nearing my office, local streets, driving into the parking lot, finding a parking spot, parking.
I’m an advocate of finding the synergy between chess, AI, and self-driving cars. That’s the kind of moves needed to get AI self-driving cars to become real competition with human driven cars. As an old Chinese proverb says, life is like a game of chess, changing with each move. We need to keep changing up the AI for reaching the vaunted goal of true AI self-driving cars. That move makes sense.
For free podcast of this story, visit: http://ai-selfdriving-cars.libsyn.com/website
The podcasts are also available on Spotify, iTunes, iHeartRadio, etc.
More info about AI self-driving cars, see: www.ai-selfdriving-cars.guru
To follow Lance Eliot on Twitter: @LanceEliot
For my Forbes.com blog, see: https://forbes.com/sites/lanceeliot/
Copyright © 2019 Dr. Lance B. Eliot