Just remember, all of this is the basis for all of the “Internet of Things” (IoT) aka automation aka Alexa and the rest. If a human being does something stupid like running a stop sign, it is a single act and society has procedures to handle the consequences. If a self-driving automation system does the same action, the ramifications are a very “Brave New World” indeed! Even if you place ultimate responsibility with the driver using the flying pilot rules as an exemplar, there are going to be a myriad of exceptions to be programmed.
Thank God I am a retired & recovering software engineer!
The one law that never changes: GIGO - Garbage In, Garbage Out