Title: An analysis of goal-directed behaviour