A Hierarchy-driven Robot Planner Which Generates Its Own Procedures