AI wishlist for 1.82/1.9 and beyond

Hi,

through observation and experimentation with the AI files I come to the conclusion, that the the following changes should be made before long. I will try to split this wishlist in an ASAP (1.82/1.9) part, which I imagine to be fairly easy to implement, while having a reasonable impact on AI performance and a beyond part, which I imagine to require a little more effort or have less impact on the AI performance.

1.82/1.9

1) Change how "upgrade when full works".
 - first and foremost, don't consider a planet full if it can build terraforming improvements. This is not only prevents rediculous partial build orders like:
soil improvement -> upgrade to xeno factory -> upgrade to xeno factory -> basic factory

or
soil improvement -> upgrade to xeno factory -> upgrade to xeno factory -> basic farm (while population blocked)
but is also a player convenience. Terraforming all tiles is (at least to me) a priority over upgrading existing improvements, because then I can forget about the planet layout. For good. Especially when modding the AI, this improvement built after the terraforming can be key! Due to the intransperant way by which the AI replaces buildings, making the AI research terraforming after a key tech like research cloisters or food distribution is highly effective.
This change would be worth implementing even without the second.
 - secondly, don't fill the list with upgrading everything possible. The AI can't move more important projects to the top. A filter which makes the AI just build the upgrade with the lowest manufacturing cost first might actually be enough, it is not ideal, but simple to do I think (the AI checks for tile bonusses, too, after all!).

2) edit: #2 is possibly outdated, depending on how the economy wheel and coercion will be redisgned in Crusade

Fix the AIs behaviour in regards to the economy wheel.
 - the AI sometimes seems to try to compete with Stalin in who can coerce the population more. I suspect the wheel behaviour is an artifact from before the coercion mechanic.
 - ideally you could make an option in the AIStrategyDefs to lock the AI in the specified wheel settings. Right now the wheel settings don't seem to do anything.
 - another convenience would be a setting for the GovernorDefs to make the AI not use the Colony Focus options (it works for capital worlds after all).

3) Could you make manufacturing worlds build shipyards later? Or actually add shipyards as an option to the GovernorDefs ? Or make the AI use constructors to build shipyards (it is cheaper!)? Because building a 150 manufacturing improvement, that makes no contribution to the new colonies is just a bad move. It impedes the growth unless the AI rush buys improvements next in the list. The latter two suggestion are more on the beyond-side of compexity, I think.

4) Please split <DefaultShipPopulation>2.0</DefaultShipPopulation> into two separate options for colonies and transports. I would hope for something like:
<DefaultColonyshipPopulation>1.0</DefaultColonyshipPopulation>
<DefaultTransportshipPopulation>6.0</DefaultTransportshipPopulation>
with the latter defaulting to 3, if only one transport module is installed.

4.1) Make the AI use the population slider instead of having it use the default colony module population. Or at the very least make (possibly Beyond level complicated to implement)

4.2) Maybe you could also add some way for the AI to have multiple transports in one fleet.

Beyond

5) Expanded conditional .xml-syntax for AI governors, global AI strategy choices. Example:
If Food-Population<1 build farm improvement
If number of Farm improvements > 3, build 4th manufacturing improvement. (Else upgrade first)

5.1) Add replace and upgrade syntax to the GoverDefs.xml

6) .xml-access to the AIs decision making on when to make a world economic/tech/manufacturing

7) Replace the AIGovernor definitions
<HomeworldGovernor>AIHomeworld</HomeworldGovernor>
<ManufacturingGovernor>AIManufacturing</ManufacturingGovernor>
<ResearchGovernor>AIResearch</ResearchGovernor>
<WealthGovernor>AIWealth</WealthGovernor>
by lists of governors, which are conditional on the class of the planets (since planet class limits are allready present in the GovernorDefs.xsd).

8) Faction specific governors.

9) Overhauled FleetGovernorDefs

9.1) ability to create multiple kinds of fleets with the same purpose (e.g. colonizer fleets with and without escort)

