def update_train(self, p_state, action, p_reward, new_state, terminal):
        self.observations.append((p_state, action, p_reward, new_state))
        self.updates += 1

        if self.updates % self.update_rate == 0 and self.updates > 0:
            old = self.epsilon
            self.epsilon = self.epsilon * (1 - 1e-4)
            logging.info(
                'Changing epsilon from {:.5f} to {:.5f}'.format(
                    old, self.epsilon))
        # Train Model once enough history and every seven actions...
        if len(
                self.observations) >= self.obs_size and self.updates % self.update_rate == 0:

            X_train, y_train = self.process_minibatch(terminal)

            self.model.fit(X_train,
                           y_train,
                           batch_size=self.batch_size,
                           nb_epoch=1,
                           verbose=1,
                           shuffle=True)

            if random() < 0.45:
                self.save_model(name='TempModel')
inserts seq after position loc, adds taret site duplication (tsd) if tsdlen > 0
dataset/ETHPy150Open dandxy89/rf_helicopter/Model/Q_Learning_Agent.py/Q_Neural_Network.update_train--crossover with--dataset/ETHPy150Open adamewing/bamsurgeon/bamsurgeon/mutableseq.py/MutableSeq.insertion