Stupid AI Italy attacks no matter what

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

Icedkk

Corporal
32 Badges
Sep 10, 2018
38
33
  • Dungeonland
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Cities: Skylines - Green Cities
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV
  • Cities: Skylines Deluxe Edition
  • 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
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Res Publica
  • Hearts of Iron IV: La Resistance
If you go "Oppose Hitler" as Germany and bring back the Kaiser, Italy always attack Yugoslavia and gets into fight against France and Czech, because of the guarantees.

There is basically no Strength Check in AI, if he is stronger than the coalition against it.
It simply just attacks because, it gots claims via focus.


Even in a game as Germany, I guaranteed the Yugos, to see if Italy still attacks them. I had double the amount of Army than Italies Army.
However it still attacked and suicided.

How hard to implement a Strength Check modifier into the game, in order to not DOW onto suicide?

Here is the fucking code for it:

if my_strength(army, navy, air are combined) <= enemy_strength + guaranteer_1_str + guaranteer_2_str + ... :
DO NOT FUCKING ATTACK!!!!


U can even add there a boldness modifier which calculates your own strength with an additional bonus of 10% or 20%.

BUT ITALY ATTACKING YUGO + FRANCE + CZECH + GERMANY is fucking STUPID. Just STUPID.
 
  • 10Like
  • 2
Reactions:

sekelsenmat

Colonel
22 Badges
Aug 10, 2009
889
937
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines Industries
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
What's the point of a check that doesn't take those factors into consideration then? Pretty damn pointless it seems to me.

Wouldn't this fix prevent Japan from attacking Philipines and getting into war with the USA, so also breaking the game?

It could even prevent Germany from attacking Poland (due to France + UK backing).

I think the easiest solution really would be for France to simply don't guarantee Yugo at start. The actual text of the agreement between France & Yugoslavia can be found online and it didn't state anywhere that France was obliged to defend this country.

They did some change in 1.9.something that the French guarantees are removed after something happens (Munich agreement?), or France does some focus X, but in ahistorical France will take ages to get there, Munich might never happen and Italy does their crazy War with X focuses quite early...

This same thing that you experience also happened to me just now in my game. Italy quickly lost North Italy, but it making progress in Africa and I saved them from Yugoslavia by attacking and capitulating it. And Mosley took over in the UK and allied Italy, so now the UK will probably start helping Italy.
 
  • 1
  • 1
Reactions:

Askorti

Major
13 Badges
Oct 13, 2018
780
3.677
Wouldn't this fix prevent Japan from attacking Philipines and getting into war with the USA, so also breaking the game?

It could even prevent Germany from attacking Poland (due to France + UK backing).

"Take into consideration" doesn't mean stop the AI from declaring in every instance. I do not think that it should be beyond Paradox' capability to introduce enough nuance to this to have the cake and eat it too, or, in other words, have the AI declare wars when it should, and refrain when it shouldn't.
It should just take a bit of work, and that's something that is in short supply, I guess.
 
  • 3
  • 1
Reactions:

kettyo

General
11 Badges
Feb 11, 2017
2.429
1.260
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
No it's not that easy. Sekelsenmat's point is very valid. You can very easily get yourself on the other side that countries will not attack because of the guarantees. Also making the AI correctly assessing the potential enemies and their strenghts in a longer run is VERY hard in a game of such volatility.
 
  • 2
  • 1Like
  • 1
Reactions:

sekelsenmat

Colonel
22 Badges
Aug 10, 2009
889
937
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines Industries
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
"Take into consideration" doesn't mean stop the AI from declaring in every instance. I do not think that it should be beyond Paradox' capability to introduce enough nuance to this to have the cake and eat it too, or, in other words, have the AI declare wars when it should, and refrain when it shouldn't.
It should just take a bit of work, and that's something that is in short supply, I guess.

Then propose a logical algorithm. Sure you could make a whitelist like: if Germany attack Poland regardless, but then in ahistorical you would end up with a boring game where noone attacks anyone.
 

kettyo

General
11 Badges
Feb 11, 2017
2.429
1.260
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
I think the easiest solution really would be for France to simply don't guarantee Yugo at start. The actual text of the agreement between France & Yugoslavia can be found online and it didn't state anywhere that France was obliged to defend this country.

Or a middle ground solution that starting guarantees are removed but France gets a 'Little Entente ties" idea so that they can guarantee them regardless of world tension if they want.
 
  • 1Like
Reactions:

Diakonen

Second Lieutenant
21 Badges
Aug 10, 2018
154
162
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Battle for Bosporus
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Colonel
  • Stellaris
  • Mount & Blade: With Fire and Sword
  • Victoria 2
  • Europa Universalis IV
  • Crusader Kings II
  • Semper Fi
  • Hearts of Iron III Collection
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III
  • For the Motherland
