Learning Subgoal Representations with Slow Dynamics