I'm thinking about this problem at the moment, too, because I've got to do some kind of rts-AI, too.
I created an editor in which the map file is loaded and set hotspots for the AI there. For example, they have a base, so their main point to defend is the base. If there are some other strategically important places, they get spotted, too.
All the units have different attitudes, some cyborgs run away when meeting an enemy tank, some call for help, ... It's nothing more than a big collection of "if"'s and units attitudes. Make the units look intelligent is really hard to do, not all tanks may act in the same way, there should be some differences and, a main point, they may not be perfect. Creating perfect enemy units is really easy, but let them acting human is much harder to do.
So, the AI knows how to build up a base and what it needs, sometimes, it does an strategical mistake, sometimes it does not. Then it has a number of how many units of this type it needs and how many of another type to defend the base. After having built a good defensive line, the AI begins to build attacking units, ...
An AI is normally built up like this, it sounds easy, but it's hard to implement. And this is the point where most of the RTS-games suck, most of them have good game ideas and nice graphics, but only few of them have a good AI that makes the game fun to play.
Also you have to decide whether the AI is cheating or not. If it's cheating, it's easier for you, because you can give the AI the information where the players base is and it gets information about the terrain, so it will directly move to your base if it attacks. If not, there are much more decisions needed (and much more functions to implement).
CU
------------------
Skullpture Entertainment
#40842461
Graphix Coding @Skullpture Entertainmenthttp://www.skullpture.de