I was playing a game yesterday with a similar issue. Ww2 started early when czech denied sudeten, with France and Yugo and eventually Romania joined in and when france joined allies it was looking bad for the Germans. Italy joined axis but it really did not help. I capitulated UK and France as fascist sweden in 1940 and thought this would give Germany a break. Then China joined allies, commie-china joined comintern. Japan joins axis. Axis is in war with soviets... here coms the genius move from Germany: declare on Poland, Belgium and Netherlands. Poland joins Comintern. Germany has no troops in benelux and not enough to cover polish border. They are dead before 1941.

One would think that the AI would do a strength check or at least have troops at the border on the country they declare war against.
 
  • 2
Reactions:

sekelsenmat

Colonel
22 Badges
Aug 10, 2009
889
937
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines Industries
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Synthetic Dawn
  • Hearts of Iron IV: Death or Dishonor
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - After Dark
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • Europa Universalis IV
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Sword of Islam
Another point is that arguably in real history some countries did in fact declare on everyone recklessly and got destroyed, like Germany and Japan.

And it was pretty bad for their allies, so at least you can feel like Hungary must have felt or something :D
 
  • 1
  • 1Haha
  • 1Like
Reactions:

kettyo

General
11 Badges
Feb 11, 2017
2.429
1.260
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
Another point is that arguably in real history some countries did in fact declare on everyone recklessly and got destroyed, like Germany and Japan.

Yeah but that were all due to miscalculations. These all seemed reasonable at the given time.

But in game they open second fronts without any doubt, and third and fourth... :)
 

Harin

General
53 Badges
Jun 8, 2012
1.800
4.035
  • Crusader Kings II
  • Hearts of Iron IV: By Blood Alone
  • Battle for Bosporus
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Season pass
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall - Revelations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV
  • Hearts of Iron IV: No Step Back
  • Victoria 2
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Pride of Nations
  • Mount & Blade: With Fire and Sword
  • Europa Universalis IV: Common Sense
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Together for Victory
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Supreme Ruler 2020
  • Sword of the Stars
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
The OP's point seems so obvious at first, until you really try to fix it.

If you try to apply logic to the situation in 1936 then there would have been no war. Germany, Italy, and Japan had no logical reason to believe they could accomplish their goals. If you try to apply a comprehensive strength comparison, then the Allies would declare most of the wars, but as democracies, they cannot.

I can see why the developers took the easier route of forcing wars. Without that, the Big War may never kick off.

Maybe the developers could introduce a two step DoW procedure. First there is the Focus, Guarantee, or Justification. Second and BEFORE hitting the DoW button, the declaring nation must have sufficient manpower on the border of all nations that could possibly be drawn into the war by the DoW. That percentage could be 50%, 75%, or 110%. Whatever works.

Of course, even this simple "solution" is much more complicated than it first sounds. How do you deal with islands, like Australia? How do you handle situations where there are no shared borders, but your coastlines are exposed to the new enemy? How does the UK declare war when it's empire touches almost every country across the entire globe? Minors may be affected realistically, but game wise, many customers love to play minors.

The solution to this problem does not seem to be easy at all.

One solution that may exist, and it is a bad solution, is for the developers to double down on the path they have already taken; specifically, force the wars and then go further and force peace in specific foreseen circumstances so countries like Italy do not perform like the OP described. Of course this is a major rabbit hole, and like all rabbit holes, it is bottomless. No matter how much the developers try to foresee and fix, the players will most likely outrun the developers ability to code.

A much more complicated process might be to complicate DoWs. Instead of a simple DoW, their is a purpose to the DoW. For example, DoW on France, may have the purpose to take back some border tiles. In that case, before the DoW, the Declarer would need to have XX% of manpower/strength compared to the defender on the border.

On the other hand, if Germany DoWs France and the purpose is to take Paris, then Germany would need 75% or so of the manpower/strength France has in the country. Strength in the colonies might not count.

This can get really complicated. What is strength? The IC cost of all equipment plus some constant to apply to manpower? Does stockpiled equipment count? What about factories and resources? War support? What is a specific purpose and how does it not get exploited by players to unintentionally break the game?

Does anyone see a simple solution that could actually work across the entire globe for all nations and factions? I keep seeing complications.
 
  • 3Like
  • 2
  • 2
Reactions:

Daniel_Vanciae

Recruit
43 Badges
Mar 20, 2020
4
4
  • Age of Wonders: Shadow Magic
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: La Resistance
  • Battle for Bosporus
  • Hearts of Iron IV: By Blood Alone
  • Hearts of Iron IV: No Step Back
  • Europa Universalis IV: Res Publica
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Crusader Kings II
  • Victoria: Revolutions
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • Warlock: Master of the Arcane
  • Warlock 2: The Exiled
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
I have to admit that that's pretty darn stupid; almost as stupid as Portugal deciding to declare war on Nationalist Spain (very fast suicide) or the Soviet Union (utterly imbecilic and seriously annoying for the Allies).

