• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Stellaris Dev Diary #385 - AI Benchmarks

Hi everyone!

The 4.0.13 update released today with the following changes:

Stellaris 4.0.13 Patch​

Improvements​

  • Behemoth Fury is now available to Wilderness Empires.
  • Improved tooltips for the following civics:
    • Functional Architecture/Constructobot
    • Environmentalist
    • Astro-mining Drones
    • Maintenance Protocols
    • Ascensionists
    • Augmentation Bazaars
    • Brand Loyalty
    • Death Cults
    • Dimensional Worship

Balance​

  • Mutagenic Habitability now counts all planet types as ideal for upgrading Gaiaseeders
  • Dramatically increased the draw chance for the Mineral Purification, Global Energy Management and Food Processing technologies
  • Rebalanced the Pleasure Seeker civics to transform Civilians into Hedonists
  • Logistic Drones are now Complex Drones not Menial Drones

Bugfix​

  • Fixed invaded pre-ftls not becoming biotrophies
  • People once more die when they are put in the Lathe
  • Bio-Swarmer missiles can now be used by all biological ships with medium weapon slots (including defensive platforms)
  • Pops that are being pampered will now be forcibly switched to the correct living standard
  • Replacing a district specialisation no longer destroys CyberCreed buildings that should be kept
  • Corrected a tooltip bug where a planet would display itself as a possible migration target.
  • Fixed capitalisation for resources in trade policies
  • Updated assorted modifiers that still referred to Clerks
  • A Trade deficit now causes Job Efficiency and Empire Size issues
  • Fixed the tooltip for the Polymelic trait
  • Armies now protect 200 pops from raiding, not 2
  • Blocked the Federation Code technology for some empires, for example homicidals. To draw the tech, the empire is also required to be in contact with someone they can form a federation with.
  • Blocked the Development focus task Form a Federation for some empires, for example homicidals
  • Added swaps for some empires, for example homicidals, for the Development focus rewards Federation Code, Xeno Diplomacy, and Xeno Relations
  • Updated the Colony view tab mentioned in the hint of the focus task Enact a Planetary Decision to say Management
  • CyberCreed pops with Ritualistic Implants can now colonise planets
  • Fixed Recycled and Luxurious traits not applying to Roboticists
  • Catalytic Processing Civic now lists correct information regarding job swap
  • Cost for repairing orbital rings when you use bioships is now correctly calculated
  • Gale Speed trait gained from Defeat no longer causes errors
  • Fixed scope for LeaderShipSurvivalReason
  • Fixed scope bug for ruler in leader_election_weight
  • Fixed Worker Coop gaining Elite strata jobs in too many places and tidied up the civic tooltip
  • Updated tooltip for Warrior Culture civic
  • Added a pre-list colon to the Feudal Society civic's tooltip
  • The everychanging stone can no longer cause artisans to have negative mineral upkeep
  • Gave the Neural Chorus advanced authority the pop growth speed modifier that had accidentally been assigned to Memory Aggregator
  • The Planetary Supercomputer no longer has an empire cap of 1
  • The Research Institute/Planetary Supercomputer no longer give scientist capacity
  • Added dashes to Traits tooltips and list items
  • Fixed trigger logic for criminal syndicates and federations
  • Fixed Offspring Bioships not being visible in game
  • Fixed Offspring Bioships not being labelled as non-offspring ships in the ship designer
  • The Machine Uprising will no longer spawn 100 machine pops for every 1 missing housing. However the pop-rework seems to have handled 6 million machine pops okay.
  • Stopped removing occupation armies for bombarded and invaded planets on savegame load
  • Repairing ruined buildings in zones is now always possible.

Performance​

  • Flattened pop job modifier node into planet one
  • Made clearing modifiers a fire and forget job

Stability​

  • Fixed a possible OOS when a player leaves the game.
  • Fix CTD when generating a Cosmic Storm mesh.
  • Fixed a random freeze when loading save with stations containing multiple defence platforms.

We expect the 4.0.14 release will be next week (probably on Tuesday), and is expected to include some fixes to a few infinite loops and some select balance changes (like splitting up Enforcers and Telepaths again). It will be a short work week here in Sweden, so it’s likely to be the only update of the week.

As I mentioned last week, with multiplayer stability largely handled, AI is one of our next focuses. Today I want to talk about AI benchmarks, and have a discussion with you about how we should measure “success”.

What Makes a Good AI?​

