A * algorithm applied to the problem of finding the way