Artificial intelligence is creating new avenues for war in what could be the century's defining arms race.