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

Doomdark

Chief Creative Officer
Paradox Staff
61 Badges
Apr 3, 2000
5.435
11.356
  • Sword of the Stars II
  • Leviathan: Warships
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Naval War: Arctic Circle
  • Victoria: Revolutions
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Ship Simulator Extremes
  • Sword of the Stars
  • Knights of Pen and Paper +1 Edition
  • Supreme Ruler 2020
  • Starvoid
  • Teleglitch: Die More Edition
  • The Showdown Effect
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Warlock: Master of the Arcane
  • Warlock 2: The Exiled
  • War of the Roses
  • Prison Architect
  • Europa Universalis III
  • Arsenal of Democracy
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Dungeonland
  • A Game of Dwarves
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • For The Glory
  • For the Motherland
  • Gettysburg
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Impire
It's Thursday and time to dole out another Dev Diary to the hungry masses. As promised, this one is about defensive AI behaviour. One of the main issues with the land military AI in HoI3 is its generally aggressive nature. It performs well enough when it has the initiative, but cannot handle dynamic retreats. In essence, it tries to defend everything, to the last man. This is especially visible during Barbarossa, where the Red Army will simply get wiped out and never stand a chance of turning the tables. We have taken several steps to fix this issue:

First, the AI is much better at detecting potential pockets along the front, and withdrawing from them if it does not have the overall front initiative. Take a look at the screenshot of Northern Finland/Kola for an example of this; the Red Army is withdrawing troops from a province that risks getting cut off.

Diary02_PocketWithdrawal.jpg

Secondly, we have added a new stance called "Withdraw". This stance analyzes the front and pulls back from provinces if it will shorten the line. However, there are exceptions to the rule; it will attempt to dig in at river lines and fortified provinces. The stance is also useful for players who want to conserve their forces while slowly pulling back.

Diary02_WithdrawStance.jpg

Thirdly, the AI will maintain a secondary line with reserve troops, about three provinces behind the front. Damaged forces will be rotated out when worn down enough, and fresh troops brought in if available. Additionally, the forces in the secondary line can quickly be thrown into breaches or key battles. The proportion of kept reserves depends on the AI stance. If blitzing, it will use fewer reserves than if it is defending.

Diary02_SovietSecondaryLine.jpg

Last but not least, the AI will now realize when a battle is lost before its troops actually shatter, and withdraw to the best neighbouring provinces.

The net effect is quite impressive. In fact, the beta testers are now clamouring for an initial organization penalty to Soviet forces, because Germany has a hard time pushing the Red Army back (much less cutting it to pieces) even with the full cooperation of the Axis minors.

Defensive AI is just one of the AI areas that has gotten new algorithms. I will talk more about the AI in later diaries, but next week's entry will be about the new and shiny OOB browser! Stay tuned.

Diary02_ReservePositions.jpg
 
First! Looks awesome! Glad to hear about Barbarossa being improved.
I'm sure I'll love the "Withdraw" stance, especially in '44.
 
Wonderful! This seems to be a major improvement in ai behavior. Looking at the screenshots I wondered, if mobile units like armor or motorized are kept in reserve with a certain priority? Would make sense, as these units can get to the front quickly, trying to stop breakthroughs.
 
Looks amazing. Hopefully the USSR can actually stand up to the German attack now, though I still wish you all the luck in the world to get the balance right. We don't want the Germans running into a brick wall at the border and the Soviets in Berlin in 1942 either.
 
Sounds promising. I have no doubt that it will be a great improvement over the Vanilla.

However, looking at the last screenshot got me worried. Look at the possible breakthrough near Holobyl! On the other hand, I like the fact that it seems that both armoured reserve (on the right side of the screen) and southern front units are trying to remedy the situation. It seems that northern reserve units are also moving to the gap in the frontline. Nonetheless, the stack of units near Kostopol look rather passive.

EDIT: Oh, and will terrain influence AI logic, too? AI should recognise the modifiers associated with mountains etc.
 
I see all of that improves the AI a bit, but I'm not convinced it's the best possible...

AI interface should include, for a more elastic game play, an option that excludes a lower HQ and its units from AI control without the need of detaching that HQ. It misses the antipartisan stance. It misses the option of giving (e.g.) a defensive stance to a lower HQ while upper level is on attacking stance.
 
Wow, I really like that.

Would be interesting, If the Defender AI take the chance (while retreating) to make itself pockets and cut enemy troops of, if the attacker advances to fast.
 
Spoiling attacks would be nice:
  • To prevent pockets from getting closed while units are retreating.
  • To slow down overwhelming attacks. These are possibly suicidal, so should use less valuable divisions.
 
Brilliant! The last screenshot though, as Cybvep has reported, shows that the Soviet AI is not taking care of its defense properly... Holoby is wide open for attack, and so is Kostopol, for example. Also, there still are huge stacks of units massed along the border...
 
Well, looks like a must-buy again...
 
How does available intel affect all this, or does the AI have a "no fog of war feature" ? Bad Intel levels = potentially very bad decision ? This would be realistic and very cool :)
 
how does the AI determine which units to keep in reserve? is it just random or does it give thought to speed, softness, defensiveness or the type of units ?

It prefers fast units, especially motorized and mechanized infantry.
 
If you make your units "withdraw" how far will they usually go back? Will they just make a line where the majority of troops are? Or will they make everyone go back to a certain point? How will the AI know where the line needs to be? example, if you are fighting in Russia as Germany and you are losing and you withdraw, could the AI decide the best line is just east of Berlin or will it know where to stop?
 
If you make your units "withdraw" how far will they usually go back? Will they just make a line where the majority of troops are? Or will they make everyone go back to a certain point? How will the AI know where the line needs to be? example, if you are fighting in Russia as Germany and you are losing and you withdraw, could the AI decide the best line is just east of Berlin or will it know where to stop?

It will tend to stop at rivers and other natural defensive lines.
 
If you make your units "withdraw" how far will they usually go back? Will they just make a line where the majority of troops are? Or will they make everyone go back to a certain point? How will the AI know where the line needs to be? example, if you are fighting in Russia as Germany and you are losing and you withdraw, could the AI decide the best line is just east of Berlin or will it know where to stop?

I guess it will try to get to the nearest possible line of defence, e.g. a river or a group of provinces with forts.

EDIT: Crap, Doomdarked.

EDIT2:
It prefers fast units, especially motorized and mechanized infantry.
Is the choice of units hardcoded or fast units added by mods will be considered, too?