Re: Explanation of AI State??
Most of the AI is hard coded. It will assess what is happening and go into a particular 'state' according to its decision criteria. The names of the possible states are what you have posted. It's not too difficult to figure out what they mean. Exploration and Infrastructure are used when no enemies are present. Prepare to attack and attack are used when an enemy is judged to be in the AI's claimed territory and it finds itself strong enough to attack. Secure holdings after Incursion I'm not sure about -- it might be after the AI attacks, it might be after the AI has been attacked. The defend options are easy enough. I've never seen Defend (Long Term) actually used by the AI, though. Not Connected is for when the AI realizes it's cut off from the rest of the map (no warp points).
Theoretically, you could use all those various state names to make the AI behave differently according to it's 'state' when selecting colony types, researching, building ships, etc. In practice the only place where this is useful is in ship/unit construction.
Think about it. If the AI were told to research weapons only when in one of the 'threatened' states -- presumably to speed 'infrastucture' research like resource extraction technologies -- it would be a sitting duck for the first enemy that came along after an extended pause in weapons research. Which would probably be the first contact with a major rival. It would be far behind an empire that researched weapons without pause and just be ripe for the picking of those infrastructure techs. And of course it doesn't make any sense at all to have it reversed, researching weapons only when not threatened.
The same goes for selecting colony types. The AI is already very bad at balancing its resources. It would be foolish to tell it to not build military installations or not build 'Intelligence' colonies when not at war. And you can't tell it to not develop resource planets when at war, because available resources can make all the difference in a war. There is no mechanism to re-assign colony types, either. It would be stuck, again, with lots of juicy undefended but developed stuff easily taken. You must tell it to develop its holdings in the same way at all times.
The only place where using different AI states is actually worthwhile is in *_AI_Construction_Vehicles.txt where you can tell it to build different types of ships or units when exploring, defending, or attacking. The 'scripting' is just too crude to be useful in the other files.
[ June 04, 2003, 01:50: Message edited by: Baron Munchausen ]
|