I think that the there are two ways a computer can handle this. This is especially awesome if you are a good Ai programmer. First this is not a thread about tactics, but how the computer could implement tactics. There are basically four ways. This is basically planet building.
1. The first is basically the way everyone has done it from antiquity. They would write out a sstragedy on planet building. Basically every planet would be built the same way.
2. Second is my closest like the first. It really a compromise between the basically two ways. It's more like the first, but appears like the second. This requires some kind of cheat like a stats on all the civs. The idea is to give this to the players to, so no one can complain that the Ai is cheating. You would use one, or more charts to explain the stats of your opponents. You would use this chart to check up what you opponent is doing. This is basically for planet building. You would also need a default. Build multiple building strategies. You would only implement the building strategies based on whichever one it is losing at. It could check this after every time it built something. If this was to taxing on resources it could be applied after, so many turns instead. You should prioritise which build orders are more important than others just in case two, or more are tied for first place. Now my reasoning for a default is Murphy is its bound to break. If this system is not working then use the default Ai instead of building nothing. The default could also be used if the Ai has not met any players, or if the player can't beat the game.
3. The third idea was actually my original idea. It would be the most resource intensive still require civilization stats, and require even more programming. Instead a having build orders instead the ai would build it's buildings based on what is best on the situation. That means each item would be built for this, this, and this. While other would be built when this happens. It would Have to be able to prioritize stuff which on the surface most people would say is impossible for computers to prioritize things. What this means is this is more important than this. Example the transport going to your home world is more important than building a transport to take that class 26 planet. I say no now everything could be given a value. I would probably say not making any two values equal, so as to help avoid equal comparisons. If there were any two equal comparisons then if would randomize which build order to do. This would also need to be able to observe the opponents territory. It would help to spy on the player.
4. The forth would to learn from the player. This can tie in with three, or two. Would be to learn from the player. If player beats me with this then build it next time. If that is better then keep it. If it isn't thenstop using it. This is the first part. Remember the player will remember what the ai does after, so many games, so why not the ai. I'm not talking holding a grudge over many games. If you did a sneak attack three games ago. This is a new game, but if I new you were going adventualy sneak attack me then I would move my fleets around, change my build orders while still being nice to you. You could add up numbers on everything every game. I'm not talking about finished games, but every game; until, you start over. Generate an average on everything. You could also average the turns to help predict when. This wouldn't affect diplomacy as much as it affects gameplay.