Max Barry’s new novel envisions a future where artificial intelligence handles most of the fighting—until people start to question it.