How do you know the kids would be saved by your sacrifice? How do you know they would die from your selfishness? How do you know that bus isn't actually filled with violent and dangerous felons being transferred to supermax while awaiting execution, and the guards on it aren't also corrupt to the core?
You don't have that extra information at the time the decision would need to be made.
The logical and ethical thing for the computer to do would be to switch over to emergency collision avoidance mode, and try to avoid damage to the one vehicle it can actually control. The authority to instruct a driver to put its passengers at risk would have to be vested in some sort of traffic control program capable of recognizing when the selfish behavior of individual driver programs might result in more damage and injury overall.
And that's a whole new can of worms.
The only way to enforce the limited choice domain you presented is for the automated drivers to be operating the vehicles unsafely prior to the collision event. In that case, never mind the other car, because either car could be forced off the cliff due to a goat standing in the middle of the road.
Also, I'll program my driver to believe that its car always contains MAXINT passengers.