Elon Musk Says Tesla Vehicles Will Drive Themselves in Two Years

Tesla Motors CEO Elon Musk reveals the Tesla Energy Powerwall Home Battery during an event in Hawthorne, California
Photograph by Patrick Fallon — Reuters

In Elon Musk’s world, “easy” is used to describe problems many might consider impossible—or at least very difficult to solve. Producing a fully autonomous vehicle that can operate in any condition and on any road, for example, is easy-ish. And Tesla Motors (TSLA), the all-electric automaker that Musk heads, is two years away from achieving it.

“I think we have all the pieces, and it’s just about refining those pieces, putting them in place, and making sure they work across a huge number of environments—and then we’re done,” Musk told Fortune with assuredness during his commute to SpaceX headquarters in Hawthorne, Calif., where he is also CEO. “It’s a much easier problem than people think it is. But it’s not like George Hotz, a one-guy-and-three-months problem. You know, it’s more like, thousands of people for two years.”

A profile of super hacker Hotz recently appeared in Bloomberg Businessweek. In the article, Hotz revealed he built a self-driving car in his garage in about a month and called the vision chip technology developed by Mobileye—and used by Tesla—”absurd.” He also said Musk had proposed giving him a lucrative contract if his technology outshined Mobileye. In a statement issued in response, Tesla said it’s sticking with Mobileye (MBLY) and rebutted some of Hotz’s challenges about autonomous cars.

Musk doesn’t sound angry as he explains the differences between what Tesla is doing and Hotz’s self-driving car. But there’s a hint of irritation in his voice—perhaps because he’s spending so much time defending Tesla’s product, instead of working on it.

“Demoware is easy; production software is hard,” Musk says. “It’s easy to do a cool demo, it’s hard to put something out. Especially software that’s going to work on millions of different roads all around the world in a wide range of circumstances—in winter, in summer, in rain, in dust—there’s a world of difference there.”

“George is an amazing hacker, but you don’t make production software by hacking. A hack does not work, a hack crashes.”

A Tesla employee initially brought Hotz to Musk as a possible recruit to the company. During the course of their discussions, Hotz told Musk he would come up with a vision solution better than Mobileye’s.

“I expressed some skepticism here, like, look Mobileye has got hundreds of engineers and they’ve been working on this problem for quite awhile and I think they’re pretty smart guys,” Musk says. “He wanted to make a bet, and he said ‘well how much is that worth to you?’ And I said, ‘well I mean if it were true, it would be worth millions of dollars, but I don’t think it’s true.'”

The proposed bet was that a car using Hotz’s solution would be able to stay in lane for the length of Interstate 405 from Los Angeles to San Diego. Musk says he ultimately declined because while he suspected Hotz could make it work for one stretch, he didn’t think the product would work on roads and highways everywhere, all the time.

The Path to Full Autonomy

The U.S. Department of Transportation’s National Highway Traffic Safety Administration defines vehicle automation as having five levels. At level 0, the driver is completely in control and by level 4, the vehicle takes over all safety-critical functions and monitors roadway conditions for an entire trip.

5 level automation

Most major automakers, including Google, are working on autonomous driving technologies of varying degrees. Google (GOOG) is testing a fully autonomous prototype that replaces the driver completely. It hopes to commercialize its technology by 2020. Automakers, meanwhile, are moving towards full autonomy in stages. All are at level 1 (see graphic), and many luxury automakers such as Volvo have recently introduced level 2 capabilities. General Motors will offer a level 2 semi-autonomous feature known as Super Cruise on its 2017 models that includes hands-off lane following, braking, and speed control in certain highway conditions.

Tesla’s autopilot service, which rolled out in October via an over-the-air software update, propelled the company past others in the industry. The first generation of autopilot offers computer-assisted parallel parking, steering and lane changing on highways, and an upgraded warning system for side collisions.

The feature also uses radar, ultrasonics, GPS navigation and cameras. Additionally, the autopilot service is constantly learning, thanks to machine learning algorithms, detailed mapping and sensor data, and the car’s wireless connection. Tesla leverages this information from its entire fleet autopilot-enabled cars. Meaning, it operates as a network so when one car learns something, they all learn it.

