Wasn't there a tutorial about these sort of things in the tutorial section (A*). Or is it just that I have totally misunderstood the question?