EU4 - Development Diary - 27th of February 2018

Good day all. Tuesday rolls around as it often does and we're back with another Dev Diary for Europa Universalis IV. Today we'll talk about 2 things: Improvements to the Naval AI and the new National Ideas of the various Irish Earldoms.

Firstly the AI. For this I will pass the mic to the living legend among AI programmers @Chaingun

#####

Hello, I am Chaingun aka. Skynet, although my real name is Petter (non-Swedes feel free to pronounce as Peter). Today’s dev diary will put the lens on what kind of new AI bugs (and occasionally WAD behavior) you may expect from the 1.25 update accompanying Rule Britannia.

The main [AI] focus of 1.25 has been to sort out the less than ideal naval behaviors. Some of you may have the perception that France transporting all their troops to an island in the Pacific is a recent thing, though in fact the AI’s logic has always permitted that to happen. It has been showcased far more frequently beginning when @Gnivom fixed overseas war declarations, due to the increased frequency of AI troops transport attempts overseas.

This overall situation is interesting because it highlights some of the many perplexities of game AI development, of which I would like to recap:

  • Fixing an issue can make the AI worse indirectly because of another latent issue, as the naval transport situation illustrates. Another example would be reducing the AI’s siege army sizes to reduce attrition when it doesn’t understand how to distribute cannons in their armies.
  • Fixing an issue can make the AI worse because we actually create another issue by breaking something.
  • A symptom often has multiple causes. An example is the famous sleeping army bug which is in very general terms can be explained as the AI getting into an external or internal state it cannot handle, resulting in all the commands it attempts (if any) being invalid.
  • A cause can have multiple symptoms that seem entirely disconnected or otherwise have very far-fetched causal dependencies. Ottomans falling behind massively in tech due to AI refusing to invade a rebel held island (due to having fewer transports than rebel regiments times a constant) would be an example.
Game AI programming is not a recommended job if you don’t like hearing how stupid you are on the forums forever afterwards not tweaking for their pet issue when working on a fixed time schedule. The line between bug and feature is thin indeed.

Returning to transport issues; in 1.25 the naval invasion AI is constrained from moving more than 50% of their troops “abroad”, where abroad is defined as a different landmass on a different continent, and army divisibility is not subject to said restriction (so if France does just have one army, it may be found in South America all the same). However, this is just the naval invasion logic… the land army AI may still decide to walk across Eurasia with all their armies for obscure reasons. It’s something I would like to rectify in the future if I get time for it.

Another big problem with the naval AI of previous patches is that it’s simply extremely slow in transporting troops. This issue turned out to be complex, and a number of sub-issues were identified and dealt with to various degrees:

  • There were several bugs where AI fleet and/or an army awaiting transport actually would be forever stuck until reload or even after.
  • The AI can now actually split a fleet if not all transports are required.
  • Sailors had been rebalanced to actually matter for some countries. Nobody had taught the AI this, resulting in many large countries having 0 sailors all the time, in turn leading to fleets spending most of their time in repair. As this was a surprise to me as well, and the issue is highly complicated to fix, the AI may now cheat on sailors by conjuring them out of thin air if they run out. This allows seamlessly working towards fixing the sailors handling without the naval AI being utterly handicapped in the meantime.
  • The AI’s transport fleet (of e.g. Spain) would often be found sailing around in Indonesia or some other far away place, taking years to respond to anywhere else. For Great Britain, this was even worse as the warships that were needed to defend against invasion partook in said expeditions. A fairly intense rework in how the structure their fleets has been made as detailed in the next paragraph.
Initially, when I set out to improve the AI’s fleet response times, I thought it would be a matter of having fleets based in appropriate ports around the world. Unfortunately, the AI (and neither do human players) have enough ships for this. Even the largest colonizers in the world can at most field a couple of hundred warships and transports. Splitting up warships lightly can therefore be disastrous.

The solution settled for has been to make the AI place the bulk of its warships into a Home fleet, which is forbidden from venturing far from the home coast, and does not contain any transports. Because it does not contain transports, it will never be busy transporting troops. This behavior is conservative, but conservative behavior is better for AI in practice. Europeans will not attempt to challenge Ming with a large fleet of heavy ships, they do however pose a token challenge to someone attempting to land troops on their shores.

So were these changes enough to make the AI a formidable force at sea then? Astute players may have noticed the AI barely built any ships whatsoever. During Christmas, the AI’s economy was tweaked to build far more warships, force limit buildings, and float less money. It was bloody perfect for a while with the Ottomans fielding 1.5 million men. Much later, new army maintenance costs came into the picture later as a surprise wrecking AI economic balance, so the 1.25 release may have regressed in this regard. Still, it should be better than it was on the naval front.

The implication of this rework on the whole makes the AI a bit more capable at naval stuff. Its micromanagement is still terrible, and skilled players will still be able to play “lure the fleet away” tactics to invade Great Britain with ease. Players using house rules or otherwise not exploiting AI behavior may however find some challenge in making naval invasions sometimes where previously they would not.

