Stellaris

Stellaris

~ StarNet AI
Thoughts on AI diplomatic behavior and rivalry
Sharing some feedback on my observations of the AI in my games @salvor

After playing a few games with Starnet (no friendship), I find it is still too easy to befriend and thus defang your neighbours. The reason is because you can declare rivalry too easily with no consequences. Since the AI will usually max out declaring 3 rivals, you can easily declare mutual rivals that don't border you, thus they will never attack you; then your neighbour will like you, sign a pact and build trust, and by the time the environment has changed you'll have enough trust to stay at peace. Thus you have all the time to tech rush and econ boom, leaving them in the dust. Or take your time conquering them one at a time.

The only cases where this doesn't work is the first AI you meet, because you can't abuse mutual rivals yet, and they always hate you since you're the only target. That is usually not a problem because my strategy is to conquer the first empire anyway. Or if there is a genocidal or empire with strongly mismatched ethics, which is expected.

I think the core problem is the Rivals system, it's basically free influence with no consequence. I think the best way to address this is to limit Rivalry to only your neighbours, or only within a certain distance, so that there is risk of being attacked.

This brings to my second observation: I notice the AI empires are frequently getting into 2-front wars which devastate them, and then a different empire get into the same situation resulting in stalemate situations where no one is dominating. Even Advanced Starts AIs were often stalemated because of this. Ultimately this hurts all of them and made it easier for me as the player, because none of them could get big and snowball.

Since the AI is not declaring war on multiple empires at the same time, I think this happens because the AI is a poor judge on the chance of a neighbour declaring war on them. My thoughts on this:

1) Currently the AI by default hates all neighbours, and only manage to build alliances due to mutual rivals or mutual threats. I think it may work better if it behaves more like a human player, which is to focus on 1 neighbour at a time, and try to maintain good enough relations with the rest until it's their turn. This reduces the chance of them getting into 2-front wars that they can't win. I'm not sure how you can achieve this thru modding, but perhaps it can be manipulated using opinion modifiers and how they declare rivals.

2) How the AI should pick its targets. If it can judge the likelihood of another neighbour declaring war at them, it could adjusts its decision. Currently it can judge whether to attack based on the strength of their allies, perhaps it should also consider your own enemies that are not their allies.

3) Perhaps the Mutual Threat or similar concept should not be purely based on what other empires have conquered. Is it possible for it to judge whether another empire is a threat via the relative power comparison? By mid-game, if another empire is speeding ahead and have Superior or Overwhelming economy or tech (which is usually the Player), it would be a better idea for AI empires to start building alliances with other Equivalent power empires to counter them. Inferior and Pathetic neighbours it should conquer, but the likelihood of conquering similar strength neighbours for the AI is usually low unless they have allies, so they should find one.

What do you think?
< >
Showing 1-6 of 6 comments
salvor  [developer] 20 May, 2021 @ 7:14pm 
This post is exactly why I was very hoping that with diplomatic DLC (Federations DLC), the diplomacy system would be more moddable. It turned out to not be the case.

I can't do much unfortunately, all these suggestions are perfectly reasonable, trust me, if I could I would write a much more exhaustive diplomatic decisionmaking than the default one.

Unfortunately most AI decisions are a black box with just a few sliders that can be changed in the defines file.

Every decision is done exclusively based on 1)opinion 2)rival system.

This leaves no room for subtlety, I am afraid. I have 0 control over what wars are declared, I have 0 control over who gets rivalled.

I guess I can be convinced to add more opinion modifiers that will cause AI to hate the sole leader of the galaxy and love each other in the case of existance of one, but it may be too much railroading.
Hmm if there isn't a way to influence or limit who can be declared a rival, or have situation based opinion modifiers, then there's little you can do; that was what I was afraid of.

In the confines of what little that could be done:

1) How about restrict the number of Rivals to 1, and increase the amount of influence you get from it to compensate. That will make less neighbours have very bad opinion at the same time to each AI, reducing the chance of 2-front wars. And also make it harder for a human player to abuse it. It won't fix the problem entirely, but might alleviate it. Probably also best to delay being able to declare rivals until you meet at least 2 empires or after a certain amount of time, otherwise the first empire an AI meets will always be their rival. This does change a game function rather than pure AI changes though.

2) I agree it does sound like railroading if the AI just hates the leader automatically. But if you could find out who is the leader, would you be able to determine the ranking of empires by power, and the power differential? Perhaps something could be done there, depends how much information you could get to use as conditions.

3) While I was playing, I observed Mutual Threat and Threat seems to decay quite quickly. I wonder if having it last longer may help the weaker AIs ally more. Perhaps this could be tweaked.

I think whatever that could be done will have to be more indirect, which means they have to be tested in actual games to see if they have the intended effect. Thanks for sharing your insight on what is possible.
Also, in previous versions of Stellaris Rivalry used to be neighbour-only, and that was changed after 2.0.2 (poorly thought-out change in hindsight). And there was a mod to remove that restriction. Does that functionality still exist? Perhaps that could be reinstated. Needs to be tested though, because I did notice AIs are sometimes reluctant to build outposts that directly border others.
My thoughts are that the AI is still way too eager to fight. You know something is ♥♥♥♥♥♥ up when even the pacifists are constantly declaring war.
I'm generally fine with the AI's aggressiveness, as long as it benefits them. The problem is less so with aggression, and more so in the AI making poor decisions due to it, such as getting into 2-front wars constantly, which I've seen it causing the demise of even the stronger empires.

There is a problem with the pacifists though, I've seen 2 pacifist empires rivalling and attacking each other, whereas it's much more to their benefit to cooperate and ally. Since they can't wage unrestricted wars to conquer, and liberation wars are of limited benefit due to them sharing the pacifist ethic already. And the AIs aren't smart enough to use liberation to divide up their neighbours.

And fanatic pacifists also often have poor opinion of other pacifists as well, even though they can't declare any wars. They should have their opinion modifiers tweaked, and probably should use a different economy profile.
Replying about my earlier ideas, I've tried making a custom mod to tweak opinion modifiers to influence AI decisions, and to change rivalling, and it looks like it is possible to do it, although the triggers can get very complicated.

I've tried out a game allowing only 1 rival at a time for 1 influence gain, and I think it makes for a better game. It makes the decision on who to rival much more meaningful, and it's much harder to abuse rivalling to manipulate AIs to like you.

I've tried out a few opinion modifiers as well, for example an opinion buff for AIs for specific neighbours to make potential allies if they have a strong enemy threat close by. I'm still tweaking it and testing it, but it has a lot of potential. It works better than Mutual Threat, which comes too late after the AIs already have a lot of systems conquered, and is often useless because other AIs can't join wars, so defense pacts and independence guarantees does nothing. I'll report back if anyone is interested, or if @salvor has any interest in integrating such changes into Starnet.
< >
Showing 1-6 of 6 comments
Per page: 1530 50