We can add the exception for the car "if there is no another car approaching and you have to overtake a bike then you can go over double yellow but you need to reduce speed" - computers are fast enough to analyze thousands of rules and exceptions every second and choose the best option.