GOALIATH: a theory of goal-directed behavior