While testing r2178 (a pre-3.5.1 revision) earlier today, I made some observations regarding AI, which might contribute to improving AI sometime in the (not so near) future:
One thing that could be improved about AI is that they should be able to change the meeting point for buildings which produce units, to a location which makes most sense for them. On the test game I played, the egyptian factiion always had its freshly slaves walk to the back of the pyramid (which required walking around buildings which had been built directly adjacent to the pyramid) before they became actually usable to the AI.
I also saw a norsemen Ultra CPU building three houses and three medbars somewhat early in the game, while having only a single bone tent - this does not make much sense to me.
AI also has the tendency to not build buildings which provide the ability to collect resources close to collectable resources. For example, two Ultra Tech CPUs built both their blacksmiths and technodromes far from wood. I assume the AI doesn't understand the benefits in erecting buildings which allow for collection of harvested resources close to the resources, yet.
All CPUs tend to move around their food producing units (chicken, pigs, cows, ...) more than necessary. it can make some sense to move them around early in the game to discover the surrounding of your base, but they keep moving them around on the same paths in areas they have already discovered. This doesn't seem to make much sense (although it may not be much of a problem either).
CPU air units do not seem to understand how anti-air buildings are dangerous to them and how attacking from a different angle / location or just occasional retreats can be tactically useful to them.
CPU units which realise they are loosing health (due to attacks by units they cannot see or cannot reach) should try to move to a random nearby location and see if it helps them (to no longer loose health, or not at the same speed). More simply, units without a ranged attack which get attacked by (to them) visible units with a ranged attack, should try to move out of the attacking unit's attack range.
CPU sometimes fails to repair buildings. In a test game I played, the Magic Ultra CPU failed to repair its only main building which had 63 of 8000 HP left, even ~10 minutes after the building was last attacked. In the same game, the Egyptian Ultra CPU failed to repair their sphinxes (this was after they already lost their only pyramid, but they still had food + workers + some other buildings).
Tech CPU's battle machines never seem to use their alternative (ranged) attack other than for combating air units.
Magic CPU seems to be quite underpowered, doesn't play too well and always died first in the two test games I ran today.
It should not use initiates to scout (much more slow, more expensive, weaker damage/time, and only slightly more HP than daemons)
In one of my test games, there was an archmage with -150 HP (that's: minus one hundred fifty). This happened directly after this unit got upgraded from a battle mage (who had only ~ +60 HP left).
When a dragon is upgrading to evil dragon but gets attacked, AI doesn't seems to ever cancel the upgrade, even though it is about to die.