It’s worth some amount of extraposition explaining why the human player will always beat the AI as it’s coded in EU4. The crux is, the AI in Paradox games is using a fixed manual coded strategy. The extent to which is changes its behavior in response to what a human opponent does is limited to the exact tactics pre-programmed by the human author. Merely the fact the AI will not change is enough for the human to pick counter-strategies that are very effective against whatever the AI is doing, whereas they can not go into the same extreme degree of specialization against another human opponent.

Lastly, let me state I’ve been here since the Autumn on EU4 as a consultant (I was working with PDS full time until around 18 months ago), but I am being reassigned from EU4 to SECRETPROJECT, still at PDS, where I have freedom to create many new and wondrous AI bugs, or maybe even let the AI create the bugs itself, as any intelligent being would.

That’s all for now.

#####

Cheers Chaingun. Next up we'll look at New National Ideas for the Irish. Ireland is one of those places that could honestly be divided up but we are satisfied with the setup we have reached in 1.25. The following National Ideas have been either added or amended, with credit to @macd21 who made considerable contributions to these:
  • Leinster
  • Kildare
  • Clanricarde
  • Tyrone
  • Ulster
  • Maccarthy
  • Ormond
  • Faly
  • Tyrconnell
  • Repurposed group set for united Ireland
With this the entire Island's nations have their own unique National Ideas, with a formable Ireland having their own set. Let's pick 3 to look at: Meath, Kildare and Ireland

