So here's how the stalemate detection AI stuff works:
- A "stalemate" is defined as neither ship being able to land a shot on another.
- The AI will detect a stalemate if the AI and its target have been within distance X for time Y without either ship landing a shot.
- Distance X is controlled by
$Stalemate Distance Threshold.
- Time Y is controlled by
$Stalemate Time Threshold.
- Both of the above values default to 0, meaning the AI will never detect a stalemate (retail behavior).
- If the AI detects a stalemate, it might try something different (usually a "break away" or change directions kind of move).
- How likely the AI is to act once a stalemate is detected is determined by
$Patience (in retail, this attribute does precisely nothing).
These attributes are pretty effective at breaking up the dreaded "circle fight" where AI ships end up chasing each other around in circles without ever getting a firing solution.
I should also note that there are a LOT of hardcoded distance values in the AI code, and some AI code will never trigger with high-speed ships (combat distance is always higher than some of those hardcoded distance values).