Autonomous vehicles are stupid — so an engineer has figured out a way to make streets smarter.