Made the project more robust to user mistakes and added a way to keep record of the learning episode