I read a post a while ago about buggy unit AI and I'm not sure if it was addressed or not. However, the AI is still currently bugged.
Some problems include units being told to attack move and not properly engaging units on the way, versatile attack sometimes causes units to not move into melee range and just stand there firing weak weapons while 5 steps away from the enemy, and units not properly pathfinding (either stopping or doing circles before finidng the correct path).
Part of the chief problem is related to the sqaud based units. Because the units are clustered togeather, they move in groups. This results in units needing much larger clearance since they cannot really move in single file. The reason that this happens more often is the units are not properly cross communicating. When more than 2 units are clustered togeather in one group they need to move togeather in order to get the entire group through the area as fast as possible. Currently, one or two units will block the other units causing your army to move slowly and clumsily.
These issues really need to be adressed as they happen quite a lot in my experience.