Musk wouldn’t reveal details about the next generation of autopilot. That, he explains, “would be a major announcement.” But he did tell Fortune where Tesla will end up.

“We’re going to end up with complete autonomy, and I think we will have complete autonomy in approximately two years.” That doesn’t mean city streets will be overflowing with driverless Tesla vehicles by 2018 (coincidentally, the company’s Model 3 should be on roads by then). Musk expects regulators will lag behind the technology. He predicts it will take an additional year for regulators to determine that it’s safe and to go through an approval process. In some jurisdictions, it may take five years or more, he says.

Musk adds an important caveat—one that raises the standard of what it means to achieve full autonomy. “When I say level 4, I mean level 4 autonomy with the probability of an accident is less than that of person,” he says.

Google versus Tesla

Draft rules released by the California Department of Motor Vehicles in December support Musk’s slow-paced regulation forecast. The rules place strict limits on self-driving car technology, and prohibits the use of fully autonomous driverless cars that don’t have a steering wheel or a brake pedal—like the prototype that Google has developed.

While Google has criticized the proposed rules, calling it “a ceiling on the potential for fully self-driving cars,” Musk agrees with the DMV’s decision to prohibit fully autonomous cars on public roads—for now.

“The data is not yet there to support a fully autonomous vehicle,” Musk says. He predicts that companies like Tesla will produce cars that are technically capable of full autonomy. The full autonomy feature will operate in “shadow mode,” which will allow automakers to accumulate vast amounts of data on what would have happened had the car been in total control, he says.

“The point at which it becomes statistically clear that an autonomous car is safer, I think, regulators will be comfortable with allowing it,” he says.

Musk has given forecasts before on the prospects of Tesla, as well as the rest of the industry. His timeline has accelerated in recent months. Just 15 months ago, he said technology to make a fully autonomous car would be ready in five or six years.

“Cars Are Like Complicated Elevators”

Each component—sensors, mapping, GPS navigation, cameras—is critical to achieve some level of autonomous driving. Cars need to be able to do more than just detect objects to be fully autonomous. They must also understand what they’re seeing, and learn from that experience— tasks that require a staggering amount of processing power.

Automakers like Tesla are using deep learning, a form of machine learning that uses a set of algorithms to teach computers to think more like humans and to learn how to recognize speech and images.

Musk has warned that AI could threaten humanity. Musk recently donated $10 million to outreach organization The Future of Life, which awarded $7 million of those funds to researchers working to mitigate the risks of AI.

Deep learning, however, is not a threat, Musk explains. Cars are relatively simple—like an appliance or a complicated elevator. And cars don’t require deep intelligence, which is the area of AI Musk has warned about, to solve the autonomous driving problem.

What makes autonomous driving complicated is not the depth of the learning, but the breadth of the perception. In other words, learning to recognize symbols and images—stop signs, pedestrians, bicyclists, light signals—is relatively easy. Anticipating the unpredictable behavior of drivers, roads and conditions is more difficult. It’s these millions of corner cases—problems that happens outside of normal parameters—that Musk isn’t sure Hotz appreciates.

The path of success for Hotz—if he wants to create a competing product to Mobileye—is to build a small company, get funding, increase its size so it can conduct verification and validation testing, Musk advises.

“There’s a ton of hard work and bug fixes, and it’s kind of like painful work, and it’s not fun and after doing that for a few years, if George, is prepared to do that, I think he would have a product that would be competitive with Mobileye,” Musk says in a tone you might hear from a parent or older sibling. “That is the actual path to compete with Mobileye. It is not George hacking by himself for a month. I mean, really.”

“George says he did this with 2,000 lines of code. OK, listen buddy, uh, 2,000 lines of code does not cover the 8 billion corner cases of earth. The world is a complicated and messy place. Two thousand lines of code ain’t gonna cover it.”

Make sure to subscribe to Data Sheet, Fortune’s daily newsletter on the business of technology.

To learn more about Tesla’s autopilot technology watch this Fortune video:

Subscribe to the Eye on AI newsletter to stay abreast of how AI is shaping the future of business. Sign up for free.