Most self-driving vehicles aren't just coded; they incorporate some form of ML as well. Categorizing patterns of behaviors is well within the reach of ML algorithms, but my understanding is we have far more basic problems to solve first (Tesla's seems to struggle with object tracking over time, which would be a necessary first step to recognizing patterns).
Developing object tracking and a sense of object permanence would be a pretty big prerequisite.. And here I was thinking about the RL model needed to decide what to do in the presence of other agents.