The AI in Stellaris has always been designed as very reactive, and AI personality has a massive impact on their behavior. Our goal is for our AI empires to feel like actors in the galactic play - acting in a manner consistent with their Origins, Authorities, Civics, and Ethics rather than always picking the “meta” play.

They do still need to put up a bit of a challenge though, especially at higher difficulties.

The first economic goal we make for our AI is “please don’t collapse in an economic death spiral”, and it’s actually far better at that in 4.0 than it was in 3.x. The current AI does NOT meet the second “provide an adequate challenge” goal though.

One of the fundamental tools we have for our AIs are resource targets in their economic plans. They’ll strive to reach those targets, and many of these are set as “scaling” - if they meet the target, they’ll raise the target the next month. This attempts to ensure that they’ll keep thirsting for ever larger research and alloy numbers (or food if they use bioships!) as is appropriate. This is one of the tools we also use to make them exhibit their ethics - Materialists scale their Research targets faster than other empires, so they’ll inherently be more likely to build more Research specializations, while Spiritualists are more likely to have a lot of Unity specializations.

Ironically, improving AI tends to consume any benefits we carved out through performance improvements. The stronger the AI, the more stuff they have - fleets, colonies, and so on.

Benchmarking​

One way to decide whether or not the AI is performing up to expectations is through benchmarking - what kind of fleet power, alloy generation, and research generation should they have by 2230, 2250, 2300, and so on? Around what year should they hit 10k fleet power?

Then there come questions around whether the benchmarks should differ based on personality type. Should it be different if they’re Democratic Crusaders vs. Peaceful Traders? Or does differentiating them there make the friendlier empires too weak?

I’ve got my own set of benchmarks that come from running 3.14 and from the multiplayer community, and in general, I’m okay with Grand Admiral being significantly harder than it was in 3.14. but I’m interested to hear what you all strive for.

How much research and alloy production do you try to have 10 years, 30 years, 100 years, and when the end-game crisis comes calling? (Include your preferred difficulty settings and galaxy sizes as well if you could, as well as if you change any other important settings like tech costs.)

What’s Next?​

We’re going to continue with 4.0 post release support.

Since the next two weeks are both short weeks in Sweden, our next Stellaris Dev Diary will be June 12th. (You’ll be hearing from me in patch notes in the meantime though.)
 
  • 76Like
  • 16
  • 5
Reactions:
I thought the short AI part of the dev diary felt familiar, so digged up this from 2021: https://forum.paradoxplaza.com/foru...s-dev-diary-227-looking-after-the-ai.1493900/

As for the AI personalities, least for me most of them feel very samey. The notable exception being genocidal empires, pacifists and xenophile. I think my post from 2021 applies to the current Stellaris, too, so I'll just quote it (with some typos fixed)

I am not sure how exactly the team is planning to make the AIs more distinct but here are couple thoughts which came to my mind. Let's take a look of couple different kinds of empires and how they could behave to make them different and how it relates to the economy AI.
  • Spiritualist empire might want to spread their faith (ethics) to other empires. Depending on the other ethics they could do so by conquering others or by forming diplomatic ties. Currently there is no distinct way to do that by diplomatic ties though doing diplomacy with a spiritualist empire increases the faction attractiness. In either case the Spiritualist Empire needs a strong economy and military to either conquer the other empires or make itself more attractive for the diplomatic relations.
  • Militarist empire wants to conquer and fight against the rivals. It needs a strong economy to wield a strong military to do that.
  • Pacifist empire wants to be left alone. To avoid getting attacked by the stronger empires it needs a strong economy and military to discourage that (and if not Xenophobe to make itself more attractive for diplomatic treaties).
At this point you probably can see what every empire needs no matter what their ultimate goals or preferences might be. This leads to my thought that trying to make "roleplaying" economy just leads to a stagnant AI and any "roleplaying" aspects should be handled by the other mechanics the game provides. Clerks might be fitting for a Megacorp empire but if the planet needs amenities they are very poor way of getting them and the AI should build that holo-theater.

Obviously civics which modify how the economy works (eg. catalytic processing) should change how the AI attempts to create a strong economy.

Currently the game has surprisingly many ways to make the empires behave differently but unfortunately AI doesn't really use them. Ascension perks are probably the most obvious example. For example when it comes to Ascension Perks AI (from what I have observed) tends to pick one soon as they can which leads them to picking up random perks which don't really change how the empire behaves.

