Implementing the replay experience method for the Q-learner class