Add ActivityBasedHeuristic.
More refactoring on heuristic.