def compute_feedback(self):
    '\n        Return the expert action from the previous timestep.\n        '
    dist_pos = np.array(self.env.dist_pos)
    agentobj_distances = np.sum(np.abs((dist_pos - self.env.agent_pos)), axis=1)
    curr_dist = np.sum(np.abs((self.env.obj_pos - self.env.agent_pos)))
    goalobj_distances = np.sum(np.abs((dist_pos - self.env.obj_pos)), axis=1)
    idx_closer = np.where((goalobj_distances < curr_dist))
    if (len(idx_closer[0]) == 0):
        return np.array([self.env.obj_color, self.env.obj_type])
    else:
        idx_agentobj = range(len(agentobj_distances))
        idx_agentobj = [x for (_, x) in sorted(zip(agentobj_distances, idx_agentobj))]
        for idx in idx_agentobj:
            if (idx in idx_closer[0]):
                break
        return np.array([self.env.dist_colors[idx], self.env.dist_types[idx]])
Return the expert action from the previous timestep.
def compute_feedback(self):
    '\n        \n        '
    dist_pos = np.array(self.env.dist_pos)
    agentobj_distances = np.sum(np.abs((dist_pos - self.env.agent_pos)), axis=1)
    curr_dist = np.sum(np.abs((self.env.obj_pos - self.env.agent_pos)))
    goalobj_distances = np.sum(np.abs((dist_pos - self.env.obj_pos)), axis=1)
    idx_closer = np.where((goalobj_distances < curr_dist))
    if (len(idx_closer[0]) == 0):
        return np.array([self.env.obj_color, self.env.obj_type])
    else:
        idx_agentobj = range(len(agentobj_distances))
        idx_agentobj = [x for (_, x) in sorted(zip(agentobj_distances, idx_agentobj))]
        for idx in idx_agentobj:
            if (idx in idx_closer[0]):
                break
        return np.array([self.env.dist_colors[idx], self.env.dist_types[idx]])