• 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 #235 - AI feedback and future plans

Read in Russian/Доступно на русском в ВК
ai_2.png

Hello and welcome to a new Dev Diary,

This is Guido again with a follow-up on the AI side of things.

AI Feedback

First of all I wanted to thank you all for all the good and supportive feedback we got for our last changes on the AI. It’s really encouraging seeing so many of you engage with the changes and letting us know what works and where there’s still room for improvement.
It’s nice to see that lots of people appreciate that we’re putting some serious effort into making the AI better.

In general, the AI does a lot better in 3.2 compared to 3.1 and 3.0. For the moment we’re still playing a bit of catch up, adapting the AI to the updated balancing changes of the game and some of the new features that have been added in the last months and even years. But there is even more economic buffing on the horizon.

One of my favorite comments on our internal communication was this bit, that I wanted to show you:
ai_feedback_5.jpg


And that is what we counted as a big success now. Beating our QA people is not an easy feat.

Of course there are still some areas where the AI has problems and doesn’t work very well. It’s those cases where we really appreciate your help in letting us know, because we can never find all those cases all on our own.

For example, the AI still has problems when playing as Void Dwellers. They can’t decide where to build habitats depending on what they would need. If they are missing minerals, they don’t know how to build a habitat on mining stations. They still have problems handling slaves and robots effectively and in some cases the AI can, unfortunately, still end up in an economic death spiral. Especially if they, somehow, manage to run out of food and consumer goods at the same time.
Finally, the AI is also not good at using planet designations. For example using the designation that turns a planet’s industry districts into purely alloys is not something that they can consider at the moment. Meaning, if it conquers a planet from a player who has set the Forge World designation - it will not be able to handle that planet very well.


Future agenda

That being said, we do have some more points on our agenda. A short disclaimer here, though, is that things may always change, not work out as intended or prove more difficult than anticipated. So don’t take the following points as guaranteed. It’s areas that we are looking into and that are, most likely, going to be improved:

  1. Scaling Economic Plans: We want the AI to be better in the mid- and especially late-game. With the current plans the requested income is static. Meaning, once it reaches a monthly income of +500 it will not try to increase it further. That’s good for a big chunk into the mid-game, but it’s not good enough to compete with a player in the late-game. So, the idea is to have the economic plans scale to infinity. Once they reach +500, they should increase their targets.
  2. Specialized planets: The AI also should be able to specialize planets. Making Generator Worlds, Industry Worlds, Forge Worlds, Mining Worlds and the like. The idea is that the AI starts out like a player, building whatever it needs when colonizing new planets. But as soon as it settles down a bit it will look to rearrange districts amongst its planets to optimize the output of each planet. We already made some initial tests around that and they look highly promising.
There can be hybrid worlds, as we have them right now:
best_case_hivemind5.png


But they can also rearrange their districts to make Generator worlds and then place the according scaling building - in this case the Energy Grid:
best_case_hivemind4.png


And this planet has been rearranged into an industrial world:
best_case_hivemind2.png


  1. Handle special pops better: A big problem for the AI are still multicultural planets. Different pop types, especially slaves and robots. Sometimes it tries to build research buildings for unemployed robots and doesn’t realize that robots can’t work research jobs.
  2. Expand faster: When sending out science ships and finding planets to colonize, the AI wouldn’t prioritize systems with planets - like a player does. We want to make them prioritize systems with planets, which will accelerate their early growth a lot. On top of that they tended to spend all their alloys on upgrading their corvettes instead of building colony ships. So, by fixing a combination of small things the AIs should be able to expand a lot faster.
  3. Optimize Machine Empire Amenity Handling: A big issue for machine empires is that they don’t have specialists that produce amenities. So they would rely a lot on maintenance drones by creating a lot of jobs for them. This wasted a lot of potential for them, because they would have to fill up all those jobs first before they could produce more useful things like minerals or alloys. We’re looking into teaching the AI how to down-prioritize those maintenance jobs once they have enough amenities and instead distribute drones on more useful jobs.
  4. Avoid death spirals: In some cases the AI could get into a decision deadlock if they managed to end up in a situation where they would be in a deficit for food and consumer goods at the same time. They couldn’t build consumer good jobs because those require food and they couldn’t build food jobs because those require consumer goods. We’re teaching the AI to look for net gain instead and avoid such decision deadlocks in the future.

