I'm looking for an algorithm that will let me plug in a heuristic for scoring a subtree, and as the algorithm does a depth-first search, it stops when the score has:
- Already hit a threshold (minimum score)
- only changed a very small amount from child to parent
So this algorithm would be doing a fuzzy search for a "payload."
Is there an algorithm like this?