HOI4 - Together For Victory AI Update #4

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.200
  • Paradox Order
  • Hearts of Iron IV Sign-up
Greeting friends!

This will be the last of these before the release of Together for Victory, and unless I am to write one about a hotfix, the last one for the year.

This weeks tale from the trenches will actually be about one of the points in the changelog. Sorry about cheating like this for the last diary, but it was too good to leave out:
- Scary fix makes AI actually consider all target areas of enemy, in stead of one at a time. Should set pacific area ablaze when the time comes, and keep the invasions rolling.
  • Wow...so...way back in development before the invasion craft tech limited the number of divisions you could use for invasions, the AI sometimes had a tendency to set up A LOT of them. As a fix for this, that did do the trick in the general case, the AI would consider ONE area per enemy for invasion at a time, before doing another one. When I say area here, it is any enemy territory with land connection to all parts of itself...shitty description, so a couple of examples: Ostpreussen is a separate area from main Germany, which is its own area, so Germany initially consists of two areas. When/if they annex Austria, it becomes part of the main German area. Similarly, every single island is its own area.
At this point, I am sure you can see at least a few problems this could cause in the pacific. My hopes were that Japan and USA would invade each other, and the invasions would be small enough to happen often enough that this would not become a problem. However...when the invasion is to an island that has had its port taken over by someone else, the AI would not be able to plan an invasion to it, and thus not make any more invasions until that area was fully conquered...which was not a guarantee.
This restriction was lifted, and the scary part of this was letting the AI be potentially a lot more active. It has turned out that the invasion craft limits and tweaks to the front balancing balances this out really well.

This is a good example of how fixes to earlier problems can cause new ones further down the line as development progresses. This happens a lot in AI, and not rarely will the same symptom pop up over and over but due to new reasons under the hood.

So, moving on with more boaty stuff:

- Added a "pacific continent" to aid in AI prio.
- Added contininent prioritization for the AI with high scores to Europe and the Pacific, but low to Africa.
  • Calculating the value of a larger area is expensive, and the value of locations like the pacific islands depends less on what they contain in terms of buildings and resources and more about where they are located. By introducing scriptable priority for areas, which can be modified through script on a per country bases, it is possible to tweak where countries should focus and even base this on triggers. So, merry christmas, modders :)
This is also an important part in improving the AIs pacific activity, and is an extra part of reducing their African ditto.

- AI sets up a couple of fleets to be used for special missions.
  • The AI tries to prioritize naval regions based on a ton of variables, and in the end may miss out on covering some important stuff. By ear marking a couple of fleets for specialized missions, such as covering invasions, the AI is now better at not getting stuck waiting for fleets that may never come before being able to invade. It also steps up its general naval game a bit.

- Made sure that AI does not completely block itself when having multiple invasion orders against the same area but being unable to cover the regions for all of them at the same time.
  • The naval invasion AI tries to coordinate invasions against the same area, but forcing it to do this would make it never invade if it was unable to cover all necessary regions for all the invasions at the same time. This restriction was softened, so the AI will be more capable at getting stuff done. This one was hitting Japan hard when they wanted to navally invade south.

- Made AI better at supporting naval invasions by focusing on the next one to complete preparation.
* This one might seem either cryptic or obvious. Before the AI would just pick the top invasion on a list to focus on first, now it picks the one that is next in line to be done preparing.

- Tweaked naval invasion priority to make them more inclined to take islands (particularly with air bases) and home region.
  • Pretty much speaks for itself, particularly in the context of the Pacific theater.

- Made AI invasions scriptably more unpredictable.
  • While only a define for now, it should make life more interesting in singleplayer, with less hammering of invasions in the same location over and over. Also gives modders another thing to play with :)

- Stabilized AI invasion prio scores. Should result in invasions not swapping units around as much and randomly getting canceled.
  • Under the hood the AI has a priority score for every orders. The invasion score was allowed to depend on variables that shifted from day to day, such as preparation level. This would cause different numbers of units to be assigned to them over time, causing some really bad behaviour. Stabilizing this score has made the invasion AI a lot more stable and reliable.

That was more or less all the work that has been done to the naval AI. The changelog had more AI points in it, some really heavy and important stuff related to AI division design among other things. I really hope you will enjoy the DLC, and even if you don't get it, I hope all these fixes will increase your enjoyment of the game. And either way, I look forward to keep improving the HoI4 AI, and you can all look forward to more improvements being done.
 
  • 62
  • 27