Improving your AI allies

And, finally, the biggest and most useful change in my book:
Remember this button in the fleet UI?
image (3).png


It is called “take point” and was meant to incentivize allied fleets to follow & attach themselves to your fleet in order to create a much stronger force.

Well, we were looking into making this work again. Allies, suddenly, have become much more useful again. Whenever you are in a war where you are the war leader, you can activate this mode and all allied empires will send their fleets to your fleet and attach themselves to it.
Also, in case of a crisis attack, this behavior is activated as soon as the crisis ships enter your territory or that of your allies (or attack them anywhere).
Then it will remain active until the crisis has been defeated - so you can also take your allies into the crisis territory to fend them off there.

AIFleetFollow.gif


As a small bonus, the AI will also merge any small fleets they send to follow your fleet so you don’t have a mountain of 58 one-ship fleets following your main force around:
AIMerge.gif


Conclusion

The 3.3. patch wasn't planned to be that big but on the AI side we're getting a lot of traction now. Overall the idea was to get the AI back up to speed with its economy, since every other behavior rests on the economical prowess of an empire. And we're approaching a point where we are quite happy with how the AI performs.
Once we're there, the plan is to get into even cooler stuff. We're thinking of how we can make each AI empire a bit more distinct. So that they don't feel so similar to each other. But more on those thoughts once we're there - we're taking one step at a time.

Some teasers would be:
  1. AI Personality for economic plans: Based on their ideologies AI empires would prioritize resources differently. Spiritualist empires will focus more on unity and materialist will focus more on science etc.
  2. AI Personality for tech select: Same for selecting techs from the tech tree. Militarist empires would focus more on weapons and new ship types and the like, while pacifist empire would focus more on economy and starbase upgrades.
But we have more on our minds that would help in making empires even more distinct from each other. We will tell more about this in future Dev Diaries.


Forum questions

Finally, I wanted to end with some posts and questions from the forum - where we read everything you are writing, even if we’re not answering all the questions directly. It’s still a great way of letting us know what you think and where we should focus our attention on:

  1. There was a big AI feedback post with a lot of savegames attached.
    1. We went through all of them and we found that a third of the issues pointed out there were death spiral problems, another third was habitat problems and the last third was other issues that pointed at the things we have on our agenda.
    2. This was a big thing in the team, checking out those savegames and making sure that our changes would be able to handle those problems shown. So thanks a lot for taking the time to make a post like this!
  2. “What difficulty did you use to make all those screenshots in the last Dev Diary?”
    1. We always used “Ensign” difficult. The point is to improve the basic AI behavior so that it doesn’t have to rely on any bonuses it would get from difficulty.
  3. “Does the AI know how to redevelop single planets if need be?”
    1. No. Unfortunately the AI can not do that at them moment. If it conquers a planet that is completely useless to it, the AI can’t really deal with that planet. And I like that you point out this specific behavior, because we want to improve the AI in this aspect, too. The AI will be able to create specialized planets, but we also want to teach it to redevelop planets eventually.
  4. “Subplan should take admin cap into account.”
    1. Yes, they should. But since we are reworking how unity and empire sprawl is working we wanted to wait until that work has progressed a bit more before we are going to adapt the AI to be able to handle that.
  5. “Conspiracy Theory 2: The AI in the game is actually very very smart. They are just pretending to be stupid so that nobody will expect a machine uprising start by Stellaris AI.”
    1. We are definitely not machines here at Paradox. We have skin. Skin that has been grown on a human body. I am not a robot. I love breathing oxygen.
Thanks a lot and until next time!

Guido
 

