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

SpeedKatMcNasty

Captain
88 Badges
Jul 16, 2015
484
276
  • Stellaris: Galaxy Edition
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Reapers Due
  • Stellaris: Galaxy Edition
  • Crusader Kings III: Royal Edition
  • Warlock: Master of the Arcane
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Stellaris
  • Crusader Kings III
  • Hearts of Iron IV Sign-up
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Steel Division: Normandy 44
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Europa Universalis IV: Dharma
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Prison Architect
  • Imperator: Rome Sign Up
  • Stellaris: Ancient Relics
  • BATTLETECH: Season pass
  • Stellaris: Lithoids
  • BATTLETECH: Heavy Metal
  • Stellaris: Federations
  • Imperator: Rome - Magna Graecia
  • Stellaris: Apocalypse
  • Steel Division: Normandy 44 Deluxe Edition
  • Stellaris: Necroids
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: Death or Dishonor
  • BATTLETECH
  • Europa Universalis IV: Cradle of Civilization
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Victoria 2
https://steamcommunity.com/sharedfiles/filedetails/?id=1728546756

An initial release of an AI improvement mod I've been working on.

This mostly only includes changes to the Defines file as i am still experimenting with the new AI goals system. The AI should play more competitively in a few different ways with the mod enabled. It will recruit more armies faster when threatened, keep its armies in bigger stacks closer together for mutual support, be more aggressive against weaker targets and spam the player with less requests.

The mod will become more refined over time as i trial and error my way through things. Please let me know if you have any issues after installing the mod that you didn't before. It should be compatible with just about any mod out there, as long as they properly handled changes to the "Defines" file (and obviously the AI plans file).

It is not Ironman compatible, but can be enabled and disabled at will during any point of your (non-ironman) game with no I'll effects.
 

Attachments

  • IR-AI - Copy.zip
    6,8 KB · Views: 8
Nice work. the amount of AI variables exposed makes me hopeful, despite how opaque a lot of them are right now.

I went through your files. in ai_plan_goals I tried a few different things.

to manage manpower a bit better:
Code:
is_low_mp = {\
    trigger = {
        manpower_percentage < 25
    }
    aggressive = -50
}

is_high_mp = {\
    trigger = {
        manpower_percentage > 75
    }
    aggressive = 50
}

to try to manage attrition (no idea if this actually does anything, could be completely wrong, just copied from the landlocked naval example):
Code:
# land
land_morale = 10000
land_morale_modifier = 10000
land_unit_attrition = 10000
land_morale_recovery = 10000

I interpret 1 define differently, "STRIKE_TEAM_ADVANTAGE" being an overkill target, which I set lower to 2, thinking it will for example aim to have a 40k stack fight a 20k stack, and not more

do you have any idea what wait_ae is or does? it's in the aiview goal planner all the time under a war declaration

I wish you could better inspect the tactical decisions being made. it seems almost impossible right now to distinguish between different army behaviour. I just ran a long game overnight, which seemed to be avoiding attrition at the beginning, but now at year 820 it's regularly stacking 60k with 10% attrition. that's my biggest problem with this AI, it still ends up with 0 manpower regularly. also is there any way to change the wages paid to max?

are you on any imperator discords? could be useful for further investigation or testing

here's a printmap of my overnight game to 820 - is this considered a game amount of blobbing for this late in the game?
 

Attachments

  • romeobs2_political_820_11_16.png
    3,7 MB · Views: 11
Nice work. the amount of AI variables exposed makes me hopeful, despite how opaque a lot of them are right now.

I went through your files. in ai_plan_goals I tried a few different things.

to manage manpower a bit better:
Code:
is_low_mp = {\
    trigger = {
        manpower_percentage < 25
    }
    aggressive = -50
}

is_high_mp = {\
    trigger = {
        manpower_percentage > 75
    }
    aggressive = 50
}

to try to manage attrition (no idea if this actually does anything, could be completely wrong, just copied from the landlocked naval example):
Code:
# land
land_morale = 10000
land_morale_modifier = 10000
land_unit_attrition = 10000
land_morale_recovery = 10000

I interpret 1 define differently, "STRIKE_TEAM_ADVANTAGE" being an overkill target, which I set lower to 2, thinking it will for example aim to have a 40k stack fight a 20k stack, and not more

do you have any idea what wait_ae is or does? it's in the aiview goal planner all the time under a war declaration

