The hideout is chosen randomly, and the number of hideouts NPCs can access depends on the size of the city in which they live. In short, if an NPC is attacked and has no chance of winning against an aggressor, that NPC will run away from the aggressor and attempt to find a safe place (a hideout). Survival Instinct is a feature which gives nearly all the friendly and unique NPCs of Skyrim the ability to properly evaluate danger from an aggressor and respond to it more realistically while under attack. Specifically, this mod adds a new 'Survival Instinct' feature to the NPC AI. This plugin greatly improves the root AI used by NPCs when they are in combat.