Sub-Goal Trees -- a Framework for Goal-Based Reinforcement Learning