It is random, however there are no small or tiny gas giants. So if the AI was creating planets out of small or tiny asteroids then they will never get any gas giants. There is no way to tell the AI which asteroid to pick to make a planet out of. Their may be some harcoded programing which tells the AI which asteroids to do in which order, but the modders have no access to it.
Geoschmo
(EDIT: Slow typing. Taz beat me to it.

)
[ December 02, 2002, 14:00: Message edited by: geoschmo ]