From what I can tell of the AI, it just rolls a random number for buildings deciding what type to build, then builds something with that tag. It appears to be purely random after set numbers and turns, not necessity-driven. For example, the default AI will almost never build a level 5 city because the odds of building population buildings in a level 4 city are extremely low.
Interesting. So I just need to keep playing games with the maximum number of AIs and, sooner or later, one will randomly stumble across the ideal build order and kick ass... well, until it fails at unit design and tactical combat. But as a matter of probability, you should at least get the occasional AI with the ideal city development/economy 