Research code for heuristic search.