It only "decides" what it's told to decide. And it ought to be a law that no human can ever be killed by an autonomous robot (not even in a war).