Memory-Prediction Framework with Reinforcement Learning extension