walking in sf is either gradient ascent or gradient descent