def plan_agenda(self, scene_state, timestep):
        def evaluator(state, ts):
            try:
                score = np.dot(self.features.features(state, timestep=ts), self.features.weights) + self.features.w0
            except:
                return -np.inf*np.r_[np.ones(len(self.features.weights))]
            # if np.max(score) > -.2:
            #     import ipdb; ipdb.set_trace()
            return score

        def simulate_transfer(state, action, next_state_id):
            aug_traj=self.transferer.transfer(self.demos[action], state, plotting=False)
            self.lfd_env.execute_augmented_trajectory(aug_traj, step_viewer=0)
            result_state = self.lfd_env.observe_scene()

            # Get the rope simulation object and determine if it's a knot
            for sim_obj in self.lfd_env.sim.sim_objs:
                if isinstance(sim_obj, simulation_object.RopeSimulationObject):
                    rope_sim_obj = sim_obj
                    break
            rope_knot = is_knot(rope_sim_obj.rope.GetControlPoints())
            return (result_state, next_state_id, rope_knot)

        return beam_search(scene_state, timestep, self.features.src_ctx.seg_names, simulate_transfer,
                           evaluator, self.lfd_env.sim, width=self.width,
                           depth=self.depth)
dataset/ETHPy150Open rll/lfd/lfd/action_selection.py/FeatureActionSelection.plan_agenda/original