You need to incorporate a failure function with the BM heuristics.