Skip to content

Instantly share code, notes, and snippets.

def h_levelsum(self) -> int:
'''The sum of the level costs of the individual goals (admissible if goals independent)
:return: int
'''
level_sum = 0
# TODO implement
# for each goal in the problem, determine the level cost, then add them together
for goal in self.problem.goal:
levels = [level for level in range(len(self.s_levels)) for state in self.s_levels[level] if goal == state.literal]
@JamWils
JamWils / _.md
Last active August 29, 2015 14:15
reddit table
@JamWils
JamWils / _.md
Created February 8, 2015 01:16
reddit base
@JamWils
JamWils / _.md
Last active August 29, 2015 14:14
reddit base
@JamWils
JamWils / _.md
Created February 6, 2015 00:56
reddit base
@JamWils
JamWils / _.md
Last active August 29, 2015 14:14
reddit base