Instead of picking randomly the AI empires should have some long term plans. For example:

  • Remnants origin decides it wants to restore the relic homeworld and that they don't need Arcology perk.
  • Another empire discovers a relic world and decides the same.
  • Third empire empire decides it can turn a large mineral and energy poor planet into a city planet and saves a slot for the Arcology perk.
  • Spiritualist empire decides it wants to pick Psionic ascension so it knows to save two slots for them until it has researched the required tech.
  • Xenophile empire wants to turn all planets into paradises so it saves one slot for the World-Shaper.
  • Empire discoveres a black hole system and decides it wants to build a matter decompressor there. It saves required slots for Galactic Wonders and maybe Master-Builders.
  • Each of these would require the AI also to stockpile required resources to they can actually act on the plans.
AI behavior in wars is also pretty similar no matter if you are fighting a genocidal or fanatic pacifist empire so that leaves lot of room to make the empires act differently. For example a pacifist empire in a defensive war might prefer to stay on the defensive and only attack to conquer or occupy nearby bottlenecks, enemy systems near colonized planets to give extra warning time if a fleet approaches etc. and would otherwise prefer to stay on defensive unless outnumbering the enemy. Meanwhile a militarist empire might be more aggressive, attempting to seize bottlenecks deeper in the enemy territory or trying to attack enemy colonies more aggressively.

Short summary: no matter what kind of behavior the AI empires have they all need a strong economy and there is only so many good ways to achieve that. Trying to roleplay the AI economy is likely to create complicated AI rules which makes the actual economy inefficient and even if the economy is different it is not really visible to the player. Poor economy created by such also makes it harder for the AI to act differently in ways which are actually visible to the player.
 
  • 15Like
  • 4
  • 2
Reactions:
It is far too early to say imo...
The game just had multiple layers of big changes and some "direct conflict" mechanics like Bioships or Melee weapons really skew the results.

The facts Admiral/Grand afmiral Ais hardly care about their economy at all because their modifier guarantee theyll always drown in resources is also disappointing (we usually refere to an Ais power past this point not by its eco, but by its max naval capacity and amount of shipyards).

I'd be happy to help clarify this entire thing but all senses of "References" were thrown out the window with 4.0, to the point some "tryhard" mp communities hardly want to play.
 
  • 3
  • 2
Reactions:
The facts Admiral/Grand afmiral Ais hardly care about their economy at all because their modifier guarantee theyll always drown in resources is also disappointing (we usually refere to an Aos power past this point not by its eco, but by its max naval capacity and amount of shipyards).

If the Grand Admiral AI is drowning in resources they should build more ships and research (if possible) because those are the true economy sinks in Stellaris. AI is probably too conservative when going over the fleet cap.
 
  • 1
Reactions:
Is there a reason Pleasure Seeker is still mutually exclusive with Warrior Culture and Slaver Guilds?
The other Civics I can see, as they replace living standards, but for those two I really don't see a mechanical reason, especially now with the Pleasure Seeker rework, which I like a lot on first impression btw. I always found it weird that Pleasure Seekers required less entertainers, rather than more.
 
  • 5Like
Reactions:
If the Grand Admiral AI is drowning in resources they should build more ships and research (if possible) because those are the true economy sinks in Stellaris. AI is probably too conservative when going over the fleet cap.
If Ai minmaxed it ressources, Grand admiral would probably beat FEs in the 2250

And that was in pre-4.0.

It's not healthy for the game
 
  • 1
  • 1
Reactions:
I don't have any numbers about fleet sizes ect but I played on Grand Admiral mid game scaling when I played with my brothers (clustered start) and late game when distributed. Endgame year start was 2325 for us. And then 3.14 was challenging enough but I have to say I loved "Starnet and StarTech AI" in the past they where even more challenging! More aggressive and played more like a player would.

One of the things that would be important is that the Ai would try to counter ship compositions for example if someone goes missile destroyers and cruisers thay should start installing a lot of point Def on new ships they build. Or if someone goes disruptor go for less shields more hull.

I think Starnet and tech also used different ship compositions. But especially the way they tech / expand was quit different to the normal Ai. But 3.x came a long way AI wise. And back then the Starnet and StarTech Ai where not up to date anymore so I moved to the out of the box Ai. But have a look at wat that did back then maybe some of the stuff is still very usable in 4.0 to make it more difficult and act better vs players.
 
  • 1Like
Reactions:
If Ai minmaxed it ressources, Grand admiral would probably beat FEs in the 2250

And that was in pre-4.0.

It's not healthy for the game

I'd be fine with this for the hardest difficulties: they are supposed to be a challenge. If anything, I'd boost Fallen Empire difficulty more based on the game difficulty to keep the timing of the game closer to lower difficulties.
 
  • 12
  • 1Like
Reactions:
The main problem with AI is that AI states cannot understand how to specialize planets. They must clearly be able to choose the largest world and make the largest heavy foundry out of it. They must also develop planets. AI empires very often have worlds with 2 buildings, despite the fact that these worlds have existed for 100 years. And these buildings are some kind of gas production factory, and a random scientific laboratory. They must clearly specialize worlds on:
Scientific, light industry, heavy industry, unity, trade, mineral, food, rare resource production, (rarely) border combat worlds.
Also, I kindly ask you not to roll back psionics to the values in 3.14. Now it is very very strong and it should not be like this, but if you simply replace telepaths back with police, it will simply roll back to the values of 3.14, where psionics (even with a unique place in the council) gave very small buffs to the planet and any ascension was better.
Also something bad is happening with virtuality, because +1% production buff from workers is missing.
I also really ask from the very release of 4.0 to fix the bug with technophants, who are significantly weaker than haruspex, on which various buffs work.
Thank you for your work!)
 
  • 9Like
  • 2
Reactions:
Thank you for that honest update concerning the AI of the game. However some statements really bother me.

1. The fact that you know that the AI is no challenge in the moment and was better in 3.14 draws me to the conclusion that it was never in focus during the development of the dlc . If this is so I am a little puzzled about your priorities since stellaris is mostly played in SP…

2. taken the fact that the AI was better in 3.14 and my system performance in 4.0.X is actually worse and taking your statement that an improvement of the AI in 4.0.X would lead to performance losses again draws me to the conclusion that the new pop system has only a minor impact on the game performance . Worst case would be that the performance improvements you saw in your tests simply came from the fact that the AI cannot manage the new system …

3. asking the community how many ressources an empire should have at a certain time on a certain difficulty draws me to the conclusion that your internal QA mostly relies on console commands to trigger certain gameplay situations and not on actual playing a full game.

Do not get me wrong I love you guys for a game I always enjoyed . But this time I feel more than ever like a beta tester and I fear that we run in a cities skylines 2 or prison architect 2 situation here . A project to big to really fix in a reasonable time…
Yes, it is clear to everyone that the developers lied to our faces, claiming that there is no need to postpone the release of 4.0 and that everything will be fine. But in the end, we got exactly what should have been released, look at the beta 4.0.

A million bugs. Balance that no one looked at. AI that was not even remembered. And so on. The "Efficient" managers of Paradox simply decided that they could get away with releasing an unfinished product. In principle, they were right. Users ate it up.

Although, given the current state of the game and assuming how much more time it will take to finish the balance, AI, bugs, etc., then beta 4.0 should have remained beta for at least another half year.

And now they have a short weekend, then holidays, etc., etc. And we are forced to either sit on the old version 3.14 or beta test this raw and unfinished 4.0.
 
  • 17
  • 17
  • 4Like
Reactions:
Regarding the improved tooltips: It would be nice to be able to hover over metioned buildings like the Corporate Embassy in Brand Loyalty and mentioned Jobs like the Priests and Death Priests in Death Cults, not just buildings added through a Civic.
 
  • 3
Reactions:
The ai should be competitive and viable with the same bonuses as the player has. I know, the player can min max, play meta etc. So besides nerfing broken combos there should be room for giving the ai some bonus. But +50-100% resource, research etc not only shows how incompetent the ai is if it still can't dominate, but also break the game.. at like trading, vasalisation, the market. And ppl wonder if some ai drowns in resources why doesn't it use it.

I too noticed underdeveloped ai planets, neglected expansion and stuff. Maybe the ai should have some extra help in colony management: like following one of a few dozen predefined colony management plan with a possibility to time to time convert one to an other cheaply if necessary. The new colony management system is more complicated than the previous and the with the right build the production level is considerably higher-at least in the hand of a player or someone who knows what's doing.
 
  • 5Like
  • 1
Reactions:
If the AI works the way you described, it's not a surprise that their planets look so wonky. If they're just trying to hit a scaling target on e.g., food with current tech then building ten random farming districts on a forge world makes sense. But that kind of highlights the problem: it's a very short-termist approach that locks the AI out of having well-functioning planets by the mid game.

