Planning to Learn