Understand and Use Dreams to Learn and Forget