Using confidence ratings to identify a target among foils