Reminds me of that Will Smith robot movie where a car accident happened and the car was submerged underwater...the robot chose to save Smith instead of a child because it calculated that Smith had a higher chance of survival.
It probably just has motion or object sensors though. So it will swerve to avoid the first object and then do it's best to avoid the second one as well, it won't really differentiate which is more important.