Rather than trying to hit targets for resources, I would strongly recommend that AI build in a rule-based way towards pre-defined templates according to their personality, planet size / class, etc. As techs come online they can switch out buildings for more appropriate choices, and in the interim they can use the market ± difficulty bonuses to cover over temporary gaps in production.

Think about it like with Fallen Empires: if you gave an AI empire all FE techs they would never in a million years build an FE planet. You need a human hand or they will look screwy and not function well.
 
  • 13
  • 4Like
  • 1
Reactions:
I'd be fine with this for the hardest difficulties: they are supposed to be a challenge. If anything, I'd boost Fallen Empire difficulty more based on the game difficulty to keep the timing of the game closer to lower difficulties.
Played that before, it's not wishable. You just end up abusing Ai behaviors. It'll teach how to play genocidals by dodging fleet and aiming for the worlds well, but it's kind of a chore (especially with the lags back then). Starnet Ai really illustrates that.

We need smart ai, not 10+ year0 crisis.
 
  • 3
  • 2Like
  • 2
Reactions:
By 2070, playing on scaling late game grand admiral, I'm ahead of every AI in tech in every game I've played since 4.0. Most are pathetic. a couple might be inferior. This was true even of my Wilderness run, where they are missing most of the synergy buildings. I would gently suggest that the AI is not optimizing their research enough, or possibly, at all.

I note also that I haven't been min-maxing research myself, except on any relic worlds I stumble across, so they're sucking wind against a non-optimizing player.
 
  • 1
Reactions:
I noticed the AI does not appear to want to use automation at all. The AI has low pops to economy ratios(based on GC numbers with the bonuses removed). Meanwhile, players can reach 5-8x pops to economy ratio depending on the build(with specialized planets ofc). Materialist empires should be even more willing to use automation as it fits the ethic.
 
  • 1Like
  • 1
Reactions:
If AI is making 23 alloys in year 30 we have a problem.

I recall seeing a suggestion somewhere that base naval capacity should be slightly globally nerfed everywhere so there are a few less fleets all around the galaxy, which would lead to better performance too.
 
  • 5
  • 1Like
Reactions:
Then there come questions around whether the benchmarks should differ based on personality type. Should it be different if they’re Democratic Crusaders vs. Peaceful Traders? Or does differentiating them there make the friendlier empires too weak?

I want focus on this because it's rather silly.
Since the only way to change an empire is via war in stellaris, everyone should be focused on that regardless of their ethos. The only way to play stellaris is to have the biggest the stick since dioplomatic, covert and economic avenues of influence have been ignored for many years the game has existed. Therefore, the only thing that should matter to AI is alloy to ship production and research.
 
  • 11
  • 4
  • 2Like
Reactions:
  • Wanting to become a vassal even if they have powerful defensive pacts, guaranteed independence, allies in a federation etc. This one is particularly egregious as it’s poor to have an ally you’ve been friends with for decades randomly offer to give up their sovereignty when they don’t need to. And it interacts very badly with federations, since the AI will often refuse to join a federation but will happily become a vassal even if it pulls them into a fed with no say. IMO the AI should, with some exceptions for personality, consider vassalisation as their last diplomatic option when there are powerful threats.

Please consider these, particularly how the AI calculates vassal willingness in the presence of other factors (treaties, federations etc). Even a quick fix of the AI using the same logic of "won't join a federation with X" when the requesting overlord is in a federation with X would be good (without taking into account any federation policies since they could change).

The AI's thirst for vassalage is wild.

In my latest game I had a defensive pact with my neighbour and was trying to get into a trade league with them, we fought and handily won a war against their northern neighbour and then as soon as they were at peace they vassalised themselves to another empire to my south. Like dudes you just won a war, you don't need a protector.
 
  • 18
  • 4Haha
  • 1Like
Reactions:
the triggered_planet_pop_group_modifier_for_all and triggered_planet_pop_group_modifier_for_species can't use "mult = xxx".Is it a BUG or?
In the deposit, triggered_planet_pop_group_modifier_for_all and triggered_planet_pop_group_modifier_for_species are not work.
 
Allow us to "guide" vassals development through more than just the contract. Let us mark planets for specialization that will encourage the AI to build that planet to a specific standard.

Also, allow AI to tear down and replace buildings, districts, zones, depending on their needs. And the AI NEED to learn how to specialize worlds, and know that such worlds are a priority to defend during war so players cant just snipe them by scooby-dooing the AI doomstack.
 
  • 5
  • 2Like
  • 1
Reactions: