Empty tiles should be filled first, before any building upgrades, and before any tile upgrades.
I can currently screw the AI over by giving them Soil Enhancement, and by feeding them building upgrades once every month or two. By the time I invade, they still haven't developed their worlds, because they were trapped behind a bad priority system.
Suggestion: Sort the build queue into three levels of priority:
- Empty tiles
- Upgrading buildings
- Upgrading tiles
Then the AI will be more competetive. It could even be applied to the Planetary Governer, and the screen where the player is filling out a new planet. Instead of having yellow/orange/red tiles jump up in the middle, have them at the end.
I haven't messed with the AIPriority flag that comes with techs, but it might be useful when looking at a planet and deciding if an upgrade warrents coming before an empty tile, or being purchased outright.