Hierarchical And Compositional Reinforcement Learning For Autonomous Systems