Firstly, while we would surely want somewhat
intelligent machines
to be able
to refuse
to unjust (or illegal) orders, they may also decide against saying «no»
to patently unjust wars, and
to unjust actions within wars, because they may have learned that these actions are the most expedient
way to achieve their specified
goal.