adamb1011 explanations are mostly correct.
- use farms and manufacturin/research buildings about 50% to 50% of your space (I did a similar calculation a short while ago). If you use a lot of starbases or a manufacturing capital, use even more food buildings and maybe you will need an approval building or two.
- if you don't mind the micromanagement, deleting factories in favor of food buildings is also very correct. Even if you build a research world you should get some first and destroy later (or use the world as mixed world).
- I would consider getting the food distribution way earlier (If I have the tech the order is usually hospital - farm - farm - food distribution - more farms). It grants more pop then a basic farm when you hit 20 pop plus it gets growth adjacency bonusses and thus acts similar to a hospital.
What the AI does can be read in the GoverneorDefs.xml file.
<Governor>
<InternalName>AIManufacturing</InternalName>
<DisplayName>AIManufacturing_Name</DisplayName>
<Description>AIManufacturing_Dec</Description>
<Icon>GC3_Governor_Manufacturing_Spending_Icon.png</Icon>
<Improvement>Manufacturing</Improvement>
<Improvement>Manufacturing</Improvement>
<Improvement>Manufacturing</Improvement>
<Improvement>ManufacturingHub</Improvement>
<Improvement>Manufacturing</Improvement>
<Improvement>Food</Improvement>
<Improvement>Food</Improvement>
<Improvement>ManufacturingHub</Improvement>
<Improvement>Manufacturing</Improvement>
<Improvement>Manufacturing</Improvement>
<Improvement>Manufacturing</Improvement>
<Improvement>Manufacturing</Improvement>
<Improvement>Manufacturing</Improvement>
<Improvement>ManufacturingHub</Improvement>
<Improvement>Food</Improvement>
<Improvement>Approval</Improvement>
<Improvement>Manufacturing</Improvement>
<Improvement>Manufacturing</Improvement>
<Improvement>Manufacturing</Improvement>
<Improvement>Influence</Improvement>
<FillerImprovement>Manufacturing</FillerImprovement>
<FillerImprovement>Manufacturing</FillerImprovement>
<FillerImprovement>ManufacturingHub</FillerImprovement>
<FillerImprovement>Food</FillerImprovement>
<FillerImprovement>Approval</FillerImprovement>
<FillerImprovement>Manufacturing</FillerImprovement>
<ProjectName>ProjectBirthingSubsidies</ProjectName>
<ProjectName>ProjectMilitary</ProjectName>
<ProjectName>ProjectEconomicStimulus</ProjectName>
</Governor>
So we have slots 7 and 8 (capital being slot 1) go to food and then slot 16 goes to a food improvement (next: 25, 31, 37, ...). Class 12 worlds will only have two farms when maxed out. This is waaaay too low and also lacks growth buildings. Manufacturinhubs are solar collectors, anti matter plants etc.
I am surprised to see, that manufacturing uniques (manufacturing capital, singularity plant,...) are not present in the AIs game plan. Has anyone conquered a world with one of these recently?