An AI-powered design trick could help prevent accidents like Uber’s self-driving car crash