Discuss: where can the games AI go from here?

  • 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.

Todie

Doer of things and stuff in the videogame
38 Badges
Mar 9, 2018
1.963
2.090
www.twitch.tv
  • Imperator: Rome
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Cities: Skylines Industries
  • Age of Wonders II
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Nemesis
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV
  • War of the Roses
  • Cities: Skylines
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris
  • Cities: Skylines - Snowfall
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Magicka 2
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Crusader Kings II
Hey.

For the last few days, I’ve been huddled up tinkering with stellaris scripts for my AI mod (other than some xmas stuff).

Now im afk for a few days, so reflecting a bit- a few questions i’d like to discuss:

  1. Can we fix the AI for 2.2? to be considtently not-awful?
  2. What / How much time will it take ?
  3. How good could the AI be?
  4. What would it mean for Stellaris to have a consistently not-bad AI ?
Thoughts on any or all of these are welcome! I have thoughts on all of them, will post replies with that in the hours/days ahead.

(On a personal note, im not the most renowned of AI modders. Im Just trying to contribute - I might do some visual comparisions between vanilla/AImods eith the dashboard app)
 

SectorsAreOkay

Major
19 Badges
Feb 8, 2017
629
1.545
  • Europa Universalis IV
  • Stellaris: Necroids
  • Crusader Kings III
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Stellaris: Synthetic Dawn
1. Sure: Glavius did it
2. It's been done
3. Better?
4. It's able to manage its economy in most common scenarios and is able to wage war against other AIs and average-level players without choking.
 

Todie

Doer of things and stuff in the videogame
38 Badges
Mar 9, 2018
1.963
2.090
www.twitch.tv
  • Imperator: Rome
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Cities: Skylines Industries
  • Age of Wonders II
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Nemesis
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV
  • War of the Roses
  • Cities: Skylines
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris
  • Cities: Skylines - Snowfall
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Magicka 2
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Crusader Kings II
1. Sure: Glavius did it
2. It's been done
3. Better?
4. It's able to manage its economy in most common scenarios and is able to wage war against other AIs and average-level players without choking.

So you're content then? Youre not interested in qualifying in what ways the AI could be made better and how that would interact with the games various mechanics and aspects?
 

Todie

Doer of things and stuff in the videogame
38 Badges
Mar 9, 2018
1.963
2.090
www.twitch.tv
  • Imperator: Rome
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Cities: Skylines Industries
  • Age of Wonders II
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Nemesis
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV
  • War of the Roses
  • Cities: Skylines
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris
  • Cities: Skylines - Snowfall
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Magicka 2
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Crusader Kings II
To begin answering my own questions:

1: ”can we fix the AI for 2.2”
-> 2 ”what will it take”

The AI can be still be ”fixed” the same way as in previous patches (and it has - again by @Glavius ) , by braking its mold and forcing / simulating certain actions upgrading / replacing buildings and districts) In modspeak: with bypassing systems of budgeting and choice-weights, using triggers instead.

The recent updates braugt fleshed out modding options that make it possible to change and add various budgeting parameters, including economic categories linked to them.

In my view, choice-weights and budgeting options together, are very promising, but lacking on some key points (witch i assume, is why Glavius hasnt engaged with them much).

Briefly: if scriptability got a few more nudges forward, mods (or even vanilla ai) could handle all(/more) aspects of economy in one place. In my view, this would be a very good thing. (atm not sure how good)

Some concrete examples how budget scripting can improve ai compared to earlier patching:
  • Setting apart resources for key budget-posts like expansion and and buildings. (To be used whenever afforded, regardless of other posts)
  • Scaling military spending to things like levels of current threat, rivalries/hostilities / wartime and naval capacity
  • Scaling all resource and influence spending with respect to various parameters (ex: make room for some decsison influence if a planet needs martial law for defensive or stability reasons)
  • Potentially even more detailed budget posts for individual building categories (i havnt explored this possibility yet)
In summary : It seems likely that the AI can be taken further than previously, leaning on less brute-force trigger-work. At this point in time, i can think of a few potential functionalities that, if added, would help in this regard:

Weight-script functionality to...
  • Repair and replace buildings
  • Upgrade and build buildings that require rare resources
Budgeting functionality to...
  • Regulate extent of sales and purchases on the market (currently only works for energy?)
  • Use same economic category for several resources (like influence and alloys for expansion)
Also, just clearifications of the confines of the budget scriptability and it hooks to other systems;

Would it be possible to make entire sepparate budget-trees of new economic categories ? Would the AI modules hook obto these as they do with default categories?

.. im particularly curious what Glavius, @Gratak and other modders with ai-insight have to say on this!
 

AlphaAsh

Miserable Git
52 Badges
Mar 16, 2015
1.274
1.185
www.alphastrikegames.com
  • Victoria 2: A House Divided
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Age of Wonders: Planetfall Season pass
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall
  • Victoria 2
  • Victoria 2: Heart of Darkness
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Megacorp
  • Stellaris: Leviathans Story Pack
  • Stellaris: Ancient Relics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Lithoids
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Synthetic Dawn
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Apocalypse
  • Shadowrun Returns
  • Shadowrun: Hong Kong
  • Shadowrun: Dragonfall
  • BATTLETECH
  • BATTLETECH - Beta Backer
  • BATTLETECH - Backer
  • BATTLETECH: Season pass
  • BATTLETECH: Flashpoint
  • Surviving Mars
  • Surviving Mars: First Colony Edition
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Campus
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Cities: Skylines Industries
  • Pillars of Eternity
  • Tyranny: Archon Edition
If there's no soft-code hook for a function, there's no scripting that function. If there's no soft-code function for repairing a building, it can't be scripted. If the AI isn't doing it, it's a bug in the back-end, and PDX needs to fix it.

Glavius uses a work-around - buildings can't be ruined.

OP, there's no magic solution in soft-code for many of the issues plaguing the AI right now. Even budget hacking can only do so much, since many of the AI's decisions are either barely influenced by it, or not at all.

This is something the layman needs to understand - the soft-code is NOT god. The hard-code is. In many cases if you use the soft-code that can be used to over-ride the hard-code, THEY FIGHT, with bloody axes and your game dies in a gurgle of blood splatter.

Any fixing of the AI has to always start with PDX.

Oh, and the PDX scripters are in the same bloody boat too. If the back-end engineers and they don't work together, you get a constant iteration of attempts by their scripters that is never reliable or effective. Buildings are a prime example of this break-down - they have been revised numerous times by the scripters, and it's quite clear the back-end team have done very little to support them.
 

Todie

Doer of things and stuff in the videogame
38 Badges
Mar 9, 2018
1.963
2.090
www.twitch.tv
  • Imperator: Rome
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Cities: Skylines Industries
  • Age of Wonders II
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Nemesis
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV
  • War of the Roses
  • Cities: Skylines
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris
  • Cities: Skylines - Snowfall
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Magicka 2
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Crusader Kings II
Thats a good way to put it @AlphaAsh . Im just saying, from where im standing it doesnt look like there’s MUCH missing in the hard code to enable more of the soft code to come alive. If we hark on how important this can be, perhaps itl be made a peiority sooner...

Moving on, reflecting over another question in the OP:

3: how good could the AI be?


If the hard code is fixed to enable the soft code to ’sing’, and if economic categories + budgeting works the way i think it can / its intended:


... we can effectively script new pseudo-modules for AI empires - not only determined by preset AI-personality category (but also diplomatic , economic and millitary circumstances. This could for example mean more dynamic and preemptive action when boxed in - build taller with research, consumer goods ameneties and housing, or gear up a militarized economy at the first sight of a target that isnt even inferrior yet (=alloys, army buildings, anchorages, shipyards —> armies and fleets.
 

Scorpio_Shirica

Second Lieutenant
99 Badges
Oct 23, 2013
158
327
  • Stellaris
  • Europa Universalis IV: Res Publica
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Pre-order
  • Tyranny - Tales from the Tiers
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • BATTLETECH
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Charlemagne
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III Complete
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • King Arthur II
  • Crusader Kings II: Legacy of Rome
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Reapers Due
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Europa Universalis III Complete
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis III Complete
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
i think it can be fixed, but we may see more performance hiccups as they try to do it. Hopefully they'll keep performance crushing fixes in the beta so they can optimize them for a more mass audience while letting players with better machines put the ai through its paces.
 

Tshi

Sergeant
22 Badges
Oct 6, 2017
50
10
  • Crusader Kings II: Conclave
  • Crusader Kings III Referal
  • Crusader Kings II: Holy Fury
  • Surviving Mars: Digital Deluxe Edition
  • Stellaris: Apocalypse
  • Stellaris: Humanoids Species Pack
  • Crusader Kings II: Jade Dragon
  • Stellaris: Synthetic Dawn
  • Surviving Mars
  • Stellaris: Leviathans Story Pack
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
I know this is probably not gonna happen for stellaris, but as a modder myself and coming from an environment with way more access to the games core files (XCom2 and Unity Engine games), Stellaris will never have a really good AI as long as modders dont have access to large parts or all of the AIs source code. Bruteforce workarounds via scripting like Glavius does it are a good start, but he cant really adress the core issues like fleet behavior and such. In addition to that modding for stellaris currently really is not a "fun" or modern way of doing things. It would be great if PDX would consider opening up actual parts of the engines source code for modders in the future (maybe for Clausewitz 2 or whatever it will be called).

Dont get me wrong, the amount of stuff you can do via scripting in Clausewitz is astonishing, but in the end modding Clausewitz often feels like pulling teeth and making lots of foul compromises. It would be great, if we ever got a deeper access to the games core code, especially considering how large the modding scene for paradox games is.
 

Gratak

Field Marshal
97 Badges
May 27, 2014
5.081
2.240
  • Victoria 2: A House Divided
  • Sengoku
  • Cities: Skylines - After Dark
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris: Apocalypse
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Pillars of Eternity
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings Complete
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders
  • Age of Wonders II
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Prison Architect
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Golden Century
  • Crusader Kings II: Holy Fury
  • Surviving Mars: First Colony Edition
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Age of Wonders: Planetfall Deluxe edition
  • Europa Universalis IV
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Stellaris: Necroids
  • Victoria 2
  • Warlock: Master of the Arcane
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Crusader Kings II: Way of Life
To be honest I haven't really looked into what is possible in 2.2.* since the event-based approach I used pre 2.2 has been (temporarily I hope) made impossible.

Anyway: Many restriction that were in pre 2.2. Stellaris have been removed:
- You couldn't save anything on tiles which made it very hard to find the optimal building via event.
- Performance problem because of Adjacency buildings.
- General performance problems since the number of choices was very high.

Thus, as soon as this issue has been resolved,

https://forum.paradoxplaza.com/foru...rn-add_building_construction-command.1134502/

I guess it should be very possible to create a very good event based building AI.
 

SirAlexius

Captain
52 Badges
Feb 13, 2018
476
8
  • Crusader Kings II
  • Europa Universalis IV: Third Rome
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars
  • Cities: Skylines - Green Cities
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Crusader Kings III
  • Imperator: Rome Sign Up
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Magicka 2
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Crusader Kings II: Sword of Islam
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Jade Dragon
  • Cities: Skylines Industries
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Sengoku
  • Europa Universalis IV: Cradle of Civilization
I am using the Glavius AI mod, and while it is helpful, I do not think it is perfect. I really want to see AI empires making bigger fleets. They should not be using stacks of 4k in the midgame. I am not sure how this can be addressed but I think it is a top priority.
 

UltimateTobi

General
53 Badges
Mar 8, 2010
1.918
1.242
www.youtube.com
  • Stellaris: Nemesis
  • Cities: Skylines - Campus
  • 500k Club
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris - Path to Destruction bundle
  • Stellaris: Apocalypse
  • Stellaris: Megacorp
  • Stellaris: Federations
  • Stellaris: Leviathans Story Pack
  • Stellaris: Synthetic Dawn
  • Stellaris: Distant Stars
  • Stellaris: Ancient Relics
  • Stellaris: Humanoids Species Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Lithoids
  • Stellaris: Necroids
  • Europa Universalis IV
  • Europa Universalis 4: Emperor
  • Island Bound
  • Prison Architect: Psych Ward
  • Arsenal of Democracy
  • Europa Universalis IV: Golden Century
  • Darkest Hour
  • Hearts of Iron III
  • Cities: Skylines
  • Cities: Skylines Industries
  • Cities: Skylines - Natural Disasters
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - Green Cities
  • Prison Architect
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Pre-order
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
I think @Glavius should weigh in on this!

  1. Can we fix the AI for 2.2? to be considtently not-awful?
    1. I think we can, yes. But not unless PIS fixes its most glaring bugs (Repair Ruined Buildings, Pop Job Selection, etc).
  2. What / How much time will it take ?
    1. I suppose the entirety, or at least the first half, of 2.2+ (I don't think Diplomacy & Politics Rework will change much regarding AI in the fields of Economy and Warfare).
  3. How good could the AI be?
    1. I think it could be challenging on Ensign (which @Glavius strives for, and it was pre-2.2, at least for anyone who wasn't a strict min/maxer, which I am not. But I'd consider myself decent to good. And since AI is mostly used in Singleplayer, the mods should be handled in that regard, not making the AI a perfect min/maxer, but a challenging opponent, also in respects to RP!) and be devestating on anything above. A good base produces extraordinary results on anything above it.
  4. What would it mean for Stellaris to have a consistently not-bad AI ?
    1. It would mean that people find more enjoyment out of the game in general, whether be it Singleplayer or Multiplayer. More stories could be told!
 

Todie

Doer of things and stuff in the videogame
38 Badges
Mar 9, 2018
1.963
2.090
www.twitch.tv
  • Imperator: Rome
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Cities: Skylines Industries
  • Age of Wonders II
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Nemesis
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV
  • War of the Roses
  • Cities: Skylines
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris
  • Cities: Skylines - Snowfall
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Magicka 2
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Crusader Kings II
Hey, i wanted to refer back to this as it was a good talk over the holidays...

As ive made progress on my AI mod lately and started doing more and more tests with that & comparing with Glavius mod, i wanted to return to the third question in the OP here;

What would it mean for the game to have a consitently better AI ?

... what are some plays / setups / scenarios that you think downright require an OK AI to have any fun with having a go at? (The cynisist will say anything, but try to keep it positive?)

Personally, the thing ive always wanted is to do some meaningful space-feodalism. Conquer and release vassals, and have the interaction with them and between them and the suroundings, be a net gain — thats not so far fetched — but to do this and still be challanged by other empires? To do this without AI that massively cheats on economy !(bonuses that that vassals dont get)

... if i had a fulfilling game of that, in sure id think of what to try next pretty fast.

There are so many potential immersive approaches to space-empire managment already covered in Stellaris - aproaches that would come to fruition so much better if pushed to their limits by organic space-intrigue (= among AI empires that more closely resemble player decisions ambitions and constraints - with less cheats)

Depending on the aproaches complexity, its also possible to let the AI emulate them in more nuanced ways than currently..!

What are YOUR ideas for creative approaches to playing stellaris, that you feel like a better AI would really help enable ?
 

Urza1234

First Lieutenant
24 Badges
Jun 28, 2016
296
24
  • Magicka
  • Stellaris: Humanoids Species Pack
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Crusader Kings III
  • Stellaris: Federations
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall
  • Stellaris: Ancient Relics
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Apocalypse
  • Age of Wonders III
  • Stellaris: Synthetic Dawn
  • Stellaris - Path to Destruction bundle
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris
  • Magicka 2
  • Magicka: Wizard Wars Founder Wizard
1. Sure: Glavius did it
2. It's been done
3. Better?
4. It's able to manage its economy in most common scenarios and is able to wage war against other AIs and average-level players without choking.

1. Idk, I downloaded Glavius's mod and within 10 years of a new game start he broke my pop management. My new pops started spawning as specialists and refusing to spawn as workers. Glavius's stuff seems kind of hit or miss to me. Feels like subscribing to somebody's personal work-in-progress rather than a finished product. I mean I get why that is, but it doesnt feel superior to the Vanilla AI, just broken in different ways.

2. To get the AI above the level of, for example, Civ 6 AI can be done consistently every patch of PDX isnt developing faster than their QA can cover. Realistically, the patch cycle is too fast for the AI to ever become really 'good', until Stellaris 2 gets released and Stellaris gets put into maintenance mode.

3. The AI can only ever be so good, since it runs on a hand-entry weight based system. Even getting the AI to run a basic economy with this system is an accomplishment.
I suspect that potentially the end user experience could be made to feel pretty good with a mod that detects AI economy failures and pushes reports of those failures to the Log, then a 3rd party script could be run to update both default and personality based AI weights, which could then be patched on a regular basis. This approach of pseudo machine learning could drastically speed up how fast the AI is improved and developed.
 
Last edited:

Todie

Doer of things and stuff in the videogame
38 Badges
Mar 9, 2018
1.963
2.090
www.twitch.tv
  • Imperator: Rome
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Cities: Skylines Industries
  • Age of Wonders II
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Nemesis
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV
  • War of the Roses
  • Cities: Skylines
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris
  • Cities: Skylines - Snowfall
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Magicka 2
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Crusader Kings II
1. Idk, I downloaded Glavius's mod and within 10 years of a new game start he broke my pop management. My new pops started spawning as specialists and refusing to spawn as workers. Glavius's stuff seems kind of hit or miss to me. Feels like subscribing to somebody's personal work-in-progress rather than a finished product. I mean I get why that is, but it doesnt feel superior to the Vanilla AI, just broken in different ways.

2. To get the AI above the level of, for example, Civ 6 AI can be done consistently every patch of PDX isnt developing faster than their QA can cover. Realistically, the patch cycle is too fast for the AI to ever become really 'good', until Stellaris 2 gets released and Stellaris gets put into maintenance mode.

3. The AI can only ever be so good, since it runs on a hand-entry weight based system. Even getting the AI to run a basic economy with this system is an accomplishment.
I suspect that potentially the end user experience could be made to feel pretty good with a mod that detects AI economy failures and pushes reports of those failures to the Log, then a 3rd party script could be run to update both default and personality based AI weights, which could then be patched on a regular basis. This approach of pseudo machine learning could drastically speed up how fast the AI is improved and developed.

I think we aught to distinguish between a WIP AI mod a few weeks after the complete economic rehaul, and what can concievably be done with refining an AI mod alongside a couple of months of bug fixing and post-launch QA by pdx (for lak pf better words)

There are also means of comparing AI economix performance; vanilla / modded, so we dont have to go on hunched (though atm, our AI mods are experimenting a lot and changing very fast)

The hand entry wieght based system you mention is a thin indeed, but those weights need not be isolated static numbers. They can be tied together across categories, using flags triggers and dynamic variables. This is a riddle for solving. With a slighly more robust back-end and more ’hooks’ to work with, it is in reach.

.. Granted, there are too many parameters to truely optimize it and make the ai ”good” , but it can be made ”not bad” . That can be enough, and enough to make AI personalities and such come alive in a better way.

As for the prospect of detecting and recording AI econ-failures, i doubt that would be easier or more effective than modding-to-fix.

To your point, comunicating / framing what we learn when trying to fix the AI, can probably be helpfull for pdx and further AI-modding mid/long term.
(For example ive been thinking of reaching out to glavius and crew to write something about the easiest / most urgent things to adress in The vanilla AI)
 

Arutar

First Lieutenant
47 Badges
May 10, 2017
265
116
  • Stellaris: Synthetic Dawn
  • Stellaris: Humanoids Species Pack
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rights of Man
  • Stellaris: Apocalypse
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Shadowrun: Dragonfall
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Stellaris: Lithoids
  • Europa Universalis IV: El Dorado
  • Hearts of Iron IV: No Step Back
  • Stellaris: Nemesis
  • Stellaris: Necroids
  • Europa Universalis 4: Emperor
  • Crusader Kings III
  • Victoria 2
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Expansion Pass
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Stellaris: Galaxy Edition
If there's no soft-code hook for a function, there's no scripting that function. If there's no soft-code function for repairing a building, it can't be scripted. If the AI isn't doing it, it's a bug in the back-end, and PDX needs to fix it.

Glavius uses a work-around - buildings can't be ruined.

Which in my mind illustrates the whole problem. PDX should never implement any game feature unless and until the A.I. knows how to use it.

While we wait for any additional A.I. work, I`d also like to point out that giving more and better difficulty options could at least help to make the lacklustre A.I. less obvious. At least on Grand Admiral the early game can be challenging., but the A.I .simply cant keep up.
 

BigPony

Sergeant
20 Badges
Dec 7, 2018
62
0
  • Stellaris: Necroids
  • Stellaris: Federations
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Stellaris
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris - Path to Destruction bundle
  • Stellaris: Synthetic Dawn
  • Commander: Conquest of the Americas
  • Sword of the Stars
  • Magicka
  • Hearts of Iron III
  • Darkest Hour
Just a question for those more knowledgeable, but why is certain parts of the code not able to be modified for the ai? I know of other games in which ai's were improved and the people who did so even ended up being hired by the games companies, but they did not seem to be restricted by what they were able to do?
 

Todie

Doer of things and stuff in the videogame
38 Badges
Mar 9, 2018
1.963
2.090
www.twitch.tv
  • Imperator: Rome
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Cities: Skylines Industries
  • Age of Wonders II
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Stellaris: Nemesis
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV
  • War of the Roses
  • Cities: Skylines
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Cities: Skylines - Natural Disasters
  • Stellaris
  • Cities: Skylines - Snowfall
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Magicka 2
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Crusader Kings II
To 1.: The question is unprecise.
Problematic is fixing the ai, without a big impact on game
performance, at least without the help from Paradox. To not impact game performance, a few calculations, which would have something to do with the actual game strategy (planning), would need to be performed independently from the actual moves (actions) done by the ai, so that ie. these calculations can be done in single player, when the game is paused, or in mp-games on different pcs. Of course in the savegames the progress would need to be stored.

The rest can be done to some degree, but it would involve the use of quiet a few heuristics. And also precomputing the solutions to some mathematical problems depending on the actual game settings and changing some weights according to the solutions. It is more difficult to design the ai, so that it is "good" under all settings, which can be customized in the game settings (galaxy setup), then optimizing the ai for just one of the settings.

To. 2: The question is again unprecise. As the time to fix would of course depend on what the intended goals are.

To 3.: The problem for the ai would be to actually develop a good game strategy, but then the strategy should depend on the goals of the ai, which should in turn
depend on the personality etc. Without a strategy, even with perfect micro and solving quiet a few mathematical problems exactly, the ai would loose in single-player games against really good players most of the time (as it might solve the wrong mathematical problems or optimizes for the wrong goals), but then the goals of some ais might not be winning the game (or denying the player to win). Oh and the ai would need to be able to adept. After knowing how the ai usually behaves - and what is random and what not - it is usually relatively easy to exploit the shortcomings of the ai. Most strategy games would be a lot harder for me, if the others would not make deals with me (or at least not continue to make deals with me, when it is clear that I am the most likely candidate to win and would win, if the rest are not cooperating with each other). - The big problem of most ais in strategy game is, that they are only by name an ai, but otherwise usually a pretty "static" algorithm. And designing a really good ai, well that is complicated, especially if the ai should in the games then compute the results with very limited hardware resources.

To. 4: Again an unprecise question (the term "not-bad" is unprecise). Can you rephrase the question?


ps. After knowing how the ai behaves I am actually really good in coming up with game parameters, with which the ai cannot really cope or where
sadly the ai optimizes for the wrong goals (if it optimizes anything). If you have a mathematical problem which can be optimized concerning different parameters and the used algorithms always use the same priority for optimization, the results can become pretty bad, if because of the settings the priorities are wrong, as ie. in these settings another resource is more scarce then another (or more important). In most 4x-Games raising the research costs/time is such a case (in stellaris also picking enigmatic engineering additionally as an ascension perk might help to not give technologies to the ai cheaply).

The OP / questions were intentionally broad (”vague”) to encourage interpretation and discussion. There is no point in trying to be that precise when the matter at hand is so subjetive anyway; it all depends on who plays the game, and how.

As was suggested earlier in the thread, what we tend to look for in games like this isn't really the Ai-savant of the deepmind or chess-computer kind, just one that play a somewhat rational economy game as a foundation, and interacts with its surroundings in an immersive way from there.

Stellaris already has personality types that is assigned to AI-empires. and those types turn the knobs of the AI's weighted decisons. its just that, currently 8so far overall really) the unmodded AI has been inept on such a basic level that there hasnt been any room for nuances like simulated personalities to shine much.

there are means at our disposal to scrip the AI to interlock more fo what it does in economy diplomacy, research etc. in my experience, much of this can be done with little strain on performance. there's just a few key pieces missing right now in that regard. It does take more time and work to tune the AI to different galaxy-settings, but i dont thin thats a big deal in and of itself.