Example #1
0
 def __init__(self, l1_action_string, subtasks, lowerDomain):
     self.action = l1_action_string
     goal_room = self.extract_goal_room(self.action)
     self.goal_state = FourRoomL1State(goal_room, is_terminal=True)
     tf, rf = self._terminal_function, self._reward_function
     self.l0_domain = lowerDomain
     NonPrimitiveAbstractTask.__init__(self, l1_action_string, subtasks, tf, rf)
Example #2
0
    def __init__(self, l2_action_string, subtasks, lowerDomain):
        self.action = l2_action_string
        self.goal_floor = self.extract_goal_floor(self.action)

        self.goal_constraints = {'goal': 'a', 'stay': '~a'}
        self.ap_maps = {'a': (2, 'state', self.goal_floor)}
        tf, rf = self._terminal_function, self._reward_function
        self.l1_domain = lowerDomain
        NonPrimitiveAbstractTask.__init__(self, l2_action_string, subtasks, tf,
                                          rf)
Example #3
0
    def __init__(self, l1_action_string, subtasks, lowerDomain):
        self.action = l1_action_string
        self.goal_room = self.extract_goal_room(self.action)
        #self.goal_state = CubeL1State(goal_room, 0, is_terminal=True)

        self.goal_constraints = {'goal': 'a', 'stay': '~a'}
        self.ap_maps = {'a': (1, 'state', self.goal_room)}
        tf, rf = self._terminal_function, self._reward_function
        self.l0_domain = lowerDomain
        NonPrimitiveAbstractTask.__init__(self, l1_action_string, subtasks, tf,
                                          rf)
    def __init__(self, l1_action_string, subtasks, l0_domain):
        '''
        Args:
            l1_action_string (str)
            subtasks (list)
            l0_domain (CleanUpMDP)
        '''
        self.action = l1_action_string
        self.l0_domain = l0_domain
        self.lifted_action = self.grounded_to_lifted_action(l1_action_string)

        tf, rf = self._terminal_function, self._reward_function
        NonPrimitiveAbstractTask.__init__(self, l1_action_string, subtasks, tf,
                                          rf)
Example #5
0
    def __init__(self, l2_action_string, subtasks, lowerDomain):
        self.action = l2_action_string
        self.goal_floor = self.extract_goal_floor(self.action)

        # define constraints
        self.goal_constraints = {}
        self.goal_constraints['Qs'] = lowerDomain.constraints['Qs']
        self.goal_constraints['Qg'] = lowerDomain.constraints['Qg']
        self.goal_constraints['Sg'] = [self.goal_floor]
        self.goal_constraints['mode'] = 'child'

        # transfer ap_maps
        self.ap_maps = lowerDomain.ap_maps
        tf, rf = self._terminal_function, self._reward_function
        self.l1_domain = lowerDomain
        NonPrimitiveAbstractTask.__init__(self, l2_action_string, subtasks, tf,
                                          rf)
Example #6
0
 def __init__(self, l1_action_string, subtasks, lower_domain):
     '''
     Args:
          l1_action_string (str): string representing action in l1 domain
          subtasks (list):  list of PrimitiveAbstractTask objects
          lower_domain (OOMDP): L0 MDP
     '''
     self.action = l1_action_string
     self.goal_parameter = TaxiL1GroundedAction._extract_goal_parameter_from_action(
         l1_action_string)
     self.is_navigation_task = self.goal_parameter.lower(
     ) in TaxiL1OOMDP.COLORS
     self.is_pickup_task = 'pickup' in self.goal_parameter.lower()
     self.is_dropoff_task = 'dropoff' in self.goal_parameter.lower()
     tf, rf = self._terminal_function, self._reward_function
     self.l0_domain = lower_domain
     NonPrimitiveAbstractTask.__init__(self, l1_action_string, subtasks, tf,
                                       rf)