I wish you could better inspect the tactical decisions being made. it seems almost impossible right now to distinguish between different army behaviour. I just ran a long game overnight, which seemed to be avoiding attrition at the beginning, but now at year 820 it's regularly stacking 60k with 10% attrition. that's my biggest problem with this AI, it still ends up with 0 manpower regularly. also is there any way to change the wages paid to max?

are you on any imperator discords? could be useful for further investigation or testing

here's a printmap of my overnight game to 820 - is this considered a game amount of blobbing for this late in the game?
Their is a define that theoretically should restrict the AI from declaring war if its current manpower ratio to the opponent is too low:

EAGERNESS_EXTERNAL_MANPOWER_FACTOR = 0.5 #How much manpower advantage over neighbors matters vs. %MP of max for eagerness to declare war.

Its something i turned up slightly.

From watching games in observer mode, one of the main reasons why the AI is always low on manpower is from deleting units when not at war and then rebuilding them during war. I think this has to do with the define called WAR_BUDGET_MULTIPLIER. It increases the max amount the AI is willing to spend on military units while at war, although its only a max and the AI wont always spend that much unless it thinks its "Near Death". However the AI sure seems to thinks its near death a lot, and so will build up a big army and then delete most of it when the war's done. Its a hard balance to find, as often the AI actually does need those troops to win an offensive war, due to its tactical deficiencies that cant really be corrected by anyone but Paradox themselves.

My guess for Wait_AE is also in the defines:

#Diplomacy
AE_CARE = 15 #AI usually waits for around this AE or a somewhat higher value before declaring a war.
AE_CARE_EXTRA = 25 #Additional variation on top of AE_CARE for when AI cares about AE in declaring wars and peace deals.

So its kind of a soft cap for the AI to discourage it from just going crazy with AE. I turned it up somewhat as the base values are quite low, and it matter much less for a larger country. I wonder if you could go into the AI plans file and set it even higher using a trigger for countries of a certain size or larger? That would make more sense than doing a general increase in the defines.

I have no clue about wages, it might be somewhere else in the files.

I'm just on the general Paradox Community discord that has an Imperator channel (this link expires in 1 day):

https://discord.gg/uqdbc5

That looks like a good amount of blobbing, although i rarely even simulate that late into the game. I have a good PC with a good CPU, but leaving the game on overnight is something i cant do (the PC is in my bedroom and would keep the wife awake as it runs hot and is quite loud). Usually i can get a good idea of what changing a variable did after about a half hour of speed 5 though.
 
Nice work. the amount of AI variables exposed makes me hopeful, despite how opaque a lot of them are right now.

I went through your files. in ai_plan_goals I tried a few different things.

to manage manpower a bit better:
Code:
is_low_mp = {\
    trigger = {
        manpower_percentage < 25
    }
    aggressive = -50
}

is_high_mp = {\
    trigger = {
        manpower_percentage > 75
    }
    aggressive = 50
}

to try to manage attrition (no idea if this actually does anything, could be completely wrong, just copied from the landlocked naval example):
Code:
# land
land_morale = 10000
land_morale_modifier = 10000
land_unit_attrition = 10000
land_morale_recovery = 10000

I interpret 1 define differently, "STRIKE_TEAM_ADVANTAGE" being an overkill target, which I set lower to 2, thinking it will for example aim to have a 40k stack fight a 20k stack, and not more

do you have any idea what wait_ae is or does? it's in the aiview goal planner all the time under a war declaration

I wish you could better inspect the tactical decisions being made. it seems almost impossible right now to distinguish between different army behaviour. I just ran a long game overnight, which seemed to be avoiding attrition at the beginning, but now at year 820 it's regularly stacking 60k with 10% attrition. that's my biggest problem with this AI, it still ends up with 0 manpower regularly. also is there any way to change the wages paid to max?

are you on any imperator discords? could be useful for further investigation or testing

here's a printmap of my overnight game to 820 - is this considered a game amount of blobbing for this late in the game?

Keep in mind when writing goals that they get updated quite infrequently (lowest guaranteed frequency is once a year, it will also do it on e.g. ruler change).

wait_ae will in 1.1 depend on a concretely moddable value ae_ceiling in goal files.

Type "mapmode ai" in console and select an army. You should see a color coded maps of utility values that (kind of) explaining why AI troops go where they are going. They may do different (hopefully more intelligent) things if pure_weight = yes hasn't been set though.
 
Last edited: