Stellaris

Stellaris

111 ratings
Proactive and Mobilised AI
5
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
260.452 KB
11 Sep, 2020 @ 12:00pm
15 Sep, 2020 @ 11:10pm
5 Change Notes ( view )

Subscribe to download
Proactive and Mobilised AI

Description
Compatibility Notes

This mod changes only "common\defines\00_defines.txt"

Based on this, please note the following:
  • Glavius Ultimate AI: Currently, the Glavius Ultimate AI mod includes an unmodified "00_defines.txt" file. This will unfortunately break any mods that uses their own modified defines file (such as this mod) unless Glavius Ultimate AI is loaded before your other mods.

Overview

Have you ever seen insane border gore as the AI does a merry tour of your empire?

Have you ever been abandoned by your AI allies who happily sit in their space doing nothing?
Have you ever backdoored the AI and taken over their planets while they happily ignored your invasion fleet?

These behaviours are due to in-game limits that fundamentally the AI "Selfish". That is, the AI is designed to aggressively conquer enemy systems as a way of accomplishing its wargoals. The problem is that this AI behaviour ignores that the enemy often has wargoals on the AI.

For example, in a defensive war, the defender's allied AI is only interested in taking its claims on the attacker. Unfortunately, this causes two problems:
  • Defenders and attackers enter a race to see who can take their claimed systems first. If they are different systems, the war stalemates until war exhaustion force ends the war.
  • Since the defender's allied AI is only interested in its claims, it does not care about defending its ally's systems. The defender is often stuck on its own. If the claimed systems are taken, both defender and its ally loses the war.
These behaviours will often create an AI that wins battles, but loses the wars. It also means that the attackers win most wars even against theoretically stronger opponents.

Therefore, this mod implements a few changes...

AI's Defends against Enemy Wargoals

The AI now prioritises defending its systems to prevent losing the war due to war goals. If the AI is merely an ally of a defender, it prioritises defending the allies systems.

(The screenshots shows the Vag-Oross actively trying to retake its conquered systems. In Vanilla, the Vag-Oross fleet would just ignore everything to continue attacking the enemy empires.)


AI Attacks Along Neighbouring Systems

The AI priotises attacks along its existing border. This has three effects:
  • Border gore should be reduced.
  • Since claims tend to be on border systems, the AI will focus more on its wargoal rather than grand tours of the defending empire.
  • Combined with the AI defense prioritisations, this creates exciting battlelines where attackers and defenders fight back and forth.


Decrease Fleet Power Ratio For AI Responses

The AI is now more willing to launch attacks during a war.

This change encourages smaller members of a AI Federation or coalition to attack the economy and infrastructure of larger enemies. This also encourages the AI to actively try and take wargoals back even if they are outnumbered to prevent a wargoal victory from being forced on them.

(The screenshot above shows this with a 500 power fleet attacking a 1.3K station until it was reinforced with another 500 power fleet. In Vanilla, the 500 power fleet would have just turtled.)

Avoid Enemy Strongpoints

Thank you to Ajey for some interesting observations.

Assuming all other situations are equal, the AI will slightly favour attacking systems without upgraded stations.

For Other Modders: The Long... The Dull... The Speculatively Tested

The assumption of this mod is that the 2.7.2 AI is fundamentally weight driven. That is, at any moment, the AI considers as many choices as possible. It calculates their weights based on hard coded values and certain configurable values. The decision with the highest weight is the decision chosen by the AI. Hence, the Military AI of the game will always choose the highest weighted military decision.

Based on testing and examination of the 2.7.2 configurations, it appears that the game uses two types of weights:
  • Base Weight, or the importance of a decision assuming no other outside influences
  • Weight Multiplier, or a factor that prioritises certain decisions over others
I came to this conclusion as some weights are too small to have any meaningful influence on the AI's decision unless they were a multiplier of other weights.

Further to the above, it appears that the weights are broken down as follows:
Name
Type
Screenshot Shorthand
WAR_OCCUPIED_BORDER_PRIO
Base
Attack - Frontline Borders
WAR_OWN_BORDER_PRIO
Base
Attack - Own Borders
WAR_ALLY_BORDER_PRIO
Base
Attack - Ally Borders
WAR_NO_BORDER_PRIO
Base
Attack - Deep Enemy Space
WAR_DEFENSE_OWN_PRIO
Base
Defend - Own Borders
WAR_DEFENSE_CONTROLLED_PRIO
Base
Defend - Frontline Borders
WAR_DEFENSE_ALLY_PRIO
Base
Defend - Ally Borders
WAR_NEUTRAL_SPACE_PRIO
Base
Attack - Neutral Space
WAR_ATTACK_CLAIM_PRIO
Multiplier
Claimed
WAR_DEFENSE_CLAIM_PRIO
Multiplier
Conquered
WAR_DEFENSE_OWN_PLANET_PRIO
Multiplier
Controlled
WAR_DEFENSE_OWN_PLANET_ENEMY_CONTROL_PRIO
Multiplier
Invaded
WAR_ATTACK_PLANET_PRIO
Multiplier (Special?)
Enemy Planet
WAR_ATTACK_PLANET_CONTROLLED_SYSTEM_PRIO
Multiplier (Special?)
Conquered System
WAR_ATTACK_STARBASE_PRIO
Multiplier (Special?)
Enemy Strongpoint
WAR_DEFEND_STARBASE_PRIO
Multiplier (Special?)
Own Strongpoint
WAR_ATTACK_MILITARY_FLEET_PRIO
Multiplier (Special?)
Enemy Fleet
WAR_ATTACK_JUMP_DRIVE_FLEET_PRIO
Multiplier (Special?)
Enemy Vulnerable Fleet

I believe that certain multiplier and base weight combinations are thrown out automatically by the AI. For example, the "Attack - Own Borders" decision can never be combined with the "Controlled" multiplier. Based on this, I have attached two new screenshots. One shows the default decision weights of the game AI. The second is the modded decision weights. Therefore, from my observations, the calculated values appear to line up with the in-game behaviour.

In addition, thanks to Ajey's for pointing out some additional observed behaviours, it appears that there is a subcategory of multipliers that either further multiplies or increases a decision weight. These "Special Multipliers" appear to weight systems with special characteristics (such as enemy fleets or upgrade space stations).
91 Comments
I Darkstar X 22 Oct, 2023 @ 11:12am 
Can anyone vouch for this mod in 2023?
J6 29 Nov, 2021 @ 6:06pm 
@god eftermiddag Load it up and find out, big brain
SEZER 28 Oct, 2021 @ 9:30am 
good
Skull One (Shrout) 25 Aug, 2021 @ 1:32pm 
Im still using it and it seems to work
Illisis 21 Apr, 2021 @ 7:53am 
keen for an update, even if it's just an update to say its up to date lol
deamax 16 Apr, 2021 @ 7:38pm 
Does this work with 3.0?
Xeonzs 24 Feb, 2021 @ 11:02am 
As someone who is using few mods (only 11, this being one of them) and this being the only one that affects AI behaviour, I'm not seeing any issues, the khan mid-game event worked fine, the crisis worked fine and indeed the AI empires tried to defend their territory and defensive allies.
lumiscent 20 Nov, 2020 @ 6:03pm 
2.8.1 compitable?
JenkoRun 16 Nov, 2020 @ 12:29am 
So, is an update required?
Dellar 14 Nov, 2020 @ 1:46pm 
so... does this mod work just fine?