By measuring a driver's brain activity as he responds to different driving situations, the researchers can learn to better program self-driving cars.