Proactive and Mobilised AI
This mod changes only "commondefines 0_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.
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…
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.)
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.
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.)
Thank you to Ajey for some interesting observations.
Assuming all other situations are equal, the AI will slightly favour attacking systems without upgraded stations.
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:
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).
Revisions:
Old revisions of this mod are available below. Click the link to download.