Ideally, isn't the point to have only autonomous vehicles and these situations become obsolete?
Even all cars become autonomous, the problem will still be hard I believe. Hard coded rules may solve the problem but relying on communication and cooperation will not be easy.