I disagree than running down the child to guarantee the safety of the driver is the desired outcome. The issues with road safety simply are that pedestrians have nothing protecting them. If hit they are injured and potentially die. Cars have built in safety systems. If they crash into a tree the impact is moderated by these systems and the outcome in terms of injury and death is situational.
In effect from a road safety perspective this algorithm will preserve no pedestrian lives at all.