MTH_ideas = {
start = {
fort_maintenance_modifier = -0.2
global_garrison_growth = 0.25
}

bonus = {
leader_siege = 1
}

innefectual_overlords = {
global_tax_modifier = 0.10
"The English government in Dublin and their Irish Parliament puppets have been weakened as result of England's many conflicts in the Hundred Years War and the War of the Roses. Their influence no longer holds any sway over the true lords of Ireland, and now is the time to strike out for our independence."
}
foreign_nationals = {
diplomatic_reputation = 1
"In 1487, the Irish lord John de la Pole, Earl of Lincoln, invited a host from Burgundy to Dublin to support the crowning of Yorkist English pretender Lambert Simnel. Ireland would make for a fine base of resistant against the English mainland, and forever keep the would-be occupiers at bay. We may also one day gain powerful supporters, such as the Kingdom of Spain."
}
mth_parliament_of_ireland = {
stability_cost_modifier = -0.10
"When the English were expelled from Dublin, they left behind an institution called the Parliament of Ireland. Meant as an instrument to subjugate us, we will instead use it to organise our efforts to resist a return of English rule."
}
mth_englishtown = {
culture_conversion_cost = -0.15
"Once known as Irishtown and a ghetto for native Irish in Dublin, we have turned the tables. The district is now relegated to the Englishmen who remain, there being forced to integrate into the new order."
}
mth_the_cess = {
global_tax_modifier = 0.1
"The Cess is a special tax for the purpose of maintaining the extraordinary garrisons required to keep our towns safe. The people resent the tax, but understand its necessity."
}
mth_trinity_college = {
adm_tech_cost_modifier = -0.1
"Ireland lacks an institution of higher learning. A Catholic university in Dublin would put Ireland on the academic map."
}
mth_siege_mentality = {
defensiveness = 0.20
"The people of Dublin and Meath have had to endure many sieges through the years. We understand how to survive them and how to resist them."

KID_ideas = {
start = {
global_unrest = -1
defensiveness = 0.20
}

bonus = {
prestige = 1
}

kid_lords_of_ireland = {
diplomatic_reputation = 1
"Through strategic marriages and alliances with both Gaelic and Anglo-Irish families, the rulers of Kildare maintain a degree of influence throughout the island of Ireland unmatched by any of their rivals. Such is their power that successive English monarchs appointed them as their Lords Deputy over the island."
}
kid_ear_of_the_king = {
improve_relation_modifier = 0.2
"Despite repeatedly betraying the crown, the FitzGeralds of Kildare talk their way out of trouble, returning home with a pardon and a promotion."
}
kid_silken_finery = {
land_morale = 0.10
"When Thomas FitzGerald renounced his allegiance to the English king, he did so accompanied by his retinue of armoured gallowglasses, who were bedecked with silken fringes on their helmets. When Thomas wavered in his course of action, an Irish bard recited to him a poem, calling upon the Silken Lord to avenge his father’s death."
}
wizard_earl = {
technology_cost = -0.05
"The 11th Earl of Kildare spent many years abroad, studying and learning much of the world. When he returned home, he brought with him a keen interest in alchemy. Such was his knowledge that his neighbours referred to him as the wizard earl, for he was thought to have magical powers."
}
the_curragh = {
cavalry_power = 0.1
"The wide open plains of the Curragh have long been used as a gathering place for armed forces, but also make it a popular site for horse racing, and later, horse training."
}
kid_architects_of_nation = {
build_cost = -0.1
"The ancestral seat of the FitzGeralds at Carton House is grand, but our fortunes have improved of late. We have drawn up plans for an even grander residence, that could serve not only as a family seat but also as the Earl's court."
}
kid_royal_irish_army = {
global_manpower_modifier = 0.1
"The forces sent by the King of England to subdue the Irish can easily be repurposed by the Peerage. By simply offering better pay the Earldom of Kildare could command a sizable force of English soldiers."


irish_ideas = {
start = {
land_morale = 0.1
trade_efficiency = 0.1
}

bonus = {
legitimacy = 1
republican_tradition = 0.5
}

irish_endurance = {
shock_damage_received = -0.1
"Decades of disease and famine have mostly pushed the English invaders from our lands. Meanwhile, the Irish people grow all the stronger from their harrowing experiences. Yes, there is no stronger man on God's green earth than an Irishman!"
}
the_clanns = {
same_culture_advisor_cost = -0.2
"The Clanns of Ireland make up a strong political body for land and family management. In smaller families, the family elected chieftain is in charge of maintaining the family and protecting their lands. Land and leadership is passed through the family electorate system of Tanistry. From the royal clanns the symbolic high king of Ireland is elected, creating a bond of union between the Irish families."
}
more_than_irish = {
global_unrest = -2
"Heartily did the Norman invaders embrace the Irish traditions; so much so that it was said they put on the airs of being 'More Than Irish'. The very nature of our culture is contagious, and for centuries yet will men embrace our way of life."
}
loyal_catholics = {
papal_influence = 1
global_heretic_missionary_strength = 0.02
"While the English may toil and spin in the winds of the Reformation, the Irish people as a whole are determined to remain under the wing of their lord The Pope."
}
ire_abundant_harvests = {
global_trade_goods_size_modifier = 0.10
"Now that the greedy, neglectful English landlords have been driven out of Ireland, our farmers are finally able to manage their produce in peace. Blights and crop failures are addressed as matters of critical state importance rather than as peripheral concerns of an irrelevant colony."
}
unconquerable_ireland = {
war_exhaustion = -0.02
"No English lord could contain the will of the Irish for long. Despite all efforts, rebellion after rebellion sprouted in an attempt to displace English rule. Insurgency after insurgency will spring up in their path, and Ireland shall never truly be theirs. And, as they sail from our lands, we shall further influence resistance against the protestant imperialists to on our eastern flank."
}
ire_gallowglasses = {
discipline = 0.05
"Formerly loose mercenary bands, the Gallowglasses are being consolidated into a national army. Their institutional experience is almost unrivalled, and their septs are the perfect foundations for regiments."


And that's our lot for today. Well, if I don't add an image then the front page won't be happy, so here we go:

meathinks the time for change is uppon England.jpg


Next week we'll show off the new unit models and music which will both be included as part of Rule Britannia. See you then!

Don't miss today's Rule Britannia Feature Stream with DDRJake on our twitch channel at 15:00 CET - the stream will as usual be available on Youtube if you can't make the livestream
 
Last edited by a moderator:

MateuszNH

Captain
26 Badges
Dec 25, 2012
309
101
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Crusader Kings II
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Third Rome
  • Europa Universalis IV: Rights of Man
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Sign Up
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Common Sense
  • Magicka: Wizard Wars Founder Wizard
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Europa Universalis IV
I hope spain will get a lot of mil dev points in next dlc (as country that paid most of it's income to army of all europe). Will be there free dlc after content pack or it's only for bigger dlcs ?
 

Gambit8

First Lieutenant
73 Badges
Oct 28, 2012
213
37
  • Stellaris: Federations
  • Europa Universalis IV
  • Crusader Kings III
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Crusader Kings II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: The Old Gods
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Rights of Man
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III: Collection
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Colonel
  • Victoria 2
  • Supreme Ruler 2020
  • Cities: Skylines
  • Surviving Mars
  • Imperator: Rome Sign Up
  • Heir to the Throne
  • Surviving Mars: First Colony Edition
  • Surviving Mars: First Colony Edition
  • Cities: Skylines - After Dark
  • Cities: Skylines Deluxe Edition
  • Victoria 2: Heart of Darkness
  • Cities: Skylines - Snowfall
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - Parklife
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Cities: Skylines - Parklife Pre-Order
  • Hearts of Iron IV: Cadet
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Surviving Mars: Digital Deluxe Edition
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Stellaris: Lithoids
  • Europa Universalis IV: El Dorado
  • Sailors had been rebalanced to actually matter for some countries. Nobody had taught the AI this, resulting in many large countries having 0 sailors all the time, in turn leading to fleets spending most of their time in repair. As this was a surprise to me as well, and the issue is highly complicated to fix, the AI may now cheat on sailors by conjuring them out of thin air if they run out. This allows seamlessly working towards fixing the sailors handling without the naval AI being utterly handicapped in the meantime.
Never been a fan of AI that cheats, I know this has probably already been thought of but wouldn't it be better to make the AI only do missions during peacetime with a fleet large enough to cost 95% of their monthly sailors, that way during wartime they will have enough sailors in reserve to not be constantly repairing. Otherwise you may as well just let the AI cheat on manpower too, which defeats the purpose of attrition wars. This is assuming I've interpreted the way they cheat correctly at least.
 

Lord Hoosier

Lt. General
88 Badges
Mar 12, 2017
1.290
577
  • Victoria 2
  • Victoria 2: Heart of Darkness
  • For The Glory
  • Darkest Hour
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • March of the Eagles
  • Europa Universalis IV
  • Europa Universalis 4: Emperor
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - Campus
  • Prison Architect
  • Stellaris: Galaxy Edition
  • Stellaris: Nemesis
  • Hearts of Iron IV: Colonel
  • Battle for Bosporus
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome - Magna Graecia
Erin Go Bragh!
 

Lord Hoosier

Lt. General
88 Badges
Mar 12, 2017
1.290
577
  • Victoria 2
  • Victoria 2: Heart of Darkness
  • For The Glory
  • Darkest Hour
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • March of the Eagles
  • Europa Universalis IV
  • Europa Universalis 4: Emperor
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - Campus
  • Prison Architect
  • Stellaris: Galaxy Edition
  • Stellaris: Nemesis
  • Hearts of Iron IV: Colonel
  • Battle for Bosporus
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome - Magna Graecia
I am a little worried with the allowing the AI to cheat. I always found the "normal" difficulty on PDS games refreshing for not letting the ai do that. Games like Civ I never play on anything but "Prince" because I find giving the AI handouts distasteful. However if it is done in a way that it is not obvious I am all behind more difficult AI behavior, and the improved naval invasion mechanics make a game in a colonial region sound much more interesting. I hope India or Africa gets the next Immersion pack or expansion. This expansion seems really cool, but it does give me cold feet, with the new mission system. *Shutter* "Mission Pack" *Shutter*.
 

Lord Hoosier

Lt. General
88 Badges
Mar 12, 2017
1.290
577
  • Victoria 2
  • Victoria 2: Heart of Darkness
  • For The Glory
  • Darkest Hour
  • Crusader Kings II
  • Crusader Kings II: Holy Fury
  • March of the Eagles
  • Europa Universalis IV
  • Europa Universalis 4: Emperor
  • Cities: Skylines Deluxe Edition
  • Cities: Skylines - Campus
  • Prison Architect
  • Stellaris: Galaxy Edition
  • Stellaris: Nemesis
  • Hearts of Iron IV: Colonel
  • Battle for Bosporus
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome - Magna Graecia
I hope that Aquitaine can be independent form England with its own ideas.
 

Temudhun Khan

Major
82 Badges
Sep 11, 2012
630
147
  • Crusader Kings II
  • Victoria 2: Heart of Darkness
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Victoria 2: A House Divided
  • Europa Universalis IV: Res Publica
  • Crusader Kings II: Conclave
  • Crusader Kings II: Way of Life
  • Hearts of Iron IV: Expansion Pass
  • Stellaris
  • Stellaris: Galaxy Edition
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Dharma
  • Tyranny - Bastards Wound
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Expansion Pass
  • Crusader Kings II: Monks and Mystics
  • Imperator: Rome Sign Up
  • Europa Universalis IV: Mandate of Heaven
  • Tyranny - Tales from the Tiers
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Humanoids Species Pack
  • Imperator: Rome - Magna Graecia
  • Stellaris: Megacorp
  • Stellaris: Distant Stars
  • Battle for Bosporus
  • Victoria 3 Sign Up
  • Stellaris: Apocalypse
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV
  • Crusader Kings III
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Golden Century
  • Surviving Mars: First Colony Edition
  • Victoria 2
  • 500k Club
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Lithoids
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Common Sense
I hope that Aquitaine can be independent form England with its own ideas.

In previous dev diaries, we saw that pdx gave new national ideas for all tags with generic, irish, german or divine ideas in the British Isles and Low Countries. Considering the French region was also reworked (though less heavily) and several of its provinces are still owned by England, I wouldn't be surprised if they showed the same for countries with the French Ducal ideas.
 

insanebe

Sergeant
79 Badges
May 15, 2010
66
7
  • Crusader Kings II: Jade Dragon
  • Europa Universalis IV: Pre-order
  • Supreme Ruler: Cold War
  • Crusader Kings II: Horse Lords
  • Crusader Kings III: Royal Edition
  • Europa Universalis 4: Emperor
  • Semper Fi
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings III
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Necroids
  • Crusader Kings II: Monks and Mystics
  • Steel Division: Normandy 44
  • Europa Universalis IV: Mandate of Heaven
  • Cities: Skylines - Parklife Pre-Order
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Surviving Mars: First Colony Edition
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Prison Architect
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Cities: Skylines - Parklife
  • Steel Division: Normandy 44 -  Back to Hell
  • Europa Universalis IV
  • Surviving Mars
  • Age of Wonders III
  • Steel Division: Normand 44 - Second Wave
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Third Rome
Let's wait until Google makes Starcraft 2 AI first.

Well in terms of the AI, without setting some unachievable goal what i would like to see is variation in behavior based on the AI personalities possibly using existing AI Subject Focus Behaviour code in the game.
  • Administrator: They will seek to improve their economy by any means available, but are less prone towards war unless it furthers their trade interests.
  • Balanced: They will try to strike a balance between war, diplomacy and trade, and cannot be counted on to behave in any one particular way.
  • Colonialist: Their interests lie in overseas expansion and they will prefer to maintain good relations with their neighbors at home.
  • Diplomat: They will seek out powerful friends and attempt to expand diplomatically, but are far less likely to go to war unless they are reclaiming lost territory.
  • Militarist: They will seek to expand aggressively at the expense of their neighbors and are far more likely to go to war.

Subject Focus Behaviour
  • No focus The subject will decide its own strategies.
  • Supportive The subject will seek to attach to friendly armies.
  • Aggressive The subject will be aggressive towards enemies, seeking battles in enemy territory.
  • Passive This will make the subject stay with armies in their own territory, and defend there. Unless escaping a larger threat.
  • Defensive This will make the subject defend its allies' territory. (Recommended for stronger subjects)
  • Siege This will make the subject use its armies to siege down hostile fortresses and not seek any battles.
upload_2018-3-5_19-14-29.png



We could have for example the Administrator be Passive or the Militarist be Aggressive or Balanced have No Focus.

At the minute the AI looks or appears at least to be the same for every nation. (generally fleeing in terror like the cowards they are refusing to defend their own territory lol :p)
 

grommile

Field Marshal
60 Badges
Jun 4, 2011
20.107
25.617
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV
  • Hearts of Iron III Collection
  • Crusader Kings III
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • Tyranny: Archon Edition
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Shadowrun Returns
  • Teleglitch: Die More Edition
  • Victoria 2
  • 500k Club
  • March of the Eagles
  • Europa Universalis IV: Pre-order
  • Knights of Pen and Paper 2
  • Crusader Kings II
  • Europa Universalis III
I am a little worried with the allowing the AI to cheat. I always found the "normal" difficulty on PDS games refreshing for not letting the ai do that.
The AIs in EU3, EU4, and CK2 all cheat on normal difficulty.

The cheats are just less blatant than the cheats the Civ series provides.
 

RKSlither

Recruit
1 Badges
Apr 22, 2015
3
0
  • Imperator: Rome Sign Up
Good day all. Tuesday rolls around as it often does and we're back with another Dev Diary for Europa Universalis IV. Today we'll talk about 2 things: Improvements to the Naval AI and the new National Ideas of the various Irish Earldoms.

Firstly the AI. For this I will pass the mic to the living legend among AI programmers @Chaingun

#####

Hello, I am Chaingun aka. Skynet, although my real name is Petter (non-Swedes feel free to pronounce as Peter). Today’s dev diary will put the lens on what kind of new AI bugs (and occasionally WAD behavior) you may expect from the 1.25 update accompanying Rule Britannia.

The main [AI] focus of 1.25 has been to sort out the less than ideal naval behaviors. Some of you may have the perception that France transporting all their troops to an island in the Pacific is a recent thing, though in fact the AI’s logic has always permitted that to happen. It has been showcased far more frequently beginning when @Gnivom fixed overseas war declarations, due to the increased frequency of AI troops transport attempts overseas.

This overall situation is interesting because it highlights some of the many perplexities of game AI development, of which I would like to recap:

  • Fixing an issue can make the AI worse indirectly because of another latent issue, as the naval transport situation illustrates. Another example would be reducing the AI’s siege army sizes to reduce attrition when it doesn’t understand how to distribute cannons in their armies.
  • Fixing an issue can make the AI worse because we actually create another issue by breaking something.
  • A symptom often has multiple causes. An example is the famous sleeping army bug which is in very general terms can be explained as the AI getting into an external or internal state it cannot handle, resulting in all the commands it attempts (if any) being invalid.
  • A cause can have multiple symptoms that seem entirely disconnected or otherwise have very far-fetched causal dependencies. Ottomans falling behind massively in tech due to AI refusing to invade a rebel held island (due to having fewer transports than rebel regiments times a constant) would be an example.
Game AI programming is not a recommended job if you don’t like hearing how stupid you are on the forums forever afterwards not tweaking for their pet issue when working on a fixed time schedule. The line between bug and feature is thin indeed.

Returning to transport issues; in 1.25 the naval invasion AI is constrained from moving more than 50% of their troops “abroad”, where abroad is defined as a different landmass on a different continent, and army divisibility is not subject to said restriction (so if France does just have one army, it may be found in South America all the same). However, this is just the naval invasion logic… the land army AI may still decide to walk across Eurasia with all their armies for obscure reasons. It’s something I would like to rectify in the future if I get time for it.

Another big problem with the naval AI of previous patches is that it’s simply extremely slow in transporting troops. This issue turned out to be complex, and a number of sub-issues were identified and dealt with to various degrees:

  • There were several bugs where AI fleet and/or an army awaiting transport actually would be forever stuck until reload or even after.
  • The AI can now actually split a fleet if not all transports are required.
  • Sailors had been rebalanced to actually matter for some countries. Nobody had taught the AI this, resulting in many large countries having 0 sailors all the time, in turn leading to fleets spending most of their time in repair. As this was a surprise to me as well, and the issue is highly complicated to fix, the AI may now cheat on sailors by conjuring them out of thin air if they run out. This allows seamlessly working towards fixing the sailors handling without the naval AI being utterly handicapped in the meantime.
  • The AI’s transport fleet (of e.g. Spain) would often be found sailing around in Indonesia or some other far away place, taking years to respond to anywhere else. For Great Britain, this was even worse as the warships that were needed to defend against invasion partook in said expeditions. A fairly intense rework in how the structure their fleets has been made as detailed in the next paragraph.
Initially, when I set out to improve the AI’s fleet response times, I thought it would be a matter of having fleets based in appropriate ports around the world. Unfortunately, the AI (and neither do human players) have enough ships for this. Even the largest colonizers in the world can at most field a couple of hundred warships and transports. Splitting up warships lightly can therefore be disastrous.

The solution settled for has been to make the AI place the bulk of its warships into a Home fleet, which is forbidden from venturing far from the home coast, and does not contain any transports. Because it does not contain transports, it will never be busy transporting troops. This behavior is conservative, but conservative behavior is better for AI in practice. Europeans will not attempt to challenge Ming with a large fleet of heavy ships, they do however pose a token challenge to someone attempting to land troops on their shores.

So were these changes enough to make the AI a formidable force at sea then? Astute players may have noticed the AI barely built any ships whatsoever. During Christmas, the AI’s economy was tweaked to build far more warships, force limit buildings, and float less money. It was bloody perfect for a while with the Ottomans fielding 1.5 million men. Much later, new army maintenance costs came into the picture later as a surprise wrecking AI economic balance, so the 1.25 release may have regressed in this regard. Still, it should be better than it was on the naval front.

The implication of this rework on the whole makes the AI a bit more capable at naval stuff. Its micromanagement is still terrible, and skilled players will still be able to play “lure the fleet away” tactics to invade Great Britain with ease. Players using house rules or otherwise not exploiting AI behavior may however find some challenge in making naval invasions sometimes where previously they would not.

It’s worth some amount of extraposition explaining why the human player will always beat the AI as it’s coded in EU4. The crux is, the AI in Paradox games is using a fixed manual coded strategy. The extent to which is changes its behavior in response to what a human opponent does is limited to the exact tactics pre-programmed by the human author. Merely the fact the AI will not change is enough for the human to pick counter-strategies that are very effective against whatever the AI is doing, whereas they can not go into the same extreme degree of specialization against another human opponent.

Lastly, let me state I’ve been here since the Autumn on EU4 as a consultant (I was working with PDS full time until around 18 months ago), but I am being reassigned from EU4 to SECRETPROJECT, still at PDS, where I have freedom to create many new and wondrous AI bugs, or maybe even let the AI create the bugs itself, as any intelligent being would.

That’s all for now.

#####

Cheers Chaingun. Next up we'll look at New National Ideas for the Irish. Ireland is one of those places that could honestly be divided up but we are satisfied with the setup we have reached in 1.25. The following National Ideas have been either added or amended, with credit to @macd21 who made considerable contributions to these:
  • Leinster
  • Kildare
  • Clanricarde
  • Tyrone
  • Ulster
  • Maccarthy
  • Ormond
  • Faly
  • Tyrconnell
  • Repurposed group set for united Ireland
With this the entire Island's nations have their own unique National Ideas, with a formable Ireland having their own set. Let's pick 3 to look at: Meath, Kildare and Ireland

MTH_ideas = {
start = {
fort_maintenance_modifier = -0.2
global_garrison_growth = 0.25
}

bonus = {
leader_siege = 1
}

innefectual_overlords = {
global_tax_modifier = 0.10
"The English government in Dublin and their Irish Parliament puppets have been weakened as result of England's many conflicts in the Hundred Years War and the War of the Roses. Their influence no longer holds any sway over the true lords of Ireland, and now is the time to strike out for our independence."
}
foreign_nationals = {
diplomatic_reputation = 1
"In 1487, the Irish lord John de la Pole, Earl of Lincoln, invited a host from Burgundy to Dublin to support the crowning of Yorkist English pretender Lambert Simnel. Ireland would make for a fine base of resistant against the English mainland, and forever keep the would-be occupiers at bay. We may also one day gain powerful supporters, such as the Kingdom of Spain."
}
mth_parliament_of_ireland = {
stability_cost_modifier = -0.10
"When the English were expelled from Dublin, they left behind an institution called the Parliament of Ireland. Meant as an instrument to subjugate us, we will instead use it to organise our efforts to resist a return of English rule."
}
mth_englishtown = {
culture_conversion_cost = -0.15
"Once known as Irishtown and a ghetto for native Irish in Dublin, we have turned the tables. The district is now relegated to the Englishmen who remain, there being forced to integrate into the new order."
}
mth_the_cess = {
global_tax_modifier = 0.1
"The Cess is a special tax for the purpose of maintaining the extraordinary garrisons required to keep our towns safe. The people resent the tax, but understand its necessity."
}
mth_trinity_college = {
adm_tech_cost_modifier = -0.1
"Ireland lacks an institution of higher learning. A Catholic university in Dublin would put Ireland on the academic map."
}
mth_siege_mentality = {
defensiveness = 0.20
"The people of Dublin and Meath have had to endure many sieges through the years. We understand how to survive them and how to resist them."

KID_ideas = {
start = {
global_unrest = -1
defensiveness = 0.20
}

bonus = {
prestige = 1
}

kid_lords_of_ireland = {
diplomatic_reputation = 1
"Through strategic marriages and alliances with both Gaelic and Anglo-Irish families, the rulers of Kildare maintain a degree of influence throughout the island of Ireland unmatched by any of their rivals. Such is their power that successive English monarchs appointed them as their Lords Deputy over the island."
}
kid_ear_of_the_king = {
improve_relation_modifier = 0.2
"Despite repeatedly betraying the crown, the FitzGeralds of Kildare talk their way out of trouble, returning home with a pardon and a promotion."
}
kid_silken_finery = {
land_morale = 0.10
"When Thomas FitzGerald renounced his allegiance to the English king, he did so accompanied by his retinue of armoured gallowglasses, who were bedecked with silken fringes on their helmets. When Thomas wavered in his course of action, an Irish bard recited to him a poem, calling upon the Silken Lord to avenge his father’s death."
}
wizard_earl = {
technology_cost = -0.05
"The 11th Earl of Kildare spent many years abroad, studying and learning much of the world. When he returned home, he brought with him a keen interest in alchemy. Such was his knowledge that his neighbours referred to him as the wizard earl, for he was thought to have magical powers."
}
the_curragh = {
cavalry_power = 0.1
"The wide open plains of the Curragh have long been used as a gathering place for armed forces, but also make it a popular site for horse racing, and later, horse training."
}
kid_architects_of_nation = {
build_cost = -0.1
"The ancestral seat of the FitzGeralds at Carton House is grand, but our fortunes have improved of late. We have drawn up plans for an even grander residence, that could serve not only as a family seat but also as the Earl's court."
}
kid_royal_irish_army = {
global_manpower_modifier = 0.1
"The forces sent by the King of England to subdue the Irish can easily be repurposed by the Peerage. By simply offering better pay the Earldom of Kildare could command a sizable force of English soldiers."


irish_ideas = {
start = {
land_morale = 0.1
trade_efficiency = 0.1
}

bonus = {
legitimacy = 1
republican_tradition = 0.5
}

irish_endurance = {
shock_damage_received = -0.1
"Decades of disease and famine have mostly pushed the English invaders from our lands. Meanwhile, the Irish people grow all the stronger from their harrowing experiences. Yes, there is no stronger man on God's green earth than an Irishman!"
}
the_clanns = {
same_culture_advisor_cost = -0.2
"The Clanns of Ireland make up a strong political body for land and family management. In smaller families, the family elected chieftain is in charge of maintaining the family and protecting their lands. Land and leadership is passed through the family electorate system of Tanistry. From the royal clanns the symbolic high king of Ireland is elected, creating a bond of union between the Irish families."
}
more_than_irish = {
global_unrest = -2
"Heartily did the Norman invaders embrace the Irish traditions; so much so that it was said they put on the airs of being 'More Than Irish'. The very nature of our culture is contagious, and for centuries yet will men embrace our way of life."
}
loyal_catholics = {
papal_influence = 1
global_heretic_missionary_strength = 0.02
"While the English may toil and spin in the winds of the Reformation, the Irish people as a whole are determined to remain under the wing of their lord The Pope."
}
ire_abundant_harvests = {
global_trade_goods_size_modifier = 0.10
"Now that the greedy, neglectful English landlords have been driven out of Ireland, our farmers are finally able to manage their produce in peace. Blights and crop failures are addressed as matters of critical state importance rather than as peripheral concerns of an irrelevant colony."
}
unconquerable_ireland = {
war_exhaustion = -0.02
"No English lord could contain the will of the Irish for long. Despite all efforts, rebellion after rebellion sprouted in an attempt to displace English rule. Insurgency after insurgency will spring up in their path, and Ireland shall never truly be theirs. And, as they sail from our lands, we shall further influence resistance against the protestant imperialists to on our eastern flank."
}
ire_gallowglasses = {
discipline = 0.05
"Formerly loose mercenary bands, the Gallowglasses are being consolidated into a national army. Their institutional experience is almost unrivalled, and their septs are the perfect foundations for regiments."


And that's our lot for today. Well, if I don't add an image then the front page won't be happy, so here we go:

View attachment 337708

Next week we'll show off the new unit models and music which will both be included as part of Rule Britannia. See you then!


I don't think letting the AI cheat to fix a problem is valid i am a programmer and not once have i ever needed to make an AI cheat to accomplish it's goals no offence but i think you are just a lazy coder. An AI does exactly what it is told to do and at what point it needs to do it, I think you guys need a priority system versus tags so an AI can determine who is the more powerful Enemy in the war and focus there war efforts towards that first then apply that to moving ships so they only use them when it is ideal or needed to. Seeing France in a war vs Austria with an ally of Riga and seeing France focus boats to try to land on Riga is just dumb.
 

Markusmiless

Major
64 Badges
May 2, 2014
512
262
  • Europa Universalis III
  • Magicka
  • Europa Universalis IV: Pre-order
  • Hearts of Iron III
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II
  • Europa Universalis III Complete
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Sunset Invasion
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Mare Nostrum
  • Semper Fi
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Europa Universalis IV: Rights of Man
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Hearts of Iron IV: Expansion Pass
  • Tyranny: Archon Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Europa Universalis IV: Mandate of Heaven
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis III Complete
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Golden Century
  • Stellaris: Apocalypse
  • Hearts of Iron IV: La Resistance
  • Europa Universalis IV: Dharma
  • Europa Universalis IV
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Horse Lords
  • Europa Universalis III Complete
  • Victoria 2
  • Stellaris: Megacorp
  • Europa Universalis IV: El Dorado
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Magicka 2
I don't think letting the AI cheat to fix a problem is valid i am a programmer and not once have i ever needed to make an AI cheat to accomplish it's goals no offence but i think you are just a lazy coder. An AI does exactly what it is told to do and at what point it needs to do it, I think you guys need a priority system versus tags so an AI can determine who is the more powerful Enemy in the war and focus there war efforts towards that first then apply that to moving ships so they only use them when it is ideal or needed to. Seeing France in a war vs Austria with an ally of Riga and seeing France focus boats to try to land on Riga is just dumb.

I honestly doubt you're a programmer if you claim that they are just being lazy.
They've stated time and time again that the engine is a mess in a sense, making editing it difficult without breaking something else.

What you say sounds very easy in theory but it's actually a lot harder than you've given it credit for which is why I doubt you actually are programming, at least not anywhere near the same level that EUIV is on.

And it seems natural to me that anyone would focus on the weaker enemy.
Who cares if the Ottomans is comming? If there is a risk I can't beat them when supported by allies then I should get rid of the weakest link.
It's basic strategy to focus on removing the most dangerous threat, but it's usually more worthwhile to weaken an enemy as a whole with less losses than make a Pyrrhic victory.
 

grommile

Field Marshal
60 Badges
Jun 4, 2011
20.107
25.617
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV
  • Hearts of Iron III Collection
  • Crusader Kings III
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • Tyranny: Archon Edition
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Shadowrun Returns
  • Teleglitch: Die More Edition
  • Victoria 2
  • 500k Club
  • March of the Eagles
  • Europa Universalis IV: Pre-order
  • Knights of Pen and Paper 2
  • Crusader Kings II
  • Europa Universalis III
I don't think letting the AI cheat to fix a problem is valid i am a programmer and not once have i ever needed to make an AI cheat to accomplish it's goals no offence but i think you are just a lazy coder.
The AI for PDS games has conflicting goals and a very large set of inputs... and there are several hundred instances of it running.
 

Chaingun

Field Marshal
47 Badges
Jul 15, 2002
3.797
2.509
  • Knights of Honor
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Europa Universalis IV: Rights of Man
  • Steel Division: Normandy 44
  • War of the Vikings
  • Europa Universalis IV: Third Rome
  • BATTLETECH
  • Surviving Mars
  • Age of Wonders III
  • Europa Universalis IV: Rule Britannia
  • Europa Universalis IV: Dharma
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Prison Architect
  • Imperator: Rome - Magna Graecia
  • Crusader Kings III
  • Europa Universalis III Complete
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Hearts of Iron III
  • Heir to the Throne
  • Crusader Kings II
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Rome Gold
  • Supreme Ruler 2020
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
^ The AI has a couple of hundred "priority systems" roughly speaking, many overlapping and with conflicting priorities. For example, unit AI has prioritization for army province value (several subsystems; best province to avoid attrition in, battle to join, province to siege, siege to support), navy province value, navy to transport, army to invade with, unit to attach to, unit to merge with, province to land in, army region assignment, focal point assignment, threat avoidance, etc.

Lazy is being a matter of definition. I admit that when you're not working 168 hours per week, you could be working more!
 

TenguMaster

Private
80 Badges
Aug 26, 2009
23
0
  • Rome Gold
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Magicka
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sword of Islam
  • BATTLETECH - Digital Deluxe Edition
  • Hearts of Iron IV: Field Marshal
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Mandate of Heaven
  • BATTLETECH
  • Surviving Mars
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Age of Wonders III
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Surviving Mars: First Colony Edition
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma Pre-order
  • Europa Universalis IV: Golden Century
  • Battle for Bosporus
  • Imperator: Rome Deluxe Edition
  • Europa Universalis IV: Dharma
  • Victoria 2
  • Rome: Vae Victis
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Hearts of Iron IV: Expansion Pass
  • Magicka: Wizard Wars Founder Wizard
  • Mount & Blade: Warband
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
I would rather lose transports than sailors. Limited manpower was important historically but dedicated transport fleets were rare. If you needed to move armies you hired or "borrowed" merchant ships.
 

SilverWarriorDK

Queen of Scandinavia
10 Badges
Jan 7, 2016
792
1
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Rights of Man
Those who think grand strategy games can be interesting without cheating AI aren't playing the same games. AI simply lacks the abilities to the complicated thought processes players can make use of. The only AIs which are effective against humans are AIs who play far more mathematized games like chess. The most challenging grand strategy/4x game I've ever played, and can be compared to EU4 was galactic civilisations 2 (or modded 3), but those games have a far more "mathematized" gameplay (and AI cheats like no other). Really, EU4 Ai was never particularily challenging, so difficulty options (with neat AI bonuses) are simply needed for a satisfying game as a player. The reason I'm on this thread however is that I play with a mod which isn't compatible with 1.25 yet, so essentially I'm using 1.24 AI - which can be one of the worst AIs in the history of EU4 - for the reason of its utterly broken naval behaviour. My question is simple: does 1.25 really fix AI transport behaviour, and prevents them in general to send away more than 50% of their armies overseas, alongside their fleets?
 
Last edited: