Allow custom heuristic