a prolog heuristic that is currently not working well