How the AI Chooses Focuses in Non-Historical Mode

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

External

Private
99 Badges
Feb 22, 2013
13
3
  • Rome: Vae Victis
  • Heir to the Throne
  • Knights of Pen and Paper +1 Edition
  • March of the Eagles
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Semper Fi
  • Supreme Ruler 2020
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - Natural Disasters
  • Stellaris - Path to Destruction bundle
  • For the Motherland
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Cities in Motion 2
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Hearts of Iron III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV Sign-up
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
Through the various streams that there have been we have only seen the players play on historical mode and nothing has been played using non-historical mode. My question is: How does the AI choose focuses in non-historical mode? Do the various focuses have weight on them or does the AI choose them at random?
 
  • 3
Reactions:

Bridger15

Major
80 Badges
Feb 14, 2009
575
1.175
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Jade Dragon
  • Sword of the Stars II
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Magicka
  • Leviathan: Warships
  • Heir to the Throne
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • For the Motherland
  • Cities: Skylines - Mass Transit
  • Steel Division: Normandy 44
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Cities: Skylines - Natural Disasters
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris: Nemesis
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • 500k Club
I skimmed the AI dev diary and did not see anything similar to my question. I could have missed something though.

Click the "only show dev responses" at the top of the page for the dev diary. Steelvolt posted a dozen or more replies and I could have sworn one of them was about historical vs. ahistorical focuses.
 

Athan.

Companion Cube
103 Badges
Sep 18, 2011
159
156
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Call to arms event
  • Heir to the Throne
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Cities in Motion
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II: Monks and Mystics
  • Cities in Motion 2
  • Crusader Kings II: Reapers Due
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Snowfall
  • Hearts of Iron IV: Together for Victory
  • Stellaris
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Cities: Skylines - Natural Disasters
  • Stellaris Sign-up
  • Hearts of Iron IV Sign-up
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • 500k Club
Do the various focuses have weight on them or does the AI choose them at random?
From the AI Dev Diary:
"Suggestion: Make another "Fully Dynamic" mode where there are no scripted weights and every AI has the same chance to pick different focuses."
1: this has been considered.

So choosing them at random has been considered, implying that Focus selections currently have scripted weights. That answers your question above, but doesn't give much further detail about how the selection happens, for now anyway. Maybe a dev could add some detail to it here. There are other parts of the same thread that talk about how the scripts tailor the AI to react to the world around them.
 

kviiri

Field Marshal
37 Badges
Jun 22, 2015
3.345
8.260
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Steel Division: Normandy 44
  • Stellaris: Synthetic Dawn
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Federations
  • Crusader Kings III
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV
  • 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 seriously hope that the AI picks its focuses sensibly, taking into account what's going on with the world at large and how it's being interacted with. For example, Germany being more likely to pick alliance with USSR if USSR maintains good relations with them or picks on common enemies.
 

JerkyJerry

There was never a good war or a bad peace.
22 Badges
Jan 15, 2013
2.176
1.278
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Semper Fi
  • Arsenal of Democracy
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - Campus
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines Industries
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • 500k Club
  • Cities: Skylines
I don't know what the AI will bring but I'm confident it will be fun! :)
 
  • 2
Reactions:

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.201
  • Paradox Order
  • Hearts of Iron IV Sign-up
So choosing them at random has been considered, implying that Focus selections currently have scripted weights. That answers your question above, but doesn't give much further detail about how the selection happens, for now anyway. Maybe a dev could add some detail to it here. There are other parts of the same thread that talk about how the scripts tailor the AI to react to the world around them.

The reason we have not put any sort of time on doing a completely random focus selection is because it easily leads to really dumb stuff happening. Some focuses can easily lead to war, and unless there is some script modifying the weights to these, the AI can end up picking these in very bad situations.

Anyway, the focus trees have scripted weights, as stated, so if anyone would like to just set the AI loose on them, they could just go through the scripted trees and set all AI weights to 1.0 (or any other value higher than 0.0, as that blocks the AI from picking them, and the relative value is what matters.)
 
  • 14
Reactions:

External

