Greatly expanded usefulness of tree-searching algorithm