Example #1
0
    def __init__(self, domain_file, problem_file):
        """
        Constructor
        """
        p = PgParser(domain_file, problem_file)
        self.actions, self.propositions = p.parse_actions_and_propositions()
        self.actions_without_noops = list(self.actions)
        # list of all the actions and list of all the propositions
        initial_state, goal = p.parse_problem()
        # the initial state and the goal state are lists of propositions

        self.initialState = frozenset(initial_state)
        self.goal = frozenset(goal)

        self.create_noops()
        # creates noOps that are used to propagate existing propositions from one layer to the next

        PlanGraphLevel.set_actions(self.actions)
        PlanGraphLevel.set_props(self.propositions)
        self.expanded = 0
    def __init__(self, _domain, _problem):
        """
        Constructor
        """
        self.independent_actions = set()
        self.no_goods = []
        self.graph = []
        p = PgParser(_domain, _problem)
        self.actions, self.propositions = p.parse_actions_and_propositions()
        # list of all the actions and list of all the propositions

        self.initial_state, self.goal = p.parse_problem()
        # the initial state and the goal state are lists of propositions

        self.create_noops()
        # creates noOps that are used to propagate existing propositions from one layer to the next

        self.independent()
        # creates independent actions set and updates self.independent_actions
        PlanGraphLevel.set_independent_actions(self.independent_actions)
        PlanGraphLevel.set_actions(self.actions)
        PlanGraphLevel.set_props(self.propositions)
Example #3
0
    def __init__(self, domain_file, problem_file):
        """
        Constructor
        """
        p = PgParser(domain_file, problem_file)
        self.actions, self.propositions = p.parse_actions_and_propositions()
        # list of all the actions and list of all the propositions

        initial_state, goal = p.parse_problem()
        # the initial state and the goal state are lists of propositions
        self.initialState = frozenset(initial_state)
        self.goal = frozenset(goal)
        for g in goal:
            if "found" not in g.name:
                self.goal_loc = util.LOCATIONS_OF_ROOMS[util.Room[g.name]]
                break
        self.create_noops()
        # creates noOps that are used to propagate existing propositions from one layer to the next

        PlanGraphLevel.set_actions(self.actions)
        PlanGraphLevel.set_props(self.propositions)
        self.expanded = 0