Only artificial intelligence can protect Britain, top general warns