Reactions:

philjd

Major
24 Badges
Apr 30, 2014
671
184
  • Crusader Kings II
  • Crusader Kings II: Conclave
  • Battle for Bosporus
  • Imperator: Rome - Magna Graecia
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
  • Crusader Kings II: Holy Fury
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Field Marshal
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Way of Life
  • Victoria 2: A House Divided
  • Victoria 2
  • 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
Looks like a fine improvement, well done guys.
 

WarDog

whatever
57 Badges
Aug 2, 2003
2.300
94
  • Cities: Skylines - After Dark
  • Rome Gold
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 200k Club
  • 500k Club
  • Cities: Skylines
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis: Rome Collectors Edition
  • Europa Universalis IV: Common Sense
  • Europa Universalis: Rome
  • Europa Universalis IV: Cossacks
  • Achtung Panzer
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Cradle of Civilization
  • Battle for Bosporus
  • For the Motherland
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • 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: Call to arms event
  • Hearts of Iron Anthology
  • Galactic Assault
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Europa Universalis III Complete
  • Iron Cross
  • March of the Eagles
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
Thank you! This DLC looks better and better. The AI improvements is IMO the most important ones for SP like me.
Can't wait to give it a try!
 
  • 4
Reactions:

Axe99

Ships for Victory
124 Badges
Feb 13, 2003
15.068
10.120
  • Europa Universalis IV
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Battle for Bosporus
  • Europa Universalis 4: Emperor
  • Stellaris: Necroids
  • Stellaris: Nemesis
  • Crusader Kings II: The Republic
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • Lead and Gold
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Ship Simulator Extremes
  • Sword of the Stars
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Pride of Nations
  • Rise of Prussia
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
Cheers for the DD Steelvolt, more excellent AI goodness :). Looking forward to seeing it in action in not very long at all now :). Great story from the trenches as well.

Greeting friends!
  • Calculating the value of a larger area is expensive, and the value of locations like the pacific islands depends less on what they contain in terms of buildings and resources and more about where they are located. By introducing scriptable priority for areas, which can be modified through script on a per country bases, it is possible to tweak where countries should focus and even base this on triggers. So, merry christmas, modders :).
....

- Made AI invasions scriptably more unpredictable.

Woot! More moddability is always good - Christmas comes early on Planet HoI :). That area-based priority system sounds very interesting indeed, I'm very much looking forward to playing with that, and I'll give that AI invasion predictability thing a good shake as well. I'm guessing the area priority thing only relates to land areas at the moment?
 
Last edited:
  • 1
Reactions:

BjornB

★Community Manager★
Administrator
Super Moderator
Moderator
82 Badges
Apr 2, 2012
4.848
15.602
  • Majesty 2 Collection
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Impire
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • For The Glory
  • March of the Eagles
  • Europa Universalis III Complete
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Ship Simulator Extremes
  • Sword of the Stars
  • Sword of the Stars II
  • Starvoid
  • Crusader Kings II: Sword of Islam
  • Ancient Space
  • Arsenal of Democracy
  • Cities in Motion
  • Cities in Motion 2
  • 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
  • A Game of Dwarves
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Teleglitch: Die More Edition
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
There will be "a proper DD" today as well. Coming up shortly!

I also want to point out that all changes mentioned in SteelVolts AI Dev Diaries are part of the free 1.3 Torch patch. Not DLC material, so you'll get this stuff no matter if you buy the expansion or not.
 
  • 13
  • 7
Reactions:

seattle

Field Marshal
44 Badges
Apr 2, 2004
4.993
2.280
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Tyranny: Archon Edition
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Expansion Pass
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Knights of Honor
  • Surviving Mars
  • Cities: Skylines - Snowfall
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Shadowrun: Dragonfall
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Prison Architect
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
  • Majesty 2
  • Crusader Kings II
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Knights of Pen and Paper +1 Edition
  • Cities in Motion
  • Majesty 2 Collection
  • Semper Fi
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Cities: Skylines
  • Pillars of Eternity
  • Cities: Skylines - After Dark
Everything sounds really great!
 

JCaesar78

