def execute_action(self, action):
        move = self.trans_dict[action]
        prev_state = copy.deepcopy(self.curr_state)
        self.curr_state[move[0]] = min(max(self.curr_state[move[0]] + move[1],0),self.num_states[move[0]]-1)
        r = self.get_reward(self.curr_state)
        self.Q_mat[self.num_states[0]*(prev_state[0]) + prev_state[1],action] = (
            self.Q_mat[self.num_states[0]*(prev_state[0]) + prev_state[1],action]*(self.alpha-1) +
            (r + self.gamma*max(self.Q_mat[self.num_states[0]*(self.curr_state[0]) + (self.curr_state[1])]))*self.alpha)
        if tuple(self.curr_state) == self.goal_state:
            return True
        return False
dataset/ETHPy150Open posborne/mlcollection/mlcollection/lib/reinforcement/reinforcement_learning_example.py/simple_RL.execute_action/swapped operands of `-`