(self, state)
return pots_states_dict
Returns dict with structure:
        {
         empty: [positions of empty pots]
        'x_items': [soup objects with x items that have yet to start cooking],
        'cooking': [soup objs that are cooking but not ready]
        'ready': [ready soup objs],
        }
        NOTE: all returned pots are just pot positions
Returns dict with structure:
        {
         empty: [positions of empty pots]
        'x_items': [soup objects with x items that have yet to start cooking],
        'cooking': [soup objs that are cooking but not ready]
        'ready': [ready soup objs],
        }
        NOTE: all returned pots are just pot positions
Returns dict with structure : { empty : [ positions of empty pots ] x_items : [ soup objects with x items that have yet to start cooking ] cooking : [ soup objs that are cooking but not ready ] ready : [ ready soup objs ] } NOTE : all returned pots are just pot positions
def get_pot_states(self, state):
        """Returns dict with structure:
        {
         empty: [positions of empty pots]
        'x_items': [soup objects with x items that have yet to start cooking],
        'cooking': [soup objs that are cooking but not ready]
        'ready': [ready soup objs],
        }
        NOTE: all returned pots are just pot positions
        """
        pots_states_dict = defaultdict(list)
        for pot_pos in self.get_pot_locations():
            if not state.has_object(pot_pos):
                pots_states_dict['empty'].append(pot_pos)
            else:
                soup = state.get_object(pot_pos)
                assert soup.name == 'soup', "soup at " + pot_pos + " is not a soup but a " + soup.name
                if soup.is_ready:
                    pots_states_dict['ready'].append(pot_pos)
                elif soup.is_cooking:
                    pots_states_dict['cooking'].append(pot_pos)
                else:
                    num_ingredients = len(soup.ingredients)
                    pots_states_dict['{}_items'.format(num_ingredients)].append(pot_pos)

        return pots_states_dict
def get_pot_states ( self , state ) : pots_states_dict = defaultdict ( list ) for pot_pos in self . get_pot_locations ( ) : if not state . has_object ( pot_pos ) : pots_states_dict [ 'empty' ] . append ( pot_pos ) else : soup = state . get_object ( pot_pos ) assert soup . name == 'soup' , "soup at " + pot_pos + " is not a soup but a " + soup . name if soup . is_ready : pots_states_dict [ 'ready' ] . append ( pot_pos ) elif soup . is_cooking : pots_states_dict [ 'cooking' ] . append ( pot_pos ) else : num_ingredients = len ( soup . ingredients ) pots_states_dict [ '{}_items' . format ( num_ingredients ) ] . append ( pot_pos ) return pots_states_dict