I can tell it's non-random. Because certain locations retreat to the same places. Not exactly referencing what is contained in the sector like what the player has.
Traders appear to go back up their path, but I'm not certain there.
Spoiler
Show
The hub is most easily measured for me as most often that is a place non-traveling defensive ships retreat from. Always through my Cloudbase Southwest / Emperor Mines link to go to Paranid Prime Delta. That is my Gate 1 pair with Emperor Mines being 'south'. A 4 gate jump, but the TOAs could mess with the math.
Harmony of Perpetuity is also a consistent retreat position with a jump to Treasure Chest and that's a 3 gate jump (Hub is in the path). The Hub being there seems like it should go to Emperor Mines if it was using the same pathing.
Harmony of Perpetuity is also a consistent retreat position with a jump to Treasure Chest and that's a 3 gate jump (Hub is in the path). The Hub being there seems like it should go to Emperor Mines if it was using the same pathing.