Private
99 Badges
Feb 22, 2013
13
3
  • Rome: Vae Victis
  • Heir to the Throne
  • Knights of Pen and Paper +1 Edition
  • March of the Eagles
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Semper Fi
  • Supreme Ruler 2020
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Crusader Kings II
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - Natural Disasters
  • Stellaris - Path to Destruction bundle
  • For the Motherland
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Cities in Motion 2
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Hearts of Iron III
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Stellaris Sign-up
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV Sign-up
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
The reason we have not put any sort of time on doing a completely random focus selection is because it easily leads to really dumb stuff happening. Some focuses can easily lead to war, and unless there is some script modifying the weights to these, the AI can end up picking these in very bad situations.

Anyway, the focus trees have scripted weights, as stated, so if anyone would like to just set the AI loose on them, they could just go through the scripted trees and set all AI weights to 1.0 (or any other value higher than 0.0, as that blocks the AI from picking them, and the relative value is what matters.)

Thank you for the reply. This is what I thought the case was, but I wanted confirmation.
 

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.201
  • Paradox Order
  • Hearts of Iron IV Sign-up
Will the weights mean that the AI will pick foci that are suitable for the situation and make sense in the context of the geopolitical situation?

That is the general idea. At the very least they should avoid picking completely insane ones, but as it is scriptable it can be made more sophisticated over time and/or through mods if issues arise.
 
  • 3
Reactions:

fellaz007

Second Lieutenant
46 Badges
Nov 17, 2009
121
155
  • Crusader Kings II
  • Hearts of Iron III
  • BATTLETECH: Flashpoint
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Stellaris: Leviathans Story Pack
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • BATTLETECH: Season pass
  • Stellaris: Lithoids
  • BATTLETECH: Heavy Metal
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Battle for Bosporus
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Crusader Kings II: Way of Life
  • 500k Club
  • Stellaris: Digital Anniversary Edition
  • Semper Fi
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • For the Motherland
  • Hearts of Iron III: Their Finest Hour
  • Naval War: Arctic Circle
  • Supreme Ruler: Cold War
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Field Marshal
  • Stellaris - Path to Destruction bundle
Hi SteelVolt, Thank you for your valuable answers. :)

Would it be easy to mod a "skript" to the AI by country so that they pick their focii in a certain sequence?

This would allow easy alt-history scenarios with fantastic (but somewhat predictable) progress.

E.g. I want to play a single player campaign with a democratic Germany in a world where I know that US will turn facist and France will become RED.

Does the awesome ModTools that were introduced in the dev diaries allow to skript this easily?

Cheers (another 6 days to go). :):):)
 

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.201
  • Paradox Order
  • Hearts of Iron IV Sign-up
Hi SteelVolt, Thank you for your valuable answers. :)

Would it be easy to mod a "skript" to the AI by country so that they pick their focii in a certain sequence?

This would allow easy alt-history scenarios with fantastic (but somewhat predictable) progress.

E.g. I want to play a single player campaign with a democratic Germany in a world where I know that US will turn facist and France will become RED.

Does the awesome ModTools that were introduced in the dev diaries allow to skript this easily?

Cheers (another 6 days to go). :):):)

You could do exactly that by editing the list used in historical mode. A more cumbersome way is to set extreme weights so that the order you want becomes extremely likely. But I would recommend the first approach, setting it up as a mod and using "historical" mode.
As for mod tools, i will have to refer to @Havebeard.
 
  • 2
Reactions:

fellaz007

Second Lieutenant
46 Badges
Nov 17, 2009
121
155
  • Crusader Kings II
  • Hearts of Iron III
  • BATTLETECH: Flashpoint
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Stellaris: Leviathans Story Pack
  • Stellaris: Megacorp
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • BATTLETECH: Season pass
  • Stellaris: Lithoids
  • BATTLETECH: Heavy Metal
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Battle for Bosporus
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV Sign-up
  • Stellaris
  • Crusader Kings II: Way of Life
  • 500k Club
  • Stellaris: Digital Anniversary Edition
  • Semper Fi
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • For the Motherland
  • Hearts of Iron III: Their Finest Hour
  • Naval War: Arctic Circle
  • Supreme Ruler: Cold War
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Field Marshal
  • Stellaris - Path to Destruction bundle
You could do exactly that by editing the list used in historical mode. A more cumbersome way is to set extreme weights so that the order you want becomes extremely likely. But I would recommend the first approach, setting it up as a mod and using "historical" mode.
As for mod tools, i will have to refer to @Havebeard.
Great. Thank your for the extra info.