Easy solution... Make the tracks doubly linked. That way, the character can simply backtrack along and, at every fork, take a random direction... Assuming they travelled far enough, over enough forks (if not, too bad), then they will search a different path.
Alternatively, you could doubly link then keep a pointer (in the mob) to the last room with a fork in the trail, as well as which direction they came from, so they won't follow that direction again.
|