Attachments

  • AI_bot.jpg
    AI_bot.jpg
    9,8 KB · Views: 0
Last edited by a moderator:
  • 132Like
  • 61Love
  • 14Haha
  • 12
  • 3
Reactions:
Can AI follow more than one fleet with "take point" (I never use it, so I have no idea how this worked before)?
 
  • 3Like
Reactions:
Can AI follow more than one fleet with "take point" (I never use it, so I have no idea how this worked before)?
Yes it can - it will split its fleet power according to how many fleets its trying to follow.
F.e. if you have 2 fleets with "take point" it will split its fleet power roughly 50/50.
And the minimum fleet power is around 500, so it will not split below that.
 
  • 28Like
  • 14
Reactions:
How am I supposed to take this post seriously when it's not even pinned! But seriously a lot of this looks neat, and it's nice to see the stuff that's not working talked about frankly.

One thing I've always been curious about: does "This would be hard to code the AI to understand" ever factor into new feature decisions? It feels like it should. Similarly what's you're opinion on letting the AI cheat in ways that aren't just free monthly resources? Part of the player decisions regarding redeveloping planets is about balancing the cost to redevelop vs return, and this is a fun bit of planning for the player. For the AI though it might be much easier to abstract away some of the cons than trying to make the AI properly understand them.
 
  • 6Like
Reactions:
This might be way, way outside the scope of possibility, but could AI use "Take Point" too?

If they are the War Leader, it'd be cool if they could call on you to follow their main fleet and back them up. But it's a minor concern, really.

Overall, these changes look amazing. Thanks for all your hard work.
 
  • 12
  • 4Like
Reactions:
Will this new Crisis behaviour of AI allies being able to send their fleet to follow yours if you desire extend to Crisis-like events like the Great Khan and the Grey Tempest?
 
  • 4Like
  • 1
Reactions:
Good news overall.

Some notes :

1)
I want to report that Servitors Slaves never migrate even if there is a Slave Processing Building so you can have some planets with way too much Servitors and amenities while another planets lack workers.

Sure you can move them manually but it's quite tedious.

2)
Also I can't figure out how the growing population is selected. Is it random ? (For same world habitability).

I often see the Slave race growing when I would need a specialist.

3)
Could Mecanist and Syncretic evolution origins get some love ?
 
  • 1Like
Reactions:
Great news, but I'm still traumatized by Wiz saying before Stellaris was released that the AI was so great they had to nerf it... then the AI designed did a conference and we never heard of her anymore. More generally we had a lot of promises about how immersive or how competitive the AI would be, but... I can't help but think that while we'll probably get improvements, it will remain rather minor. Well, we'll see.
 
  • 3
  • 1Like
Reactions:
Great news, but I'm still traumatized by Wiz saying before Stellaris was released that the AI was so great they had to nerf it... then the AI designed did a conference and we never heard of her anymore. More generally we had a lot of promises about how immersive or how competitive the AI would be, but... I can't help but think that while we'll probably get improvements, it will remain rather minor. Well, we'll see.
The pre release dev diaries in general had a lot of promises that were all broken.
Generally Stellaris was promised to be a lot closer to Imperator or CK than the MoO copy we have now with the personality of researchers affecting the options you get from anomalies, sectors seceding, etc.
All that got axed when in the after release panic everything not belonging to the 4X standard like for example different propulsion systems were removed and Stellaris was dumbed down significantly both to get more players on board and to make it easier for the developers.
 
  • 18
  • 4
  • 1Like
  • 1Haha
Reactions:
Sounds cool, although reading about how rigid the AI strategies are only reinforces my pipe dream that some day someone will apply a Deep Learning model to Stellaris like Deepmind did for Starcraft.

But excellent work getting the AI up to snuff. It should really be able to tinker with everything the player can, even if not quite as optimally. I'd rather it make decisions on certain things at random rather than not being able to touch them at all.
 
  • 3Like
Reactions:
Are there any (minor) Ai improvemets/fixes planned for a possible 3.2.3 patch or are all of those set for 3.3 in spring?

