AI abandoning its own country and sends troops off to siege down far away, unimportant land.

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

Tempscire

First Lieutenant
24 Badges
Mar 4, 2018
298
472
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Third Rome
  • Stellaris
  • Europa Universalis 4: Emperor
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Cradle of Civilization
  • Age of Wonders III
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Magicka
I had another look in the AI terrain evaluation and there seems to be bug. The value the AI assigns to each terrain depends on the dice roll malus applied.
The values are:
No malus 1.4
Enemy malus 1 1.54
Enemy malus 2 1.68
Own malus 1 1.12
Own malus 2 0.84
Therefore in the unmodded game the AI should engage on open terrain if it has an advantage of 1.7/1.4~ 20% and on a defensive mountain fort if it estimates roughly equal strength (1.7/1.68). But there is a bug that the AI does not use the factor of 1.4 on open terrain but a factor of approximately 1. Therefore it will mostly engage only if it has a significant advantage of 70% or on forts with defensive terrain. If one now reduces the acceptable balance to say 1 it fixes the problem with engaging on terrain with no penalty but for the other types of terrain the evaluation is off. As the AI still thinks it is safer to engage with a malus of 1 than with no malus and it vastly overestimates itself on defensive terrain. For example when defending in Hills you have an advantage of approximately 15/13~15% but the AI thinks it has an advantage of 54% which leads to suicidal behaviour albeit on favorable terrain.
Less linear would be better. The Mamluks and Qara might actually win more than 1% of the time. Muscovy might not form Russia once in a while. There are dozens of examples of smaller countries that just disappear because the AI evaluation goes: you are stronger -> I shall wait for you to full siege me and send the peace deal.
99% win rate:
Brunei vs. Kutai
Majapahit vs. Sunda
Uesugi vs. everyone in Japan
Morocco vs. Tlemcen
Songhai and Mali vs. Western Africa
Kongo vs. Central Africa
Timurids vs. Vassals
France vs. England despite naval superiority

Sure, there are reasons some of these tags should have a higher win rate to keep history somewhat accurate. I've seen the Mamluks lose to the Ottomans after they declared the war and I had just taken a 100% peace deal and eliminated 90% of Ottoman troops. It's actually just so frustrating.

I agree that this would be great but I am not sure making the AI more willing to fight or even significantly improving the AI could improve all of these examples. One of the reasons is if you improve the AI you improve both sides of the war and some of these are almost impossible to win if both players have equivalent skill. Especially if the weaker side has a very low province count and no or only badly placed forts one does not stand a chance. For example Sunda vs. Majapahit is just unwinnable in my opinion (all assuming equal skill of course and excluding allies). You have no forts and only five provinces to recruit from. I would even say that the chance of AI Sunda winning is higher right now as they sometimes siege race and can get lucky. I think well placed defensive forts are one of the best ways to improve defensive AI behaviour, especially considering the bug discussed above. The Mamluks for example also suffer from badly placed forts at game start (and the AI currently almost never changes their fort setup) as you only need to siege two dryland forts to get to Cairo from Anatolia. Sina and Tarabulus al-Sham are some decent postions. But even a well defended larger country can only compensate a moderate advantage in troop strength and I am doubtful one could create an AI which could change this without screwing the offensive AI.

For the Mamluks in particular the best thing would probably be allowing the AI to diplo vassalize allies even if they have ally attitude. This would improve Mamluk expansion a lot. Also a from a historical perspective I think the Mamluks should have a decent chance of fending off the Ottomans in the average EU4 campaign especially considering that the Portuguese almost never show up early enough in the Indian Ocean to threaten Mamluk trade.
 
  • 1Like
Reactions:

Laurent1944

Colonel
43 Badges
Oct 11, 2017
1.015
68
  • Crusader Kings II
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Third Rome
  • Stellaris: Apocalypse
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Stellaris: Megacorp
  • Europa Universalis IV: Golden Century
  • Imperator: Rome
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Europa Universalis 4: Emperor
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • 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 IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
A big issue with the AI is that it never builds new forts, or so it seems to me, and some big powers, especially the Ottomans, never upgrade their forts in my own experience, meaning them very weak in late game. Also if you take the capital of an AI it will often move to a province without fort, and not build one.

So in the end it is longer to conquer an OPM with a level 9 fort than taking 20 provinces to the Ottos.
 

Orioniys

First Lieutenant
24 Badges
Apr 17, 2013
273
282
  • Crusader Kings II
  • Magicka
  • Europa Universalis IV: Call to arms event
  • Cities in Motion 2
  • 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 III: Royal Edition
  • Crusader Kings III
  • Imperator: Rome
  • Surviving Mars: Digital Deluxe Edition
  • Age of Wonders: Shadow Magic
  • Age of Wonders III
  • Surviving Mars
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Pre-order
  • War of the Roses
  • Victoria 2
  • Europa Universalis IV
For the Mamluks in particular the best thing would probably be allowing the AI to diplo vassalize allies even if they have ally attitude. This would improve Mamluk expansion a lot. Also a from a historical perspective I think the Mamluks should have a decent chance of fending off the Ottomans in the average EU4 campaign especially considering that the Portuguese almost never show up early enough in the Indian Ocean to threaten Mamluk trade.
I also had similar thought, I tried making Mam more likely to get Diplomat AI. But unfortunately it didn't work, it seems like Diplomat AI is actually worse at diplo vassalization. And with any other AI personality it's kinda random. AI is having a issue sending vassalization request, so it's most likely bugged.


A big issue with the AI is that it never builds new forts, or so it seems to me, and some big powers, especially the Ottomans, never upgrade their forts in my own experience, meaning them very weak in late game. Also if you take the capital of an AI it will often move to a province without fort, and not build one.

So in the end it is longer to conquer an OPM with a level 9 fort than taking 20 provinces to the Ottos.
It's a new issue in 1.30, something is wrong with how AI upgrades forts, changing AI setting have no effect. So we opted to write separate script as temporary solution.
 
Last edited:

Tempscire

First Lieutenant
24 Badges
Mar 4, 2018
298
472
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Third Rome
  • Stellaris
  • Europa Universalis 4: Emperor
  • Imperator: Rome
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Golden Century
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Cradle of Civilization
  • Age of Wonders III
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Pillars of Eternity
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • Magicka
I also had similar thought, I tried making Mam more likely to get Diplomat AI. But unfortunately it didn't work, it seems like Diplomat AI is actually worse at diplo vassalization. And with any other AI personality it's kinda random. AI is having a issue sending vassalization request, so it's most likely bugged.
Which diplomatic actions the AI wants to take is governed by its attitude towards the country and as far as I know the AI never vassalized countries it has the ally attitude towards. To do so they need an attitude like friendly or protective. The AI will still do so but it depends on some factors like number of vassals it already has then it changes attitude to protective towards one of its allies it can vassalize and then it improves relations if necessary and demands vassalization. I do think that it is almost always better to have a vassal than an ally (expect maybe if your vassals have high liberty desire) and therefore it would be better if the ally attitude would also allow vassalization.
You can actually change this by using the set_ai_attitude command in an event. But this changes the ai_attitude only for a short period of time (~1 month) so you need to fire it multiple times but then the AI will demand vassalization.
A similar situation which is most likely a bug is that having 200 relations and 80 trust will overwrite the AI attitude to friendly even for vassals which means they will never declare independence even when having 100 liberty desire as they do not have the rebellious attitude necessary to declare the independence war.
 
  • 1
Reactions: