{{javascript}}SelfCatThreatModel
This class models how agents react to a perceived threat (e.g., a loud bang) while considering the self-categorization theory ("reicher-2010"). Please, note: Implement following behavior:
  1. If agent A is within the threat radius, escape (i.e., first maximize distance to the threat and then go to a safe zone).
  2. If agent A is outside threat radius, check if "searchRadius" contains an escaping in-group member. If yes, escape also. Otherwise, go to original target.
  3. Out-group members use the locomotion layer to go to a target (i.e., keep their original behavior).