Yes, and your link then identifies it:
> They have at least three different compasses at their disposal: one allows them to extract information from the position of the sun in the sky, another uses the patterns of the stars at night, and the third is based on Earth’s ever present magnetic field.
They clearly do not "know" paths anymore than water "knows" what gravity is.