HOI4 - Together For Victory AI Update #4

  • Victoria 3 - Sign up now!

    The journey begins, sign up now and get a special in-game item when the game is released.


  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning
  • Crusader Kings II Expansion Subscription

    Subscribe to the CK II Expansion and enjoy unlimited access to 13 major expansions and more!


Showing developer posts only. Show all posts in this thread.

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:

BjornB

★Community Manager★
Administrator
Super Moderator
Moderator
82 Badges
Apr 2, 2012
4.841
15.489
  • 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:

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:

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.200
  • Paradox Order
  • Hearts of Iron IV Sign-up
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)?
I cannot give a binary yes or no as an answer to questions like this, but I have boosted countries prio to cover their own stuff more than shipping around to help others. So it should certainly be better, but things like that probably still happen to some extent.

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?
Sorry, I'm not sure what this relates to.
 
  • 3
Reactions:

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.200
  • Paradox Order
  • Hearts of Iron IV Sign-up
@SteelVolt

Great job Carl. You've been working your little cotton socks off, and we're all thankful. :p

In your 1.3 hands-off games, how do the Pacific and Norway tend to fare?

I see Norway invaded quite often, and the pacific tends to see action, though if USA does not get involved it is primarily between Japan and Australia, where Japan has the most potential for invading. Japan sometimes face a too hard fight if they end up in war vs Allies before taking China, and thus avoids attacking USA.
 
  • 4
  • 2
Reactions:

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.200
  • Paradox Order
  • Hearts of Iron IV Sign-up
All the work on AI seem great and I look forward too it... as an old fellow AI programmer I know how difficult it can be and how one tiny thing can leave a ripple effect you never expected.

I have not seen anything mentioned about the Air AI in the patch notes or diskussions, I do think this could need some love too. The AI seem to use the Air war fine while they have one enemy and one front but once the big war breaks out the AI often seem to hide away their air wings in strange places. Like Germany and Italy sending their entire air fleet to Japan while Japan sending theirs to Europe. All sitting in a few large airbases doing almost nothing.

I'm not sure if this is just some random things in my games or not, but it seems as if Germany do have problem using its air-force against the Soviets as well as defending against allied bombings at the same time, it seems to get a bit confused.

Would be nice to hear if any work have gone into how the AI handles its air-wings?

While a couple of bugs in the air AI has been taken care of, it has not been a focus for this particular update. It is being looked at, however, and it WILL be more so for future updates.
 
  • 3
Reactions:

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.200
  • Paradox Order
  • Hearts of Iron IV Sign-up
@SteelVolt Do you know if there is any current way to get an AI country to offer peace (aside from the Soviet-Finnish war)? If not, will you be working on that in the future? I'd really like a way to end WW2 earlier without having to conquer the world.

There is a white_peace effect that you can script in mods if you want to. That is what is being used through an event between Finland and Soviet. I suppose it is something we can potentially consider for future development.
 
  • 2
Reactions:

SteelVolt

Technomancer
2 Badges
Aug 4, 2014
735
4.200
  • Paradox Order
  • Hearts of Iron IV Sign-up
It's mentioned also in this thread.
http://forum.paradoxplaza.com/forum...re-often-in-multiplayer.981003/#post-22071754

In my current game, I have 100 Nav assigned to north sea for naval bombing mission. In 10 month, they found nothing and damage or sink a single ship and also never lost any plane. But my subs are attacking lot of convoys and are also involved in naval battles. So it seems that it is sensless to assign naval bombers to naval missions.....I'm talking only about land based ones.

Oh, I see. You may see some improvement to that, but we have bigger things brewing for the air AI in the future. As in more thorough improvements.
 
  • 2
Reactions: