Decision-Making and Control
Now that our robot knows where it is and what's around it, how do we use this information? There are about as many ways to do this as there are robots, and the specifics vary greatly depending on the application the robot is designed for. However, there are some generalizations that we can make.
First, there's a distinction in how robots use their state estimates. In most cases, a robot won't use the full probability distribution over possible states for control; instead they pick an average or most-likely state, assume it's true, and base their control on that. This works well in situations where the most likely states are clustered close together, for example your estimate of the robot's position will most often be in a single area. The alternative is to consider all of the possible states, which can be much more difficult.
Second, robot control algorithms can be broken down into two categories: reactive and planning. Reactive algorithms are like your reflexes: they react instantaneously to the current situation in a precisely defined way. You can also think of a reactive algorithm as being like a set of if statements: if A happens, then do B.
A good example of this kind of control is the Roomba vacuum cleaner. The Roomba has a set of behaviors that tell it to back up or turn or spin when sensors like its bumper are triggered or certain time limits are reached. Usually the robot's creators design reactive algorithms offline before the robot is deployed; iRobot (Roomba's creators) spent a lot of time and money figuring out a good set of basic behaviors for the Roomba. Without any idea of what your room looks like, the Roomba can cover most of it given enough time to run through its patterns, because the patterns are designed to cover an area given enough time.
Planning algorithms are more like your higher brain functions. They look ahead into the future, selecting the best possible action from the different choices the robot has at the present time. These algorithms generate predictions of the possible results of each action using the robot's internal models and estimate of the state. Each result is then evaluated relative to the others using some metric, usually supplied ahead of time by the robot's creators, and the best action is chosen.
Although there are many simple robots that work purely on a reactive level, many use both. The Grand Challenge's autonomous cars provide us with a good example of this. Most of the vehicles ran with two levels of control software. A high-level planner would calculate a desired trajectory through passable terrain ahead to the next GPS waypoint, trying to pick a route that minimizes travel time. This trajectory is then passed to a low-level reactive controller that commands steering angles to keep the vehicle on the desired path.
The alternative to assuming a single true state is harder: the robot has to consider all the possible outcomes. This can eat up a lot of computation time. Take a simple example with only two possible state values: a planning algorithm that considers the possibility that a patch of ground it wants to go through is either passable or impassible. Passable terrain has a low cost, and impassible terrain has a very high cost since you really don't want to drive over it.
Since impassible terrain has a very high cost, we only drive over a bit of ground if we're really sure that it's passable, which is why the robots tend to be conservative, and rightly so, with respect to obstacles. For example, say there's a bit of ground in front of us that we think is either a large rock or a small bush. If we think there's a fifty-fifty chance that it's a rock and we decide to put our path through it, then there's a fifty percent chance that we'll get stuck and end the race right there versus a fifty percent chance that it's a bush and we'll save about 30 seconds. On the other hand, if we go around it there's a 100 percent chance that we lose 30 seconds. Faced with that choice, it's pretty clear that the right thing is to choose a path that goes around.
The example with only one obstacle to consider is straightforward, but now say there's two obstacles. That means there are 4 possible states: both there, one or the other there, or both absent. As you increase the number of state variables, there are an exponentially growing number of possible values to consider. Considering all possibilities makes sure you find the best possible answer, but you might not get to it in a reasonable time. Some of the most interesting current research goes even beyond this. Instead of considering only the possible end states after a robot action, we can also consider the possible beliefs a robot has about its state after an action. This kind of meta-control can lead to much smarter robots, robots that know when they don't know and that take active action to improve their understanding. This leads to even bigger computational headaches. Figuring out how to solve such problems in a reasonable amount of time is a hot area of current robotics research.
Hopefully, we've managed to convey the importance of sensing in robotics and the important role that probability plays in sensing. A lot of hard work by a lot of people has been condensed in to a few short pages, and much has been left out, so apologies for glossing over many details. Looking at an overview like this, it always seems like the tasks that are being described are so easy: just take the features and calculate the probabilities and hey, presto, we've "solved" object recognition!
Of course, the devil is in the details; the algorithms we've talked about are all computational gluttons. By introducing probability and calculating over possibilities, the robots are more capable of dealing with uncertainty, but it also means that you have to run a lot of computations. Probabilistic robotics has made the modern robots that we see possible, and Moore's Law has helped make probabilistic robotics feasible, but there's still a lot of work left before we have real thinking machines.
We'll leave off with some intriguing news from another discipline. In recent years, the fields of robotics and neuroscience have often found common ground. Scientists are discovering that in many things, humans work the same way we've come to make our robots work. Remember object recognition? Researchers have done experiments showing that there are specific portions of our visual cortexes that light up in response to particular features. There are neurons that light up specifically for things like eyes, noses, and ears. The eyes and nose neurons feed up to neurons that recognize faces, providing features for face recognition just like on a robot.
The really interesting thing is that there have been experiments showing that humans, when asked to perform certain visual perception, language processing, and motor control tasks, produce results identical to software using Bayes' Rule with probabilistic models. It's too early to say for sure, but might the human brain be a giant neural calculator, running Bayes' Rule on probability distributions that we've been learning all our lives? Who knows—we might be closer to thinking machines than we thought.