Hierarchical Reinforcement Learning With Function Approximation For Adaptive Control