WATCH: Self-Driving Cars Need To Learn How Humans Drive Self-driving cars may be the future of transportation. But if they are going to share the road with humans, they have to learn how people behave behind the wheel.

WATCH: Self-Driving Cars Need To Learn How Humans Drive

In the not-too-distant future, Americans will be sharing the road with self-driving cars. Companies are pouring billions of dollars into developing self-driving vehicles. Waymo, formerly the Google self-driving-car project, says that its self-driving cars have already driven millions of miles on the open road.

Stanford University assistant professor Dorsa Sadigh has ridden in self-driving cars. "These cars are OK driving in normal driving conditions on normal roads," Sadigh says. But "the moment you put them in situations they haven't seen, they don't really know how to deal with that."

Swerving, braking, lane-sliding humans can make driving in the real world highly unpredictable. So someone has to teach these robots how to deal with people. That's essentially Sadigh's job: She is a computer scientist and engineer who studies the relationship between artificial intelligence systems, like self-driving cars, and humans.

To teach self-driving cars more about their human counterparts, Sadigh is developing a model of human driving behavior. And to do that, Sadigh's group at the The Center for Automotive Research at Stanford uses an advanced driving simulator to study human driving performance. The driver sits in a full-size car surrounded by 360 degrees of projected screens. Then, the test subject drives through a virtual world designed by the researchers.

During the simulation the researchers track the test subject's steering angle, acceleration, braking and trajectory, as well as eye movements. That helps them determine what the driver is paying attention to, and how long it takes someone to respond to different challenges. They even put drivers in near-accident scenarios to see how they avoid, or don't avoid, accidents.

Over the next few years, Sadigh will collect data from drivers of various ages, demographics and experience levels. Her long-term goal is to develop artificial intelligence algorithms that include comprehensive models of human driving behavior for safer and more efficient self-driving cars.