Planning for Learning through the Environment