If you go "Oppose Hitler" as Germany and bring back the Kaiser, Italy always attack Yugoslavia and gets into fight against France and Czech, because of the guarantees.

There is basically no Strength Check in AI, if he is stronger than the coalition against it.
It simply just attacks because, it gots claims via focus.


Even in a game as Germany, I guaranteed the Yugos, to see if Italy still attacks them. I had double the amount of Army than Italies Army.
However it still attacked and suicided.

How hard to implement a Strength Check modifier into the game, in order to not DOW onto suicide?

Here is the fucking code for it:

if my_strength(army, navy, air are combined) <= enemy_strength + guaranteer_1_str + guaranteer_2_str + ... :
DO NOT FUCKING ATTACK!!!!


U can even add there a boldness modifier which calculates your own strength with an additional bonus of 10% or 20%.

BUT ITALY ATTACKING YUGO + FRANCE + CZECH + GERMANY is fucking STUPID. Just STUPID.
 

SophieX

Major
May 9, 2014
558
505
This can get really complicated. What is strength? The IC cost of all equipment plus some constant to apply to manpower? Does stockpiled equipment count? What about factories and resources? War support? What is a specific purpose and how does it not get exploited by players to unintentionally break the game?

I agree; and want to add "strength" is a complicated sum of
- things you can "measure" in some way; like IC. MC, equipment, manpower in divisions etc
- things you cannot "measure" in any way; like: leadership, military doctrines, morale, bravery etc.
with an unknown "weight" for all these factors listed in this two enumerations just above.

So comparing "strength" by only counting the numbers of soldiers/divisions is a saying which lacks of imoportant factors, I think.
 
  • 2
Reactions:

Vlad123

Lt. General
1 Badges
Feb 7, 2015
1.669
1.290
  • Crusader Kings II: The Old Gods
On europa universalis 4, this factor now works quite well, so much so that the AI rarely attacks you at the wrong moments, indeed a small example is often scary:
Io Boemia (game start), allied with Poland-Lithuania. Poland Lithuania declares war on a small state, allied with 3 small statarelli. These 4 statarelli could very well beat them alone without effort. But he wanted to call me, whose help was: NOTHING! I just plundered all the provinces that I could plunder and occupied the few still free, with my help at most it reduced the length of the war by 1-2 weeks, maximum one month: NOTHING in 400 years of play.
But better a prudent AI that calls the world against ULM which has only 2700 troops, against its alliance of 127k troops, than a 5,000 man AI declares war on a France with 100k men, like Hoi4.To this we can also add that in one of my matches, Portugal joined the UK, a few MINUTES before the allies capitulated (YES! The UK was at 60% capitulation!); so yeah hoi4 AI is damn stupid.
 
  • 1
Reactions:

Harin

General
53 Badges
Jun 8, 2012
1.800
4.035
  • Crusader Kings II
  • Hearts of Iron IV: By Blood Alone
  • Battle for Bosporus
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Distant Stars
  • Shadowrun Returns
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Deluxe edition
  • Age of Wonders: Planetfall Premium edition
  • Age of Wonders: Planetfall Season pass
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall - Revelations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Stellaris: Leviathans Story Pack
  • Europa Universalis IV
  • Hearts of Iron IV: No Step Back
  • Victoria 2
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Pride of Nations
  • Mount & Blade: With Fire and Sword
  • Europa Universalis IV: Common Sense
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Stellaris: Digital Anniversary Edition
  • Hearts of Iron IV: Together for Victory
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Supreme Ruler 2020
  • Sword of the Stars
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
On europa universalis 4, this factor now works quite well, so much so that the AI rarely attacks you at the wrong moments, indeed a small example is often scary:
Io Boemia (game start), allied with Poland-Lithuania. Poland Lithuania declares war on a small state, allied with 3 small statarelli. These 4 statarelli could very well beat them alone without effort. But he wanted to call me, whose help was: NOTHING! I just plundered all the provinces that I could plunder and occupied the few still free, with my help at most it reduced the length of the war by 1-2 weeks, maximum one month: NOTHING in 400 years of play.
But better a prudent AI that calls the world against ULM which has only 2700 troops, against its alliance of 127k troops, than a 5,000 man AI declares war on a France with 100k men, like Hoi4.To this we can also add that in one of my matches, Portugal joined the UK, a few MINUTES before the allies capitulated (YES! The UK was at 60% capitulation!); so yeah hoi4 AI is damn stupid.

Good point @Vlad123. The developers could go with the AI that calls the world against the declarer of war, but in HOI4, a game of five to ten years, that creates its own problems. In HOI4, there is rarely a peace. That could mean that the declarer would be at war with many nations for the entire game. This would make the first aggressive move of a nation also its last, as now it is at war with many nations that will take the entire game to complete.

I think the main point you make is that it should be possible to fix the problem the OP, yourself, and others have brought up.

I agree.

I just believe it is not going to be as simple as I first thought it would be.