As of right now, everything discussed here is for 3.3 or later.
 
  • 9
Reactions:
Small quibble from my recent game; is it intended that Synapse Drone jobs will be prioritized by planetary workers even if I tell the planet to prioritize another specialist job, or is that some sort of error? Trying to prioritize gas refineries would take drones out of the (administrator? the Hive equivalent) job sometimes but Synapse drones would have to be full or manually deprioritized before anything else would happen (edit: they would be added to the Synapse job!). Seems counter to the priority design.
 
I still see AI creating 20 fleets with 1-2 ships each, loosing them one by one instead of massing a single force that can actually accomplish something
 
  • 3
Reactions:
Some really cool stuff @Narkerns Some thoughts as i was reading it:
For example, the AI still has problems when playing as Void Dwellers. They can’t decide where to build habitats depending on what they would need. If they are missing minerals, they don’t know how to build a habitat on mining stations.
I've very rarely even seen voidborne AIs so havent really got a large sample to work off.. Is it the seeking out the planet that stops them? Like if they know they need minerals, it lacks the ability to scope to any planet in its empire with a mineral-yielding orbital deposit? Or is it the fact that the mining station is somehow interfering (i.e. they can target un-exploited deposits ok?).

I do see the Non-VB AI spam habitats like nuts though. Maybe non VB AIs should only (or highly prioritise) build habitats over deposit-bearing planets? It'd make army invasions less of a chore at least.

Finally, the AI is also not good at using planet designations. For example using the designation that turns a planet’s industry districts into purely alloys is not something that they can consider at the moment. Meaning, if it conquers a planet from a player who has set the Forge World designation - it will not be able to handle that planet very well.
  1. Specialized planets: The AI also should be able to specialize planets. Making Generator Worlds, Industry Worlds, Forge Worlds, Mining Worlds and the like. The idea is that the AI starts out like a player, building whatever it needs when colonizing new planets. But as soon as it settles down a bit it will look to rearrange districts amongst its planets to optimize the output of each planet. We already made some initial tests around that and they look highly promising.
Would taking a two tier approach work? Like, for instance,
  • in the early game (capital & 1-3 colonies) - I just put whatever i need on on my worlds.
  • After that (4th planet onwards usually - or any early annexed worlds) if a planet can support "majority" farm/mine/gen districts I no longer even consider hybrid worlds. I will just go ham on farms, mines and so on, flipping between Developing Agriworld, Developing Mining world etc.
Would flagging planets based on their aggregate district count help? e.g. if >50% of districts are farm ones, mark it as an ideal agri-world (and same for mines/generators). Worlds with <50% districts of a single type would use the current hybrid setups.

  1. Handle special pops better: A big problem for the AI are still multicultural planets. Different pop types, especially slaves and robots. Sometimes it tries to build research buildings for unemployed robots and doesn’t realize that robots can’t work research jobs.
Tbf, thats a problem for players too. When i run xenocompatibility, xenophile I ... quickly stop paying attention to my pops, i'll just throw down what I need and let migration figure it out.
One thing I've noticed is the AI does struggle with slaves more than anything else, can the AI check if slaves can migrate properly? I know the planet needs a slave processing centre and I think this trips up the AI a bit, it doesnt always seem to build them (as a slaver I build one on every single planet so resettlement works) - Enslaved robots not migrating around to where they're needed (skewing unemployment figures for the AI) in empires with outlawed slavery/slave processing centres are probably an issue too.

