The Sahara desert ant is able to form a direct route back to its nest after foraging by adding and subtracting the vectors of its path in its head, thereby creating a short and distinct return path.