Accelerating flat reinforcement learning on a robot by using subgoals in a hierarchical framework