Skip to content

fix: prevent AI armies from getting permanently stuck at destroyed en…#1417

Merged
braedonsaunders merged 1 commit intomainfrom
claude/fix-ai-stuck-pathfinding-G0O28
Feb 10, 2026
Merged

fix: prevent AI armies from getting permanently stuck at destroyed en…#1417
braedonsaunders merged 1 commit intomainfrom
claude/fix-ai-stuck-pathfinding-G0O28

Conversation

@braedonsaunders
Copy link
Owner

…emy bases

Four fixes for AI combat behavior in FFA games:

  1. Hunt mode stuck detection: armies that have had no combat for 300 ticks (~15s) during hunt mode now force-disengage and return to base, instead of sitting at destroyed enemy bases forever.

  2. At-target dead zone: completely idle units (assault mode already timed out) near a target building are no longer skipped by the re-command system. Previously these units fell into a dead zone where CombatSystem skipped them (not in hot cell) AND AITacticsManager skipped them (within at-target threshold), leaving them permanently stuck.

  3. Threat retarget range: units attacking buildings now detect approaching enemy combat units at sight range instead of attack range, so armies won't ignore enemies walking right past them.

  4. Moving units scan for threats: all moving units now check for enemies within attack range (immediate threats only), so armies don't walk past enemies in their face without reacting.

https://claude.ai/code/session_01GvKdDRj8RdBUFmnvyPSYJK

…emy bases

Four fixes for AI combat behavior in FFA games:

1. Hunt mode stuck detection: armies that have had no combat for 300 ticks
   (~15s) during hunt mode now force-disengage and return to base, instead
   of sitting at destroyed enemy bases forever.

2. At-target dead zone: completely idle units (assault mode already timed
   out) near a target building are no longer skipped by the re-command
   system. Previously these units fell into a dead zone where CombatSystem
   skipped them (not in hot cell) AND AITacticsManager skipped them (within
   at-target threshold), leaving them permanently stuck.

3. Threat retarget range: units attacking buildings now detect approaching
   enemy combat units at sight range instead of attack range, so armies
   won't ignore enemies walking right past them.

4. Moving units scan for threats: all moving units now check for enemies
   within attack range (immediate threats only), so armies don't walk past
   enemies in their face without reacting.

https://claude.ai/code/session_01GvKdDRj8RdBUFmnvyPSYJK
@braedonsaunders braedonsaunders merged commit da203a4 into main Feb 10, 2026
4 checks passed
@braedonsaunders braedonsaunders deleted the claude/fix-ai-stuck-pathfinding-G0O28 branch February 10, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants