Investigations into Pathfinding

Time stamp:
Approximately 16:06 in Player 7’s base

What happened:
During a raid with archers, AI-controlled villagers appear to ignore proper pathfinding and directly collide and get stuck with the Lumbercamp building. This behavior is only observed with AI-controlled villagers, as player-controlled villagers seem unaffected. It seems the evasive AI logic isn’t taking pathfinding fully into account—resulting in villagers retreating in a straight line toward their town center and bumping into the building.

Intended behavior:
Villagers should adhere to proper pathfinding rules when retreating. Instead of moving in a straight line, they should navigate around obstacles (like the Lumbercamp) and follow a more tactical retreat path away from enemy units, ensuring that collisions with buildings do not occur.

Recorded game:
AI_Problems.aoe2record (4.8 MB)

Videoclip:

Note:
It could also be that the two villagers are interfering with each other and the lumbercamp corner. This interference is difficult to diagnose without proper debugging tools (such as drawn pathing nodes).