Teaching robots to maneuver politely around people
Back in May, I was walking down Crescent Lawn on the UC Berkeley campus when I saw a food delivery robot coming my way. It was only about two feet high, rolling along at moderate speed and politely staying on its side of the sidewalk. As it sensed me approaching it stopped and “stared” at me. My instinct in that moment, I am ashamed to admit, was to knock it over. I didn’t do that, but I wanted to.
Why did that robot trigger my fight response? How would I like that robot to behave instead?
Since then I have discovered that an entire field of research is devoted to exactly these questions: Human-Robot Interaction. One of the emerging leaders in this field, Anca Dragan, is Assistant Professor in Electrical Engineering and Computer Sciences at UC Berkeley. Just two days after my robot run-in, Dragan and co-authors published an interesting paper in arXiv that describes how to improve robot predictions of human motion.
In it, Fisac and Bajcsy et al. develop algorithms to improve the performance of a small drone that must adjust its flight trajectory to avoid colliding with a person. Key to the success of the drone was to include a model of expected human behavior, and to allow that model to be updated in real-time based on observations.
More generally, Dragan and other researchers are training robots to understand human behavior in order to improve human-robot interaction. There is even a subfield called Robotiquette, coined by Kerstin Dautenhahn (Or did that term not catch on? If not, why?). This is really interesting, because not only are people developing increasingly capable, people-friendly robots, this approach provides a new lens through which to understand human cognition and behavior.
I think we can all agree that when it comes to human-robot interaction, the most important thing is to keep people from getting harmed.
1) A robot may not injure a human being or, through inaction, allow a human being to come to harm.
2) A robot must obey the orders given it by human beings except where such orders would conflict with the First Law.
3) A robot must protect its own existence as long as such protection does not conflict with the First or Second Laws.
The Three Laws of Robotics by author Isaac Asimov (first published in 1940)
Much of the research on human-robot interaction is focused on the balance between this primary need to keep humans safe, and the need for robots to be effective at their job. For example, consider robots that need to navigate through spaces with people present. A false calculation could lead to a collision and injury to both human and robot, but being overly cautious could disrupt the functionality of the robot.
One way to code robots to navigate through space is to use path based methods. Robots are outfitted with cameras, accelerometers, touch sensitive capacitors, and other electronic sensors. Incoming sensor readings are used to map a path to the desired destination, and actuators are put in motion to maneuver the robot along the path.
If a person gets in the way, the most cautious response is for the robot to stop until they pass. However, in some situations pausing interrupts the desired function of the robot. For example, as Dragan said in a recent seminar at the Simons Institute for the Theory of Computing, we would not want our autonomous vehicle to miss our exit on the freeway because it is forever waiting for a safe opening to merge.
An alternative is for the robot to actively re-route and get out of the person’s way. There is one major thing that makes this approach subject to error. The human reaction to the robot.
Predicting Human Behavior
“In order to safely operate around humans, robots can employ predictive models of human motion. Unfortunately, these models cannot capture the full complexity of human behavior.” From Fisac and Bajcsy et al.
People have expectations based on their past experiences. So it is with robots. AI systems can make a prediction about how a person will behave in a given situation based on data showing what people have done in that situation before.
However, that prediction represents the average human reaction. It assumes that all people will react the same way, which is clearly not the case.
If you will indulge me, this problem makes me think of squirrels.
When I am driving and encounter a squirrel in the road, perhaps 80% of the time the squirrel runs off the road in the direction of the shortest distance to safety. If I used the average behavior to decide my action, I would simply continue driving at full speed. However, some squirrels take the longer distance across, and others have a hard time deciding and switch directions once or several times before getting off the road. In either of these cases I might hit the squirrel if I don’t slow down.
To allow for these differences in reactions, what I actually do is slow down and watch the squirrel’s behavior as I approach. I wait for the squirrel to commit to an action before resuming normal driving speed.
Dragan is creating robots that do the same thing. Robots go into an interaction with a preset prediction (the squirrel will probably run off as quickly as possible), but then they probe for behavior (slow roll toward the squirrel), and based on the response (erratically changing direction), the robot can adapt the prediction to match what is observed (this squirrel is crazy), and act accordingly (stop and wait for the squirrel to get all the way off the road). This is an active estimation approach.
An Algorithm for Confidence
To allow for real-time adjustments based on observation, Fisac and Bajcsy et al. added a confidence estimator. The robot has a model of human behavior based on what has been previously observed, but as soon as an individual’s behavior deviates from the model, the confidence in that model decreases. The robot becomes more uncertain about what action to take.
This is called a Bayesian framework. The model provides a certain probability of a given behavior happening, but can be continuously updated based on incoming data.
This represents an important shift in thinking about human-robot interaction. It recognizes that humans and robots influence each other. Both parties are reacting to each other, and computing how to achieve the best possible outcome for their objectives. This type of interaction is best described by game theory.
It will be beneficial to program robot movements, expressions, or vocalizations that help people to predict what the robot will do next. As Dragan says in her Simons Institute talk, when robots are programmed to probe for human reactions or to be transparent about their intentions, communication-like strategies emerge.
Ultimately, humans and robots are on the same team. We want to be good collaborators. That type of coordination would benefit from a robot that can predict how their actions might affect human actions, emotions, and beliefs.
Cognitive Neuroscience Informed Robotics
If we accept that human-robot interaction is a two-player game that relies in part on the robot being able to predict human behavior, then it becomes important to teach the robot about how people act. Equipped with a good enough model of human behavior, a robot can make inferences about the goals of a person based on their behavior, and use those inferences to better navigate toward their own goal.
“The apparent ease of goal inference masks a sophisticated probabilistic induction. There are typically many goals logically consistent with an agent’s actions in a particular context, and the apparent complexity of others’ actions invokes a confusing array of explanations, yet observers’ inductive leaps to likely goals occur effortlessly and accurately. How is this feat of induction possible?
A possible solution, proposed by several philosophers and psychologists, is that these inferences are enabled by an intuitive theory of agency that embodies the principle of rationality: the assumption that rational agents tend to achieve their desires as optimally as possible, given their beliefs.”
From “Goal Inference as Inverse Planning,” by Baker CL, Tenenbaum JB, & Saxe RR.
Roboticists have been pulling ideas from cognitive neuroscience to model human behavior. This is another new field, it turns out, called Cognitive Neuroscience Robotics.
To develop algorithms that can predict human behavior, Dragan and co-authors pulled inspiration from noisy-rationality models used in cognitive science and used maximum-entropy assumptions (links go to the references mentioned in Fisac and Bajcsy et al.).
What the heck does that mean? Well, an algorithm is a set of rules to be followed, which is based on a mathematical model of a system. In Dragan’s paper, she models humans as rational agents seeking a goal, based on previous research in human cognitive neuroscience, but she allows for deviations, or noisy-rationality, where the person may abruptly change course.
For example, a person may be walking to their car, then realize they forgot their keys, requiring that they turn back and get them. What cues might a robot pick up on to infer that the person is going to change course? The robot can observe the trajectory change, calculate the new path the person is going to take, and update their own trajectory to avoid a collision.
As sensory hardware and the algorithms governing robot logic become more sophisticated, robots may be able to detect subtle predictors of human behavior, such as eye movements, or changes in facial expression or body temperature. These cues could be used to better predict a course change before the person actually stops or changes direction. During interactions where humans and robots touch, a number of additional biometric sensors could be used to infer human emotion and intent.
Cognitive Neuroscience Robotics does not only exist to inform robotics. The other side of the coin is that we learn more about what it means to be human in the process of developing intelligent robots. Some of our biggest questions about the mind — what is consciousness, how does perception and decision making work, do we have free will — can be considered from a new perspective as we build robots in our image.
Thanks for reading
I want to write books! You can help me achieve that goal by signing up for my mailing list. In return you will receive a monthly newsletter with links to my latest stories and curated content just for you. Sign up now.