9.2) ability to define a fleets purpose/strategy e.g.
Cruiser Warfare Fleet: goes around an enemies zone of influence and then attacks traders, constructors starbases and asteroid mining facilities (the AI allready designates single ships for this purpose without circumventing)
Patrol Fleets: designed to hunt Cruiser Warfare Fleets and Pirates
Battle Fleets: designed to assault enemy territory head on

9.3) Maybe add some interface to the AIStrategyDefs to give priority of what kinds of fleets should be formed, something with weights might do the trick

10.) Please repair (It is overwritten by the automated formula at the moment) the <Role> in the ShipBlueprintDefs and <AIShipClass> in the ShipClassDefs, so it allows modders to force the AI to use blueprints in unconventional roles.

I will update this post, If I think of more stuff or a point I agree with is brought up in discussion. I would also be happy to be pointed towards elements I overlooked and which enable one of these.

Thanks for reading,
zuPloed

137,096 views 35 replies
Reply #1 Top

In addition to the above, I would like to see for 1.82/1.9:

  1. Allow the AI to use the Population Slider.
  2. Allow the AI to use more than one Transport.
Reply #2 Top

Well I there is a way around the wheel not talking about modding, and that is morale or economics. That could be a direction that the Ai. shoots for.

As far as starbases go I think that they should only use constructors to make starbases, or only build a starbase after the planet is fully upgraded. Using constroctures to make starbases is a better option.

Here's an idea for the Ai. I know it's a little off topic just wondering what you thought. https://forums.galciv3.com/472121

 

Reply #3 Top

Quoting admiralWillyWilber, reply 2

Well I there is a way around the wheel not talking about modding, and that is morale or economics. That could be a direction that the Ai. shoots for.
I don't think I understand this sentence at all. Could you elaborate?

Reply #4 Top

It's been elaborated on another post that if you get the morale high enough it gets rid of coercion. If the Ai would build more economic starbases around it's planets then you wouldn't have to worry about this, so if the Ai did this then it wouldn't have to worry about coercion.

Reply #6 Top

Quoting admiralWillyWilber, reply 4

It's been elaborated on another post that if you get the morale high enough it gets rid of coercion. If the Ai would build more economic starbases around it's planets then you wouldn't have to worry about this, so if the Ai did this then it wouldn't have to worry about coercion.
Uhm... I think you mean this thread

https://forums.galciv3.com/478170/page/1/#replies

and in that case it was me who explained how the coercion effect gets reduced (but not removed). And getting the AI to build more econ SBs... is complicated.

high morale gets rid of the morale modification by coercion, but at the moment I am not even sure 100% approval is the best way to go. The production part of coercion is allways there, you can only make it remove 50% out of 250% instead of 50% out of 100%.

Quoting admiralWillyWilber, reply 2

Here's an idea for the Ai. I know it's a little off topic just wondering what you thought. https://forums.galciv3.com/472121
provided I understand it correctly, the AI allready does react to the player in some situations. It is implemented through diplomacy modifieres (ripe for conquest, youa re going for a tech victory, you are culture flipping one of my planets, etc.).

For the ripe for conquest one it has to evaluate either the military graph or the trade screen (probably the former though).

And one more comment on this: Only reacting is not the same as having a plan. And any plan is better then no plan. In that sence I would rather build an AI that executes its plan very good and only reacts if it really must. My suggestions focus on enabling the AI to build an economy as efficiently as the player, since this is the prerequisite to executing any strategy effectively.

Of course you can play reactively and win by the raw advantage you may have build up. But having a specific idea of how to win is better and doesn't necessarily require an advantage (e.g. tech victory while being militarily steamrolled).

ps: avatars are overrated.

Reply #7 Top

Well my original was to take advantage of the computer decision making to control how it builds based on giving what the player values. This doesn't work in Html, but it does work in most other languages as long as you assign things numeric values. What I didn't understand at the time is instead of programming classes that told the ai how to do things. They simply wrote a fixed set of build orders to tell the Ai what to do. A fixed set of build orders has the limitation of being overcome by the player.

