> So what should it do? Continue futilely braking to a likely-fatal accident when it impacts the truck? Or swerve to avoid?
Just speculating, but I'd wager we end up with a suboptimal solution to particular instances like this in favor of a general policy that is a) predictable, and b) minimizes liability. IOW, the car will be programmed to brake rather than swerve, because swerving opens many unpredictable cans of worms, as you've noted. Braking may be the worse answer here, but as a general matter, I think you're going to have an easier time in court arguing that the car did its best to brake to avoid a collision vs. arguing that the fact that it swerved and, say, hit a schoolbus or went over a cliff.