A novelist explores how AI, autonomous weapons and machine-speed warfare are bringing questions once confined to science fiction closer to reality.