# Investigations into Pathfinding

**URL:** <https://forums.ageofempires.com/t/investigations-into-pathfinding/266573>\
**Category:** II - Report a Bug\
**Created:** [November 22, 2024, 8:59pm UTC](https://forums.ageofempires.com/t/investigations-into-pathfinding/266573 "2024-11-22T20:59:45Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![cmfrydos](https://forums.ageofempires.com/user_avatar/forums.ageofempires.com/cmfrydos/32/184873_2.png) [@cmfrydos](https://forums.ageofempires.com/u/cmfrydos)\
**Post date:** [March 17, 2025, 5:29pm UTC](https://forums.ageofempires.com/t/investigations-into-pathfinding/266573/12 "2025-03-17T17:29:11Z")

</div>

**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](https://forums.ageofempires.com/uploads/short-url/9SIVue9WmTXnbiTqFQq0QwcSS9Y.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).

---

_[View the full topic](https://forums.ageofempires.com/t/investigations-into-pathfinding/266573)._