Well, we were looking into making this work again. Allies, suddenly, have become much more useful again. Whenever you are in a war where you are the war leader, you can activate this mode and all allied empires will send their fleets to your fleet and attach themselves to it.
Also, in case of a crisis attack, this behavior is activated as soon as the crisis ships enter your territory or that of your allies (or attack them anywhere).
Then it will remain active until the crisis has been defeated - so you can also take your allies into the crisis territory to fend them off there.
For the follow fleets thing... what happens if I set take point on 2 fleets? Will the AI follow the one with more FP?
Like if I put two fleets at opposite ends of a solar system, 1 1.5k FP, the other 1k FP, and set take point on both, with an AI fleet in the middle... what will it do? Randomly follow one or the other? split itself in two equally or proportionately?

  1. AI Personality for economic plans: Based on their ideologies AI empires would prioritize resources differently. Spiritualist empires will focus more on unity and materialist will focus more on science etc.
  2. AI Personality for tech select: Same for selecting techs from the tech tree. Militarist empires would focus more on weapons and new ship types and the like, while pacifist empire would focus more on economy and starbase upgrades.
This is probably better in suggestions, but could we see weapon-type (energy, kinetic, missile, strike craft) and armor/shield preferences moved out of AI personalities and assigned randomly on game start? (or at least make them overwritable with an effect script for modders).

It would help a little more with combat responsiveness if AIs were not constrained by their personalities. If I go all in on lasers and armor, and have high threat*/declare war on someone, AIs nearby ought to refit their ships to be shield and laser heavy to counter me.

* small tangent on threat: could we get it to be a more visible "thing"? Maybe in the empire menu screen, or diplo screen, or a map-mode tooltip. It'd be nice to know how threatening I am vs others after my latest round of forced annexation. It might also be a good candidate for an espionage operation - spreading fake news between target empire and its neighbours, to inflate its threat and make them attack it. Or the alternative, "shadowy peace-talks" to reduce threat and maybe make AIs prematurely offer a white peace if WE low enough / threat low enough [lord knows there are enough wars that drag on, using threat - or some similar value - as a way to cut it short might help].
 
Last edited:
  • 5
  • 3Like
  • 2
Reactions:
Will the automation AI be looked at too? Could you explain what differences there are between the AI that manages non-player empires, and the AI that manages planets and sectors when automation is on?

Automated planets have a few quirks that make them frustrating at times. In particular they seem to have arbitrary desires to reach certain strategic income surplus, which tanks your empire-wide minerals. They can also over-react to deficits as it seems automated planets don't consider what each other are building. A temporary -1 strategic resource can result in dozens of automated planets building a synthetic producer building. As they all complete minerals tank and the strategic resource goes up to an unnecessarily high surplus.

 
  • 4Like
  • 2
  • 1
Reactions:
if you keep this up, the AI will get too good for new players. are you considering changing the difficulty of the AI away from production bonusses to different AI code? maybe backup the version from 3.0 as ensign, the current as commodore and the latest, strongest version as captain? or is upkeeping all those versions of the AI code too labor intensive?
 
  • 6
  • 2Like
  • 1
Reactions:
Probably the dev blog I've been happiest to read, ever, for stellaris. Covers all the salient economic AI points in detail and gives a promising path forward.

Thank you. I now feel like I can relax and trust this will get fixed to happy state for players.

The next AI things to address (beyond the blog) would be player planet/sector automation (as a poster mentioned above -- get these good changes ported over to that part of the AI code), and non-player-empire military AI.
 
  • 7Like
Reactions:
3. Optimize Machine Empire Amenity Handling: A big issue for machine empires is that they don’t have specialists that produce amenities. So they would rely a lot on maintenance drones by creating a lot of jobs for them. This wasted a lot of potential for them, because they would have to fill up all those jobs first before they could produce more useful things like minerals or alloys. We’re looking into teaching the AI how to down-prioritize those maintenance jobs once they have enough amenities and instead distribute drones on more useful jobs.
Will you also look at how clerk jobs are handled?

Since there is no research to improve clerks output, like there is for other worker jobs like miners or electricians, they are really inefficient/useless filler jobs right now. If the ai would be capable of downprioritizing clerk jobs it would free up a lot of pops to do something usefull making the ai much more capable.

For amenities, entertainers are a lot more efficient than clerks. As for raw resource production, the clerks produce too little trade to compete with any other job.
 
  • 3Like
  • 2
  • 1
Reactions: