예제 #1
0
    def h_pg_maxlevel(self, node):
        """ This heuristic uses a planning graph representation of the problem
        to estimate the maximum level cost out of all the individual goal literals.
        The level cost is the first level where a goal literal appears in the
        planning graph.

        See Also
        --------
        Russell-Norvig 10.3.1 (3rd Edition)
        """
        pg = PlanningGraph(self, node.state, serialize=True, ignore_mutexes=True)
        score = pg.h_maxlevel()
        return score
예제 #2
0
 def h_pg_maxlevel(self, node: Node):
     # requires implemented PlanningGraph class
     pg = PlanningGraph(self, node.state)
     pg_maxlevel = pg.h_maxlevel()
     return pg_maxlevel