Agreed, it could be better but I'm not convinced that setting up a Last Stand in the central plaza is the best strategy.
My defence strategy is to hold the AI at the walls -
- Wooden walls tend to have a few choke points where the rams break through
- Cluster my infantry, spearmen, triarii around the choke points and have archers or even artillary pepper the enemy as they try to hack their way through.
- Any cavalry I have would also try to pick off any enemy missile cavalry that are wandering around
- Stone walls allow for my archers to inflict a lot of damage before the AI units even get to the walls
- infantry units are in place to meet the ladders or seige towers
- A secondary defensive position would be in a street that allows a few infantry units to hold off a much larger force at a choke point
So the strategy is to find as many steps to grind the enemy down before they get anywhere close to the central plaza
Trying to defend the central plaza is All or Nothing, it allows the entire enemy force to attack your defenders at once from too many different directions.
The AI seems to adopt 50/50 strategy with some forces at the walls and some in the central plaza - not bad, but perhaps not the best stategy (from my perspective).
Not clear how it could be coded up to be 'smarter' since it's very situational - the layout of the city, the composition of the army it's facing, and it's own resources available.
Clearly, the simplest choice is to give the AI more units so it's harder to hack through them al to gain the victory. That's not a criticism of the dev team, just a simpe solution for a tough problem.