Changes to allow QLearning to be trained only in memory