Quantify security under intelligent agents