Now what I have hear is a compromise between the two. Instead of a hundred comparative functions you would use the games native power rating for certain stuff. this would give the ai no more of a advantage than what the player has. All what it would do is use the same charts as what the player does to find out what it does.

Instead of creating numeric values for everything the player does, and makes. It would instead use a fixed set of build orders based on what it was losing at most, or it would use priorities to decide what is more important. And use a fixed build order based on what it was losing at.

Now I would use the games default Ai to take care of murphy's law, and when you were losing to everything.

You could take this a step further, and make databases based multiples of things your losing to.

The Ai reacts to how you play, but not by changing how it builds my two methods it would.

 

Reply #8 Top

Quoting Horemvore, reply 1

I would like to see for 1.82/1.9:

    1. Allow the AI to use the Population Slider.
    1. Allow the AI to use more than one Transport.

 


Seconded.

 

I'd also like to see

1) The Ai understand how to use culture as a tool....

2) ...and recognize when culture is being used against it, and counter it where possible (with something other than a diplo penalty)

3) The Alliances system upgraded, explained in more detail in game, and used by the Ai to respond to a dominant force in the galaxy (human or otherwise).

Reply #9 Top

What is thepopulation slider..

Reply #10 Top

Quoting admiralWillyWilber, reply 9

What is thepopulation slider..
The thing you see when you build a new colony ship or transport.
Quoting hfxnikolai, reply 8

1) The Ai understand how to use culture as a tool....
Wellll... You can tell it to build more culture improvements on each planet... But this leads to oddities like rush buying them very early in the game...

You can also specify tech governors in the AIStrategyDefs, but I didn't check how switching tech trees works yet. Also, there is no starbase governor for influence starbases.

In principle this can be fixed in mods I think. With some of the changes I suggested above, I am rather sure it can.

Quoting hfxnikolai, reply 8

2) ...and recognize when culture is being used against it, and counter it where possible (with something other than a diplo penalty)
This can be part of my suggestion number 4)

Will update my OP now.

Reply #11 Top

Quoting Horemvore, reply 1


Allow the AI to use more than one Transport.
Doesn't it do this in your tweaked AI?

Reply #12 Top

Quoting zuPloed, reply 11

Doesn't it do this in your tweaked AI?

I wish it did. But even hijacking a different AI ShipClass and using that as a 2nd transport, the AI will still only use either the new transport(which is defined as sentinel not transport) or the default transport and never more than one. Seems there is internal code linked to the "transport module" that the AI must use to limit it to 1 transport and the default population. Thats from my observations of AI transport fleets, if anyone else has observed the AI using more than one transport i would love to hear about it and possibly see some screen shots too!

Reply #13 Top

oh, I see - and since it can't use the pop slider, it can't make use of multiple transport modules either?

Reply #14 Top

Quoting zuPloed, reply 13

oh, I see - and since it can't use the pop slider, it can't make use of multiple transport modules either?

Correct.

Reply #15 Top

Quoting Horemvore, reply 14


Quoting zuPloed,

oh, I see - and since it can't use the pop slider, it can't make use of multiple transport modules either?



Correct.

 

And these 2 things combined result in the Ai's overall ineffectiveness in most cases when trying to invade.  That's why you see it take 100+ turns to win a war against a minor race, because it can't bring enough pop to invade the first time, and by the time it gets back there, the pop has grown back and the cycle repeats...It also leads to sorta-kinda exploit-ish scenarios, where humans can fairly easily make their planets invasion proof.

Better blueprints helps with engines to make the cycle faster.  Horemvore's mod making it use 3 pop helps some too.  

But it's an artificial gimp to the ai, like the 1 attack/turn thing they just fixed.  Fixing stuff like that goes a long way to making a more fair and enjoyable game.

I'd rather win because I played intelligently, not because my opponent was playing with a different set of rules that handicapped it. :)

Reply #16 Top

Quoting zuPloed, reply 10


This can be part of my suggestion number 4)


Will update my OP now.

 

