This is from looking at how the AI behaves in other mods, not from looking at the SDK code:
The AI is pretty good at choosing among available units. If you want, you can influence it by using the iAIWeight tag in the XML files. It gets more complicated when a unit is not yet available, e.g. when you need to research a certain tech and/or construct a certain building before you can build the unit in question. In that case, the AI might just build lots of weak units instead of the building that is required for strong units. Again, modifying the AIweights of the techs and buildings can help.