Learning the goal-structure of actions in a connectionist network without inverse planning