Yes, this sort of condition if/or response thing would be very helpful.  Right now culture is kind of a juggernaut once it gets rolling it can't be stopped, because each planet you flip just adds to the culture wave.  Basically, the Ai has no defense against it.  If it could at least recognize the situation and respond to it, maybe by building some culture bases or a building or 2.

Eventually, I'd like to see it able to use culture as a victory strategy like humans do, but being able to recognize and defend against it is a great start.

Reply #17 Top

Building culture buildings is only the counter fire with fire method. Another way is just to try to invasion snipe a key influence world. I once conquered like 7 iridium colonies with two invasions that way, simply because their empire collapsed under their own 'influence'.

The issue I have with Horemvores 3 pop variant is, that it also means, that colonizers use 3 pop, which depopulates the homeworld (which can often make the most use of pop due to fastest development speed) very quickly.

The AI needs the slider, no questions asked. I seem to recall it also doesn't use invasion tactics, right?

Reply #18 Top

Thanks for the feedback, we are addressing, or plan on addressing most of these issue. 

But player feedback is always welcome.  

Reply #19 Top

Thanks for the update!

Will continue to keep the OP up to date with ideas I think are good :)

Reply #20 Top

Quoting mormegil, reply 18

Thanks for the feedback, we are addressing, or plan on addressing most of these issue. 

But player feedback is always welcome.  

Thanx! It is great to see replies like this! :thumbsup:

Reply #21 Top

Paul in helping with maybe some constructive feedback I would think seperating the Ai for invading vs. colonizing would help. My guess is the Ai says something like if empty planet send colony Blah number. If at war, and planet nearby send same blah colonists. If planet empty, and at war should probably be two different things. If empty planet near by, and planet > 10 send mnax colonists. If not as few as possible.

Now about transport not much to do with colonization, and a little bit trickier. First if at war Iguess. Being the Ai I need a list of my most populated and industrialized planets and shipyards. If my most industrialized starports aren't sponsored by my most populated planets build transports, and fix this. Moving population is a better option than changing sponsors wouid cause serious lost of production. Unlikely if this doesn't change sponsors. This would be better than trying to move starports which are to slow. Then build transports from your most populated centers as long as you keep population above 2.

If range ever becomes an issue make better ships.

Reply #22 Top

Quoting zuPloed, reply 17

Building culture buildings is only the counter fire with fire method. Another way is just to try to invasion snipe a key influence world. I once conquered like 7 iridium colonies with two invasions that way, simply because their empire collapsed under their own 'influence'.

The issue I have with Horemvores 3 pop variant is, that it also means, that colonizers use 3 pop, which depopulates the homeworld (which can often make the most use of pop due to fastest development speed) very quickly.

The AI needs the slider, no questions asked. I seem to recall it also doesn't use invasion tactics, right?

 

Well...there's also culture relics and trading for snuggler colonies and building culture bases....but that gets into the hornet's nest of the Ai recognizing a threat and changing its default behaviour to address it, affecting its trading, building and diplomacy priorities....

Agreed on the pop slider use, and differentiating between colonizing and invasion needs would help a lot too.  I often blow up homeworld shipyards with 3-6 transports in them, so obviously the Ai builds them, but it can't do the invasion math so it only ever sends 1 at a time.  I'd settle if it could do the invasion math and send the appropriate amount of transports the first time if making it use the slider was too complex.  But, ideally, both would be great :)

I've seen them research the invasion techs, but never use them that I can remember.  Them actually invading me rarely happens though, so I can't say for certain they don't.

Reply #23 Top

The hornets nest would make for a better game.

Reply #24 Top

A switch or trigger that will make the AI attack pirates as a priority. ATM they avoid them like the plague.

Reply #25 Top

Isn't this governed in the GalCiv3AIDefs by

<DangerPathCheckRadius>9</DangerPathCheckRadius>, too?

Regardless: I think another way to do this might be better fleet governors, which can build escorted colonizer fleets, which can take on pirate fleets. And ofc, the AI has to have proper heuristics to use them...

Have you played with the fleet governor and added ships to the colonizer fleet and setting <OnlyEjectWhenFull>true</OnlyEjectWhenFull>?