allow for heuristic selection of nodes

implement a means of using a heuristic to decide on the next node to be
chosen while building tree