예제 #1
0
    def reset(self):
        """
        Reset the attributes to initial state (called between instances).
        :return: None
        """
        self.update_memory()

        RMax.reset(self)

        if len(self.U_memory) > self.n_required_tasks:
            self.update_max_q_init_upper_bound()
예제 #2
0
    def reset(self):
        """
        Reset the attributes to initial state (called between instances).
        Save the previous model.
        :return: None
        """
        RMax.reset(self)

        self.write(init=False)

        # Reset recorded variables between MDPs
        self.discounted_return = 0.
        self.total_return = 0.
        self.n_time_steps = 0
        self.update_time_steps = []
예제 #3
0
    def reset(self):
        """
        Reset the attributes to initial state (called between instances).
        Save the previous model.
        :return: None
        """
        # Save previously learned model
        if len(self.counter) > 0 and (self.max_memory_size is None or
                                      len(self.U_lip) < self.max_memory_size):
            self.update_memory()

        RMax.reset(self)

        if self.estimate_distances_online:
            self.update_max_distances()
        self.update_upper_bound()