written by Guido
Hello and welcome to a new Dev Diary,
My name is Guido and today Im here in my role as a Principal Designer on Stellaris to talk about AI in a bit more detail.
You probably have heard about the Custodian Initiative by now which has been created to keep improving the game on a more regular basis and in order to be quicker when reacting to player feedback. A part of this initiative is also to put some more love and attention to the AI of the game going forward - an AI initiative inside the Custodians, basically.
For this, we have set some goals for ourselves going forward:
[olist]
Economic Script Update
First of all, the biggest change you will notice is how we have changed the economic plans script. This script is the core of the economic behavior of our empires. It defines what resources they strive to get when building districts and buildings. How much population growth they should go for and how much research and unity they want. The functionality of the script hasnt changed much, but how we are using it has changed. Previously the script was divided into early-, mid-and late-game. Depending on the phase of the game, empires would prioritize resources differently. For example, focus on research was lower in the early game than in the later stages of the game. However, this approach didnt take into account the various situations an empire can find itself in. Especially after a war or when a new empire breaks off an existing one. In those cases, even if the game phase was in the late game, for the respective empires it meant that they were in a much more early game position.
Instead of having 3 different economic plans, we feature 1 base plan instead. In order to get more flexibility and to react to the empires situation, were relying much more on the subplans inside that base plan.
Improved economic subplans
Subplans can be turned on or off, depending on the situation the empire finds itself in. Our main rationale was to ensure that an empire would be economically stable before it spends resources on bonus things like research, population growth, defensive modules on starbases, and unity buildings. Previously those things were prioritized too early and without enough respect to the basic income of energy and minerals, leading to empires that produced alloys, but had big deficits in energy and mineral production. And this deficit would be the start of an economic death spiral, where the resource debuffs would further reduce production and everything just escalated to the point where an empire was bankrupt on all resources. This became especially problematic after the economic system has been rebalanced to focus resource production more on the districts, rather than the buildings of a planet. Heres an example of what the economic situation generally looked for empires in a game that went on for around 80 years:
These are screenshots from Stellaris version 3.0.3 Our updated economic script prioritizes basic income first and takes the new economic rebalance into account. Energy and minerals are most important. The difference between the income and focus block is that if the monthly income is below what is defined in the focus block - districts and buildings which produce those resources get an extra bonus in weight, when deciding what to build.
Then the first subplan kicks in. If a country uses food (therefore, Machine empires will have this subplan turned off) it will prioritize food production.
The next subplan will check conditions for focusing on consumer goods. Again, checking if the empire actually uses them or not - and then only focus on producing them if the empire has at least a monthly income of minerals of 30. Based on the fact that in order to create consumer goods you require minerals.
Further down we activate the plans for prioritizing research and all the higher-level resources
Resulting behavior improvements
So, the script can check for various situations in AI empires - from the fact if they are a Gestalt Empire, using food to monthly income of specific resources. This gives the AI a lot more flexibility in managing its economy. As an example, here we have a 100-year old Galaxy with 13 AIs and every empire is able to manage its economy in a decent enough way. Notice the resource tab at the top - almost all empires have positive income in all resources; the ones with a negative income only have a small deficit:
Apart from this, there were some small, but significant code changes that helped the AI in running the show.
Conclusion
The code for the AI has been optimized heavily in the past in order to improve performance a lot. However, this has led to some unforeseen and unintended behaviors which have now been corrected. Some of the districts and buildings werent considered at all and city districts were weighted way too high. The AI is also now able to build temples and holo theaters, for example. Finally, the AI has also been given a bit of support in how it will set up its starbases, especially in conjunction with the hydroponics starbase building, which can play a larger role in how you provide food for your empire. The AIs can now use more varied setups when building their starbases, making use of Curator Think Tanks, Nebula Refineries, and other special buildings where it makes sense. And all of this was built on the foundation of the last major rework of the economic AI, so kudos to sidestep for making this evolutionary step possible. With your help, were looking forward to giving the AI the attention it deserves and making it even better in the future. Cheers, Guido
Stellaris
Paradox Development Studio
Paradox Interactive
2016-05-09
Strategy Simulation Singleplayer Multiplayer
GameBillet
8.91 /
€
Game News Posts 537
🎹🖱️Keyboard + Mouse
Very Positive
(119848 reviews)
https://www.stellaris.com/
https://store.steampowered.com/app/281990 
The Game includes VR Support
Linux [153.28 M]
Stellaris: Infinite Frontiers eBook
Stellaris: Plantoids Species Pack
Stellaris: Leviathans Story Pack
Stellaris: Utopia
Stellaris: Nova Edition Upgrade Pack
Stellaris: Galaxy Edition Upgrade Pack
Stellaris: Anniversary Portraits
Stellaris: Synthetic Dawn
Stellaris: Apocalypse
Stellaris: Humanoids Species Pack
Stellaris: Distant Stars Story Pack
Stellaris: MegaCorp
Stellaris: Ancient Relics Story Pack
Stellaris: Lithoids Species Pack
Stellaris: Federations
Stellaris: Necroids Species Pack
Stellaris: Nemesis
Stellaris: Aquatics Species Pack
Stellaris: Overlord
Stellaris: Toxoids Species Pack
Stellaris: First Contact Story Pack
Stellaris: Galactic Paragons
Stellaris: Astral Planes
Stellaris: Expansion Subscription
Stellaris: The Machine Age
Stellaris: Cosmic Storms
Stellaris: Grand Archive
Stellaris: Rick the Cube Species Portrait
Stellaris: Season 08 - Expansion Pass
Featuring deep strategic gameplay, a rich and enormously diverse selection of alien races and emergent storytelling, Stellaris has engaging challenging gameplay that rewards interstellar exploration as you traverse, discover, interact and learn more about the multitude of species you will encounter during your travels.
Etch your name across the cosmos by forging a galactic empire; colonizing remote planets and integrating alien civilizations. Will you expand through war alone or walk the path of diplomacy to achieve your goals?
Main Feature
- Deep & Varied Exploration.
- Enormous procedural galaxies, containing thousands of planets.
- Explore Anomalies with your heroic Scientist leaders.
- Infinitely varied races through customization and procedural generation.
- Advanced Diplomacy system worthy of a Grand Strategy Game.
- Ship Designer based on a vast array of technologies.
- Stunning space visuals.
- OS: Ubuntu 20.04 x64
- Processor: Intel iCore i3-530 or AMD FX-6350Memory: 4 GB RAM
- Memory: 4 GB RAM
- Graphics: Nvidia GeForce GTX 460 or AMD ATI Radeon HD 5870 (1GB VRAM). or AMD Radeon RX Vega 11 or Intel HD Graphics 4600Network: Broadband Internet connection
- Storage: 12 GB available space
- OS: Ubuntu 20.04 x64
- Processor: Intel iCore i5-3570K or AMD Ryzen 5 2400GMemory: 4 GB RAM
- Memory: 4 GB RAM
- Graphics: Nvidia GeForce GTX 560 Ti (1GB VRAM) or AMD Radeon R7 370 (2 GB VRAM)Network: Broadband Internet connection
- Storage: 12 GB available space
[ 5951 ]
[ 3154 ]