Researchers design AI-based early warning system for autonomous cars