def parse_goal(goal_exp, domain): #try: # pass #except SystemExit as e: # return False return parse_condition(pddl_list_from_expression(goal_exp), domain.type_dict, domain.predicate_dict).simplified()
def get_problem(init_evaluations, goal_expression, domain, unit_costs): objects = map(pddl_from_object, objects_from_evaluations(init_evaluations)) typed_objects = list({pddl.TypedObject(obj, OBJECT) for obj in objects} - set(domain.constants)) init = get_init(init_evaluations) goal = parse_condition(pddl_list_from_expression(goal_expression), domain.type_dict, domain.predicate_dict) return Problem(task_name=domain.name, task_domain_name=domain.name, objects=typed_objects, task_requirements=pddl.tasks.Requirements([]), init=init, goal=goal, use_metric=not unit_costs)
def parse_goal(goal_expression, domain): return parse_condition(pddl_list_from_expression(goal_expression), domain.type_dict, domain.predicate_dict).simplified()