system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do self driving cars work? Are their only approved routes where it can be on autopilot (more details inside)?

Would self driving cars only be able to auto pilot on "identifiable routes". For example, are essentially all roads programmed so that the car knows the amount of lanes (for lane switching, etc)? What about speed limits? Do they always know when to slow down/speed up? Merging with traffic? So many questions.
gpt
Lots and lots and lots of data and sensors, and programs smart enough to understand it all and react quickly to changing circumstances. 

GPS is a basic requirement, telling the car where it is down to a meter or so of accuracy. That's not enough to necessarily distinguish lanes apart, though, much less know when another car is nearby. 

Most roads in the US are mapped, either by government or private agencies working for/with the government. Sometimes this will include speed limits. You can see this in some current car nav systems that tell you when you're going over the limit for this part of the road. 

Traffic data is collected both from transportation agencies that monitor congestion through cameras and the like and also from analyzing cell phone users on highways and seeing how they slow down. 

Cameras in different parts of the spectrum (visible, infrared) record the surroundings, and advanced machine vision programs identify shapes and patterns to distinguish between signs, pedestrians, cars, lane markers, etc. You can also see this tech in action in current systems like the Subaru Eyesight safety package. Much of this technology was adapted from military use, where it was used to track enemy combatants and vehicles as they move. 

When vision isn't enough, cars have other sensors to help cope. Radar, sonar, and lidar (lasers) work together to calculate distances and speeds of nearby objects both stationary and mobile. Onboard software classify them based on their size and motion (house vs car vs bicycle vs unidentifiable object) and try to react accordingly, either keeping pace with the car in front or emergency braking to avoid hitting the unknown obstacle up front.

Internal sensors on the car like accelerometers and gyroscopes and wheel sensors also help it figure out where it's going relative to where it wants to go, and the computer makes changes several hundred times a second to correct course and ensure stability and safety, far faster and more reliably than any human could. 

Each and every one of these problems were very difficult to solve, and combining them into a self driving car is the culmination of decades of research across multiple industries. A lot of it comes from the military and aerospace, and a lot of it had to be purpose built for consumer use on highways.