Recruit
63 Badges
Nov 7, 2014
8
2
  • Europa Universalis IV: Pre-order
  • Semper Fi
  • Stellaris
  • Rome: Vae Victis
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Victoria 2: Heart of Darkness
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Victoria 2: A House Divided
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Imperator: Rome - Magna Graecia
  • Battle for Bosporus
  • Hearts of Iron IV: Expansion Pass
  • Victoria 2
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Third Rome
  • Stellaris - Path to Destruction bundle
  • Rome Gold
  • Europa Universalis IV: Res Publica
  • 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
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
excellent! many thanks for all the hard work! this is probably one of the best games ever made, totally addicted to it. sure it's not perfect yet but it's turning out to be an absolute masterpiece in my opinion. Just one question, I was wondering if you are planning to add more generals to country such as eg Italy... if I were to point out one of the few things Im not totally happy with is the lack of Generals for Italy...so many important generals missing (Rodolfo Graziani, Ettore Bstico, Mario Roatta, Alfredo Guzzoni, Junio Valerio Borghese, Italo Balbo to name a few). Compared to other major countries there's a lack of generals that sort of ruins the immersion when recruiting new generic ones especially in the late game when more armies are needed. Again not a criticism just a suggestion. Keep up the great work!
 
  • 2
Reactions:

Canacas

Sergeant
17 Badges
Feb 7, 2011
72
63
  • Crusader Kings II
  • Cities: Skylines Deluxe Edition
  • Hearts of Iron III
  • Hearts of Iron IV: Expansion Pass
  • Shadowrun: Dragonfall
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Cities: Skylines - Snowfall
  • Cities: Skylines - After Dark
  • Pillars of Eternity
  • 500k Club
  • Cities: Skylines
- Stabilized AI invasion prio scores. Should result in invasions not swapping units around as much and randomly getting canceled.
  • Under the hood the AI has a priority score for every orders. The invasion score was allowed to depend on variables that shifted from day to day, such as preparation level. This would cause different numbers of units to be assigned to them over time, causing some really bad behaviour. Stabilizing this score has made the invasion AI a lot more stable and reliable.

In 1.3, I think I have seen a bug regarding this a few times already, it also happened in Daniels stream when he plays facist australia. Daniel has taken over New Zealand making the entire common wealth his enemy. He is guarding new zealand with a single division in the north of the island. One of the common wealth nations successfully invade a province in the south of the island but immediately leaves as soon as they enter, although the entire south and north is only guarded by a single division.

To an untrained eye it looks like they do the naval invasion even tho it is not really a high priority anymore, and when its completed they immediately prioritize the forces to something else. Instead of continuing on the very successful invasion they just completed.
 
Last edited:
  • 1
Reactions:

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.200
  • Paradox Order
  • Hearts of Iron IV Sign-up
In 1.3, I think I have seen a bug regarding this a few times already, it also happened in Daniels stream when he plays facist australia. Daniel has taken over New Zealand making the entire common wealth his enemy. He is guarding new zealand with a single division in the north of the island. One of the common wealth nations successfully invade a province in the south of the island but immediately leaves as soon as they enter, although the entire south and north is only guarded by a single division.

To an untrained eye it looks like they do the naval invasion even tho it is not really a high priority anymore, and when its completed they immediately prioritize the forces to something else. Instead of continuing on the very successful invasion they just completed.

Thanks for heads up. We will keep our eyes open :)
 
  • 3
Reactions:

Cpack

Field Marshal
38 Badges
Jan 16, 2003
3.000
716
  • Cities: Skylines Industries
  • Cities: Skylines - Natural Disasters
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Green Cities
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Apocalypse
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Field Marshal
  • Stellaris: Megacorp
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Campus
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Battle for Bosporus
  • Cities: Skylines - After Dark
  • Europa Universalis III Complete
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Semper Fi
  • 500k Club
  • Cities: Skylines
  • Hearts of Iron II: Armageddon
  • Cities: Skylines - Snowfall
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
I posted it in today's DD, but it better fits here:

1) Not sure if misread that, but is the AI behaviour gone, where Italy f.e. send lots of divisions (50 in one game) to pacific/china theatre if allied with japan and let his own provinces less defended (also for planes and ships)?

Also other way round, where you can see lots of Japanese planes and divisions in Europe theatre.....

2) I found out and read a lot about problems with land based naval bombers (only one attack, no real impact) against ships in seazones. Are there any improvements?
 
  • 1
Reactions: