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

Europa Universalis IV - Development Diary 19th of July 2022

Welcome to this week's Dev Diary! Today I'm back to talk about some of the changes we've made to the AI for 1.34.

National Ambitions

For a long time, there has been code and script for the AI to be aware of the conditions of its missions and decisions and try to achieve some of them. But because of various issues this has not had a significant impact.

For 1.34, we’ve made sure the AI takes many of these conditions into account, especially those related to conquests. We also made the AI pursue cultural unification, depending on government rank. These changes will work together with the AI’s more organic desires to shape its ambition and strategy. The result is an effect which is just noticeable in terms of AI behavior, but compounds over time to create AI empires - sometimes historically reminiscent - that provide a real challenge to players who continue into the late game.

We were a little worried that this might cause games to all look the same, but our hands-off overnight games look arguably even more varied than before.

Here are a bunch of recent hands-off 1821 maps, only slightly cherry-picked:
num1.png num2.png num3.png num4.png num5.png num6.png
It makes us happy and proud to see the AI form historical countries such as Germany, Italy and Qing.

Typically, these AIs balance off each other nicely. If your plan as a player is to “Kill Ottomans early, then chill”, you may find that you’ve just aided some other AI in taking their place as your end-game boss. Admittedly though, a downside of this more opportunistic AI is less clean borders.



Peace Negotiation

What started out as an investigation into why AIs often left OPMs alive in peace deals, turned into a slightly bigger project.

When the AI is winning a war, and making demands, it has a bunch of preferences that it tries to balance against each other for an optimal peace deal. This is unlike when it is losing, where it will only care about objective measures such as war score cost. However, when the AI is winning, but receives an offer, it has previously relied on very coarse-grained expressions for whether the offer matches its preferences:
  • “Does not want parts of the offer”
  • “Requires X to be part of the offer”
  • “Wants other concessions than gold”
This has given clever players a little too much room to outsmart the AI.

In 1.34, the second expression in particular has been reworked, to allow the AI to express its preferences in more detail. Let’s take a look at an example:

no_candar.png


Here, I was trying to get out of a bad situation by giving away my ally’s land, but Nassau wouldn’t have it. It’s not that they don’t want Candar to be released - note the green thumb - it’s that they’d much rather have me release some of my own land. Unlike the old “Requires X to be part of the offer”, this new condition can not be circumvented by completely filling the peace deal with less important treaties.

As a consequence of this, we’ve also been able to loosen up the “Does not want” condition by making the thumbs green in more cases.

One more subtle but important change is that when an AI warleader considers a separate peace with individual enemies, it will be more lenient. This helps expanding AIs take more stuff, while also reducing the risk and cost of war, compared to just waiting for the enemy warleader to sign a deal. It will also make it more risky for players to start a war where they rely too heavily on their allies.

As a related side note, we’ve fixed a crash related to the PRESS_THEM_FURTHER moddable define. If enabled, it makes your war allies who have been promised land get mad at not getting enough land, even if the war leader doesn’t take anything for itself.



Independence Wars

independence.png


Given that we’re doing a Scandinavia-themed update, it seemed appropriate to do something about subjects’ willingness to declare independence. We haven’t changed a lot, but subjects will overall be a bit bolder when it comes to declaring independence. In particular they may now do it while at war, if at 100% Liberty Desire, so no more constant wars to pacify your subjects. There’s not much more to say about it, but we can for example see independent Sweden a bit more often, as well as a collapsing Timurids and occasionally breakaway nations in the Americas.



War Evaluation

tunis_reasons_before.png

(But Tunis will accept once I start the war)

When the AI considers starting a new war, it will look at basically the same information as the player can see in this window to figure out who will join on either side. Unfortunately, this has had a couple of bugs, related to the “Attitude towards enemies” and “Distant war” reasons potentially changing as the war starts and additional countries join. This has made both players and AIs declare suicidal wars.

These inconsistencies have now been fixed, where we could find them. But the problem remains when predicting acceptance for recursively called allies (such as allies of the Holy Roman Emperor when attacking a member state). Because of this, already in 1.33, the player interface doesn’t try to tell you whether those countries will join or not. But the AI still tried to “look at the checkmark”. In 1.34, the AI will simply assume that recursively called countries would all join. This will fix the “Burgundy suicides into Liege” bug.



Passive Subjects

Players with Rights of Man are able to set their subjects’ military focus to “Passive” and “Defensive”, but these focuses have been a bit wonky for some time. We fixed a number of bugs with these for 1.34, and there is one I would especially like to share.

In very simplified terms, this is how Passive was originally coded:

Code:
Objective #1: Avoid foreign territory.
Objective #2: Avoid enemy armies on home territory.
Objective #3: Avoid attrition (with a big margin if possible).

But then single-province subjects with big armies would stay and take attrition (especially if another country is also standing there), as well as when enemy armies are approaching. So the objectives were reordered:

Code:
Objective #1: Avoid enemy armies on home territory.
Objective #2: Avoid attrition (with a big margin if possible).
Objective #3: Avoid foreign territory.

And it turns out the AI knows you can’t take attrition while fighting a battle… So “passive” subjects would sometimes actively seek out enemy armies on foreign territory in order to avoid attrition!



Other

There have been a number of improvements to for example army and navy handling. This Dev Diary is already long enough, but the biggest bug worth mentioning is when the AI would just lock its armies in place near the coast, while its navy was too afraid (often irrationally) to come and pick them up. This easily caused e.g. Denmark/England/Spain not making themselves useful in wars.

Historically, many AI bugs have been caused late in the development cycle of a patch, perhaps because they often need time to be found. Right now, we’re quite happy with the state of the AI in our internal builds so we will try not to repeat that mistake by stirring things up before 1.34 releases.



Patch Notes

Here are roughly the AI-related patch notes so far. This is still WIP and a more final and curated list will be released in connection with the update as usual.

Buildings
- AI will now properly calculate when to construct Docks based on a multitude of factors such as sailor percentage, idea group choices, capital position and more.
- Fixed that AI sometimes deleted all forts right after a bad war.
- Fixed another case of AI deleting forts unnecessarily.
- Fixed bug that 'Conqueror' ruler personality made AI delete all/most forts.
- AI less keen to build fort in capital (though still preferred). This will somewhat reduce the fort slog in Central Europe.

Budgeting
- Changed AI budgeting algorithm to be more flexible. Fixes e.g. small CNs sometimes not colonizing when they should.

Geopolitics - Declare wars
- Fixed some cases of AI declaring war over provinces it can't/won't take.
- Made AI less likely to declare war on island nations it lacks the transports to invade.
- Fixed bug that revolutionary AI could declare war on coalition target with any cb, thinking coalition members would join.
- AI is no longer blocked from declaring independence when at war.
- Fixed bug that sometimes made aggressor AI erroneously think HRE allies would refuse to join when attacking HRE minors.

Geopolitics - Missions and Decisions
- Added AI weights to mission trees which make them now more considerate which mission they want to strive for and how much (for context related reasons).
- AI now understands and tries to achieve army_size and army_size_percent triggers in missions.

Geopolitics - Other
- Fixed bug that AI couldn't get hostile towards, and hence rarely attacked, others’ vassals and some other subjects.
- AI is now better at evaluating when to annex/integrate a subject.
- Fixed bug that catholic AI colonial nations avoided expanding into overlord's Tordesilla regions.
- Reduced AI avoidance of having interest in provinces that are vital to allies.
- AI Duchies are now permanently interested in provinces of their culture, Kingdoms their entire culture group, and Empires also all provinces on their border.

Peacemaking
- Fixed some issues with AI peace acceptance 'wants other concessions than gold' and 'does not want anything else', causing AI to often leave OPMs in peaces.
- Fixed bug sometimes preventing AI from taking the last enemy province.
- AI warleaders are now more happy to make separate peaces with non-cobelligerents.
- AI will unconditionally surrender in more cases.

Army
- Fixed one bug that made AI send armies far away instead of defending home.
- Made AI more likely to reinforce adjacent battles.
- Improved AI attrition handling. Should get both less attrition and less confused behavior.
- Fixed bug that AI helped allies with rebels even when at peace.
- AI overlord now treat subjects' rebels like their own in more cases.
- Fixed bug that made AI ignore flanking when evaluating battle.
- Fixed multiple cases of AI subjects being stupid when set to Passive or Defensive.
- Increased preferred size of AI armies, especially late game.
- Increased AI desire to disrupt sieges, especially with high progress.
- Improved AI logic for when to abandon sieges.
- Made AI armies prioritize coordinated offensives more.
- Made army AI try to stay close to enemy armies when it has nothing else to do.
- AI somewhat more likely to defend homeland.
- Improved AI for consolidation before battle.
- Fixed instance of AI armies going back and forth when sieging.
- AI vassals no longer delete exiled armies if they can get home.
- Fixed issues with autonomous sieging and rebel suppression missions.
- Fixed case of AI armies canceling movement every other day

Navy
- Fixed some issues with AI naval invasions.
- Made AI better at understanding when a naval invasion risks being intercepted.
- Fixed bug that made AI often unassign general when naval invading.
- Fixed yet another case of AI naval invasion stalling forever.
- Made AI fleets consider troops further away when protecting straits.

Trade Company
- Fixed bug that AI sometimes wouldn't ever core Trade Company provinces.
- AI will no longer accidentally remove trade companies by creating states.

Cheats
- Fixed bug that AI could add provinces to HRE when emperor, even if not a member.
- Fixed bug that AI could use Break Alliance for Favors diplomatic action with Leviathan disabled.

That's it for today. I hope you found this Dev Diary interesting!

Next week my colleague @Pavía will be showing all the new Monuments that will be added in the 1.34 Update, along with some game balance and changes we want to share and discuss with the community, coming also for free in the update.
 
  • 132Like
  • 68Love
  • 11
  • 3
  • 2
Reactions:
It seems like AI manages each stack as an individual entity. Is there any chance to get it start "thinking" in terms of army groups which move together, protect each other (e.g. sieging stack and protecting army nearby), reinforce battles? Also, when there are a lot of small AI armies in the same area they tend to act chaotically, while it would make sense for them to form an army group and act in a coordinated manner
It has at least two abstractions that do this. One is for mini "splinter armies" that do little sieges next to the main army's siege, or just try to join up with the main army after being recruited. The other is an abstraction for coordinated attacks against forts (EDIT: I mean against hostile sieges of an AI-controlled fort). They will be a little bit more prominent in 1.34 than in 1.33.

But overall, your point is completely valid and it would be nice if the AI thought more in terms of army groups. Unfortunately it might be too big of a change to make at this point, especially since it would risk causing bugs in a hundred other places, which could take months to find. :/
 
Last edited:
  • 4
  • 2Like
Reactions:
For each country being added to the war (1), each country already in the war (2) updated its relations with every other country in the war (3).
A "updating its relations with" B includes, among other things, counting the number of war enemies they have in common; which was unfortunately done by doing a linear search (4) for B among the war members of each war, for each country on the side opposite A (5).
Of course, we only get O(N^5) if the countries are spread out over both sides, but otherwise it's still O(N^4)...

So what was the fix?
 
Please reorder the priorities for AI constructing buildings. Easily the worst part of the game right now is deleting regimental camps, shipyards, docks and churches when playing wide. Or add building deletion to the macro builder
 
Please reorder the priorities for AI constructing buildings. Easily the worst part of the game right now is deleting regimental camps, shipyards, docks and churches when playing wide. Or add building deletion to the macro builder

IMO this is much better solved with improved UI than improved AI.

What the AI "should" do from a building choice/optimization perspective is a bit more subjective. The AI doesn't/can't blob like the player, so options like courthouses are far less beneficial. For most nations, using navy is a meme and the AI should probably build a lot fewer shipyards. However, I'm not as clear that it should build fewer regimental camps in favor of pure workshop/manufactory. Maybe it could prioritize workshop/manufactory on high value goods and regimental camps or manpower buildings on grain/cattle, but ultimately what is "correct" won't apply universally between TAGs/idea groups/etc, while the AI is universal.

Thus we will never get building distributions in conquered provinces that we want consistently. I'm not sure that's even a good design goal, but it seems impossible regardless. Making the UI not absolutely terrible for removing unwanted buildings would alleviate most of the problem in this context.
 
  • 2Like
  • 1
Reactions:
It has at least two abstractions that do this. One is for mini "splinter armies" that do little sieges next to the main army's siege, or just try to join up with the main army after being recruited. The other is an abstraction for coordinated attacks against forts. They will be a little bit more prominent in 1.34 than in 1.33.
Yeah, I've seen a few of these "splinter armies" lately, they seem to act quite sensibly and I like this!

However I've also seen AI armies splitting in half and going into different directions in the vicinity of enemy, thus simplifying stackwipes instead of trying to avoid them.

Also, AI doesn't manage to join fleets together, thus greatly simplifying beating it in naval battles. In particular, it seems to avoid adding transport ships to battle stacks which is a deadly mistake. In general, fleet AI is perceived as weaker than army AI, and I think this is caused by fact that armies are often hidden from player under FoW, but fleets often act in the open.

But overall, your point is completely valid and it would be nice if the AI thought more in terms of army groups. Unfortunately it might be too big of a change to make at this point, especially since it would risk causing bugs in a hundred other places, which could take months to find. :/
Isn't AI (at least, part of it) shared between all Paradox games? Because when I played Stellaris I've seen it having similar troubles with coordinating actions of separate fleets.

As for risk of bugs, I see a few possible solutions:
  1. Allow both old and new versions of modified AI code path to coexist, so it's possible to select between "old" and "new" AI at run time via setting. In this case you can ship new AI turned off by default so that enthusiasts can test it and report bugs.
  2. Keep development of new AI in a branch and release it separately in a beta channel, so that interested people could install it, try out, report bugs, and if things are too bad, switch back to mainline version. I assume there are not many developers working on AI code on permanent basis, so keeping some changes in a separate branch should not result in significant conflicts.
  3. Make AI pluggable, so that modderns could create alternative AI engines, and ship modified AI as a separate plugin.
 
  • 1Like
Reactions:
I really like the news that Burgundy will not suicide into Liege anymore. However, there were a couple of more issues with respect to the inheritance (i.e. automatically joining the HRE sometimes, the ability to declare a normal war on one's overlord if one chose the PU solution, the emperor randomly switching between granting the great privilege and not granting it? Will there be any changes to that? And is there hope of Philippe le Bon not being a general at game start?
 
  • 1
Reactions:
AI changes are massively difficult and massively important at the same time. Glad to see some work put into this, but I will wait for some hotfixes before trying them ;)
 
  • 1Like
Reactions:
After seeing more and more Crimean-succession level of game-bending mechanics from mission trees my only consolation was that the AI didn't do them. Now that's gone. In this case I'm not sure "improved AI" could be considered beneficial for the game -- increased railroading, more required metagame knowledge, game-bending or game-breaking mechanics that exist outside of the standard rules, and decreased transparency about a tag's strengths and weaknesses.

Other changes look good. :)
 
  • 1Love
Reactions:
I know but does it makes sense that your friend suddenly hates you without any warning?
Germany and the USSR were allied in 1939 but still hated each other. You assume allies are always friends and I say your assumption is not correct. I regularly desire provinces my allies currently control. That I am allied now is because it it convenient for me to do so, not because I am their lifelong friend.
 
  • 2
  • 1Like
Reactions:
Is it possible that we can get some changes to historical & random lucky nations as well?

I know that lucky nations are a highly contentious topic, and its previously been said that lucky nations are here to stay. While you can disable the mechanic or set it to random, it will always be the same nations if set to default. The list is currently:
  1. Castile (before year 1700 and Spain does not exist) / Spain (before year 1700 and Castile does not exist)
  2. Ottomans (before year 1700)
  3. Muscovy (if Russia does not exist) / Russia
  4. England (if Great Britain does not exist) / Great Britain
  5. France
  6. Austria
  7. Prussia (after year 1700)
  8. Netherlands
  9. Portugal (before year 1700)
  10. Jianzhou (if neither Manchu nor Qing exist)/ Manchu (if Qing doesn't exist)/ Qing
  11. Brandenburg
  12. Sweden (before year 1700)
  13. Poland (If Commonwealth does not exist) / Commonwealth (before year
The first eight nations from the top of the list will get priority on acquiring the Luck modifier, therefore, at the beginning of 1444, the lucky nations are (unless you pick one of them):

1. Castile, 2. Ottomans, 3. Muscovy, 4. England, 5. France, 6. Austria, 7. Portugal, and 8. Jianzhou.

Finally, Brandenburg will be lucky if any of the aforementioned countries are player-controlled.
----------------------------------------------------------------------------
However, I was wanting to suggest a minor balance changes by including/ adding more that would play well with them in the game.

For example, Japan would be a historical lucky nation we see in reality, but why should Japan become a lucky nation if it usually forms in the game, controls the Japanese islands, and survives? Because of this, I think nations that do historically develop into empires, but might have limited success doing so, like the original idea behind including lucky nations should be added, such as:
  • Holland (if Netherlands does not exist) / Netherlands
  • Ardabil (before year 1700 and Persia does not exist) / Persia (before year 1700 and Ardabil does not exist)
  • Transoxiana (before year 1700 and Mughals does not exist) / Mughals (before year 1700 and Transoxiana does not exist).
I think by changing this we might see some games where both the Mughals and Persia come into fruition more regularly, thus giving a better representation of the Islamic Gunpowder Empires in the game.

1658440441180.png


In the test games above I see that the Netherlands forms twice (maybe 3 times if that single province in Southern Germany is them).

Brandenburg forms a decent sized country once, and is reduced to a opm once, surviving no other times, and Prussia never forms.

Finally, it looks like in the test game that either the Mughals or Persia pretty consistently forms. I know that we can't quite tell without more information or actually observing each time-lapse, however I think given the other nation in the area is dominating, (which I think is the Mughals) Persia (if its forming) should have a lucky nation modifier to counteract this.

I would also really love it if the # of lucky nations from the start was either increased to 10 or 12 so that we can see a lot more of these nations actually take hold. Especially if you're not playing as a lucky nation yourself as Brandenburg seems to get wiped out pretty easily.
 
  • 3
  • 1
Reactions:
Germany and the USSR were allied in 1939 but still hated each other. You assume allies are always friends and I say your assumption is not correct. I regularly desire provinces my allies currently control. That I am allied now is because it it convenient for me to do so, not because I am their lifelong friend.
Germany was going to attack the USSR anyways for the Lebensraum, the non-aggression pact meant that none of them would fight the tother but tit didn't become an alliance, that's something that exists in HoI4 but not EU4, and the relationship between the the West and the USSR was gradually deteriorating, it's not like something that suddenly happened like the AI would do as soon as they call me into their wars in EU4.

I also ally Spain and Austria as Milan for some support but I'll betray them as soon as I complete my conquests of the desired regions, and France suddenly rived me as Navarra and made me quit because they somehow bypassed the Pyrenees without any warning of a naval invasion.
 
Last edited:
Here are a bunch of recent hands-off 1821 maps, only slightly cherry-picked:
I’m disappointed that Prussia still didn’t naturally form in these photos. It never forms currently, and the Teutons were given so much attention this upcoming dlc. Prussia was such a relevant country during this era and it’s sad to never be able to interact with it as a separate country
 
  • 1
Reactions:
Dev's, how on Earth can those overnight AI pictures be considered as successful? Consider the following:
1. Spain is overpowered for Colonization of the Americas in total. In 2 of the samples, Spain has even taken NW North America to include Alaska. In 2 of them, Spain has nearly all of the Americas painted yellow. NERF Spain for colonization. And Australia - Spain takes it 4 times (way too many). Dev's, you gotta throttle back Spain's colonization pace/breadth.
2. Portugal is also over-buffed for Americas colonization, just not as much as Spain, but - in 2 of the samples, Portugal has taken NW North America to include Alaska.
3. England is UNDER-buffed to colonize the modern-day USA east coast of North America. Only a single sample has a more realistic England colonization, and another sample has England taking only Canada, and a third sample has a tiny 2-3 province area of NA, but all the others have ZERO presence of English colonies in USA/Canadian area.
4. The Elephant in the Room: USA is not forming up. Is that just once that it did? Think about why. England is wonky right now for Colonization of the Americas. You need to get England up to current Spain level for colonization (for one thing, then England takes Australia also), and have a forceful AI event once England has a good chunk of North America (especially USA east coast) that the USA forms, no matter how powerful England is at the time. You need to overpower other colonizers of North America with England (with France a decent 2nd best) and then trigger a fracturing event with USA coming out of it.

I just can't see success with all the Yellow of Spain and puke green of Portugal painting the map in such large proportions.
 
  • 8
  • 1
Reactions:
please for game ending time expand to 1836

I could get behind the game being expanded until July 29, 1830. The end date of the Second French Revolution when the French people made it clear that they weren't going to abandon the ideals of the revolution and France adopted the tricolor as its national flag.

However, each start date for Paradox games often occurs at an important juncture before/after where Europe is at war or unbalanced, that's why the end date is probably not going to change:

CK 2/ CK 3 ends in 1453 which is linked to the fall of Constantinople & the last year of the 100 year's war.

EUIV starts in Nov 11, 1444 because a day earlier Poland would have a PU over Lithuania & Hungary. Furthermore, the Treaty of Tours was signed in May triggering a break in the 100 years war. Also, the further you go back the less likely major nations would be to form.

I'm not exactly sure why 1821, the death of Napoleon at St. Helana is the end date. I suppose it represents a grace period in European history, making it a good point to end at. Other than the fact Napoleon's death, in a way, marks a symbolic end of a European era.

Victoria starts up in 1836 since she's inaugurated queen the following year and also for other reasons.

HoI IV starts when Europe heats up again, i.e. Germany enters the Rhine, Berlin Olympics, Spanish Civil War etc...

----------------------------------------------------------------------------
Edit:

Furthermore, the further you go over the century the more you justify adding a new institution after Industrialization.

I'm still not sure why embracing industrialization gives you +15% Tax mondifier and a + 25% National Manpower modifier without including a +15-20% productive efficiency given that's what industrialization is mostly about? I assume the tax modifier represents getting more profit in the form of tax from productive businesses, however this with the manpower are probably just meant to help late game expansion.

----------------------------------------------------------------------------

Speaking of which, the price of the trade good "Gems" is interesting and I've done some independent research. They have a base price of 4.00, become 5.00 because of the Faceting event +25%, then the New World Diamonds event triggers causing them to fall by -50% or 3.00 base price.

I was trying to investigate this since this seemed oddly low, for instance look at the trade goods and prices overtime:

Trade Goods and Price Change Events:

www.reddit.com/r/eu4/comments/huvefq/trade_goods_and_price_change_events/?utm_medium=android_app&utm_source=share

Gems end at the same price as tropical wood!

This seems like a total oversight, but I learned that Gems dropping by -50% actually is pretty historically accurate, this website quotes a passage looking at the history of Gem prices:

"Father Joseph de Acosta tells us that when he returned from: America in 1587 there were on his ship “two chests of emeralds; every one weighing at the least foure arrobas” (i.e. a total of 200 pounds). To show the effect on the price, he states that soon after the conquest a Spaniard in Italy showed a jeweler an emerald…"

“…of an excellent lustre and forme: he prized it at a hundred ducats: he then shewed him another greater than it, which he valued at 300 ducats. The Spaniard drunke with this discourse carried him to his lodging, shewing him a casket full. The Italian seeing so great a number of emeralds, sayde unto him,‘Sir, these are well worth a crowne a peece.’”


www.palagems.com/ball-gem-prices

This is absolutely insane!

As Europe was flooded with gold, silver and precious gems from the new world their prices dropped massively. Leading to hyperinflation across the continent. This occured as a result of the Infamous Price Revolution.

en.m.wikipedia.org/wiki/Price_revolution

In reality, Gems act like they're suffering from the Price Revolution still while other trade goods remain fairly stable overtime.

----------------------------------------------------------------------------
Edit:

It's a shame that there's no stabilization of Gem supply event, increasing their base price +25% or back to 4.00.

I don't think there's any justification for why Gems are still equal in price to tropical wood or naval supplies by the end of the game however.

Gems were still favored by the nobility and the elite, so while their prices decreased they still had some intrinsic value to people.

----------------------------------------------------------------------------

Overall, The Price Revolution isn't reflected through ingame events making inflation harder to fight or causing the price of other resources to decrease for a few decades or so like the Eruption of Huaynaputina or The Little Ice Age given its historical importance. However, implementing a price revolution event would take time and caution so that it doesn't ruin the midgame!

Taking/ Extending loans for 0.20 inflation for 30-50 years rather than 0.10 inflation would be a start towards implementing the event.

I know this was a tangent, but I wanted to share something I learned recently about the price revolution.
 
Last edited:
  • 3
  • 2Like
  • 1
Reactions:
The only thing that is missing is to have some sort of fix for when colonial nations expand outside of their colonial region. It's a bit strange to see for example a Colonial Caribbean have land in NE colonial region as well as land in Mexico, and Brazil. The solution should be that if colonial nations expand into other regions that are not connected, these should become a new colonial nation (the alternative is for it to be handed over to the overlord until the 5 province minimum is reached in order to create a colony). Overlords could also the option to split colonial nations if one of their colonies have land in two colonial nations.
 
  • 2
Reactions:
Let's avoid talking about events from way after the game's timeframe, please... it doesn't apply (context and all), and is therefore off-topic.
 
Sure!
The issue is that the AI in a sense gets "addicted to" its budget surplus, and then doesn't want to cut it. So to force them to start colonizing, you need to bump their surplus by more than the cost of a colonist from one budget evaluation to the next (every couple of months). If you raise subsidies (or their economy grows) slowly, they will just get accustomed to a higher surplus.

So: give them a huge subsidy (let's say 5 ducats just to be sure) for a couple of months to start them colonizing. Then you can remove the subsidy and they will most likely keep colonizing. There's a small chance you have to redo it after the colony is done, but usually they'll keep going with a new colony.

Just to clarify: this is a workaround for 1.33. Whereas 1.34 fixes the bug.
Thanks, giving 10 ducats made them start one colony. However, I couldn't make them start using second colonist, even with 15 ducats (they hired advisor, army, ships, and have 9 ducats surplus)
 
  • 1Like
Reactions:
Yeah, I've seen a few of these "splinter armies" lately, they seem to act quite sensibly and I like this!

However I've also seen AI armies splitting in half and going into different directions in the vicinity of enemy, thus simplifying stackwipes instead of trying to avoid them.

Also, AI doesn't manage to join fleets together, thus greatly simplifying beating it in naval battles. In particular, it seems to avoid adding transport ships to battle stacks which is a deadly mistake. In general, fleet AI is perceived as weaker than army AI, and I think this is caused by fact that armies are often hidden from player under FoW, but fleets often act in the open.


Isn't AI (at least, part of it) shared between all Paradox games? Because when I played Stellaris I've seen it having similar troubles with coordinating actions of separate fleets.

As for risk of bugs, I see a few possible solutions:
  1. Allow both old and new versions of modified AI code path to coexist, so it's possible to select between "old" and "new" AI at run time via setting. In this case you can ship new AI turned off by default so that enthusiasts can test it and report bugs.
  2. Keep development of new AI in a branch and release it separately in a beta channel, so that interested people could install it, try out, report bugs, and if things are too bad, switch back to mainline version. I assume there are not many developers working on AI code on permanent basis, so keeping some changes in a separate branch should not result in significant conflicts.
  3. Make AI pluggable, so that modderns could create alternative AI engines, and ship modified AI as a separate plugin.

Lots of interesting stuff here.
- AI splitting armies has been somewhat addressed in 1.34 by making the AI "reference army size" a bit bigger.
- You're completely right that the AI keeps transports away from its main battle fleet. This could kind of make sense in some scenarios (e.g. battle fleet locks enemy fleet in port, while transport fleet does its thing), but usually it was more like the opposite (transport fleet doesn't trust battle fleet to stay put so doesn't dare do its thing). So I actually changed this up for 1.34. Now, most of the time the AI will merge its battle and transport fleets and it will multitask.
- There is no common AI code in our engine worth mentioning. You'll see similarities between the games for a number of other reasons:
- * They try to solve the same kinds of problems in the same kinds of games.
- * We have regular meetings between the AI programmers to share ideas and insights.
- * In particular the fleet AI of EU4 and Stellaris may have been designed by the same person. (Please don't think I'm saying it's because this person "did the same thing wrong". Multi-agent coordination is probably the single hardest thing to do right in PDS AI).

Your ideas 1 and 2 would help with reducing user impact, but would not necessarily reduce the development cost. 3 is a promising idea IMO, but would have a huge development cost to set up. So it's probably not for EU4.
 
  • 5Like
  • 5
Reactions: