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

swilhelm73

Strong Badder then You
28 Badges
Mar 27, 2001
4.084
152
Visit site
  • Europa Universalis: Rome
  • Crusader Kings III
  • Age of Wonders: Planetfall
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Jade Dragon
  • Age of Wonders III
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Horse Lords
  • Pride of Nations
  • Europa Universalis IV: El Dorado
  • 500k Club
  • Rome: Vae Victis
  • Victoria 2
  • Rome Gold
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Europa Universalis III
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Charlemagne
Originally posted by wryun
The troop counting bug is supposed to be fixed:

- Total unitcounts should no longer be miscalculated in a reload if units are being built.

(1.07 changes list)

I'm finishing up a v1.06 game though...I guess that mean in v1.07 I'll reload every year...
 

Johan

Studio Manager Paradox Tinto
Administrator
Paradox Staff
Moderator
15 Badges
Dec 14, 1999
18.409
38.945
  • Diplomacy
  • Teleglitch: Die More Edition
  • War of the Roses
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Magicka: Wizard Wars Founder Wizard
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Imperator: Rome Sign Up
  • A Game of Dwarves
  • Magicka
  • Starvoid
If I knew what caused it, it would be adressed.

The problem is that it takes enourmous amounts of time to run enough time to see symptoms in the debugger, and then poke around. And savegames does not help a bit :(

And just the statement "AI falls asleep" does not help a bit, as there are hundreds of different AI processes for each country.
 

DGuller

Lt. General
32 Badges
Feb 18, 2003
1.238
251
Visit site
  • Europa Universalis IV: Pre-order
  • Hearts of Iron IV: No Step Back
  • Hearts of Iron IV: By Blood Alone
  • Battle for Bosporus
  • Hearts of Iron IV: La Resistance
  • Surviving Mars: First Colony Edition
  • Hearts of Iron IV: Expansion Pass
  • Cities: Skylines - Parklife
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Surviving Mars
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Common Sense
  • Victoria 2 A House Divided Beta
  • Hearts of Iron II: Beta
  • Crusader Kings II
  • Europa Universalis IV: El Dorado
  • Cities: Skylines
  • 500k Club
  • Victoria 2: Heart of Darkness
  • Victoria 2: A House Divided
  • Victoria 2
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Divine Wind
  • Europa Universalis III Complete
Originally posted by Johan
If I knew what caused it, it would be adressed.

The problem is that it takes enourmous amounts of time to run enough time to see symptoms in the debugger, and then poke around. And savegames does not help a bit :(

And just the statement "AI falls asleep" does not help a bit, as there are hundreds of different AI processes for each country.

What about refreshing the game automatically every year, as a band-aid solution?.
 

daedalus

first among fools
44 Badges
Jul 30, 2001
1.990
0
Visit site
  • Stellaris: Apocalypse
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Europa Universalis IV: Rights of Man
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Distant Stars
  • Stellaris: Megacorp
  • Crusader Kings II: Holy Fury
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Stellaris: Ancient Relics
  • Stellaris: Lithoids
  • Stellaris: Federations
  • Crusader Kings III
  • Stellaris: Nemesis
  • Hearts of Iron III
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Semper Fi
  • 500k Club
  • Europa Universalis III: Collection
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
I have a guess: It could be cause by an overload of information for the decission making AI. After a long uptime (long playing session), the amount of in memory information which the AI uses to make decisions is so big, that each AI is getting less and less time to make any decision. A game reload probably flushes all that extra info, bringing the AI activity levels up.
 

Johan

Studio Manager Paradox Tinto
Administrator
Paradox Staff
Moderator
15 Badges
Dec 14, 1999
18.409
38.945
  • Diplomacy
  • Teleglitch: Die More Edition
  • War of the Roses
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Magicka: Wizard Wars Founder Wizard
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Imperator: Rome Sign Up
  • A Game of Dwarves
  • Magicka
  • Starvoid
Spent two hours on it this morning, and saw a symptom on it. Don't know how much it helps, but try out todays patch.
 

Dinsdale

Field Marshal
18 Badges
Dec 10, 2002
2.661
0
  • Europa Universalis: Rome
  • Europa Universalis IV: Golden Century
  • Europa Universalis: Rome Collectors Edition
  • Pride of Nations
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Rome: Vae Victis
  • Victoria 2
  • Semper Fi
  • Crusader Kings II
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III
  • Deus Vult
Originally posted by Johan
If I knew what caused it, it would be adressed.

The problem is that it takes enourmous amounts of time to run enough time to see symptoms in the debugger, and then poke around. And savegames does not help a bit :(

And just the statement "AI falls asleep" does not help a bit, as there are hundreds of different AI processes for each country.
What can we do to help?

The details of symptoms I see; AI stops building troops, AI stops moving troops during war. The peculiar thing is that not all AI nations stop.

The symptom can be highlighted by reloading the game and observing the much more intense AI activity in the previously "sleeping" nations.

As far as a traceable pattern, the only hint I have noticed is that newly freed countries tend to be created asleep. Not much to go on, but observing the behaviour of new nations might give some clue as to what the issue is.
 

kurtbrian

Older than dirt
10 Badges
Sep 9, 2001
9.122
0
www.lemonamiga.com
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: The Old Gods
  • Europa Universalis III Complete
  • Europa Universalis IV
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
Originally posted by Johan
Spent two hours on it this morning, and saw a symptom on it. Don't know how much it helps, but try out todays patch.

Your effort is truly apreciated!

2 hours?! simply impressive, that you can be bothered so long after the release of the game:)
 
Oct 22, 2001
8.242
0
Visit site
Johan!

One of the more obvious symptoms of this problem is the DOW-frequence. Almost whenever you reload a game there seems to be at least one DOW.

Check the DOW-algorithm and see what variables influence the decision to DOW or not. Is there a reason these variables have different values at relaod and in-game and could that be the problem?

And when is this part of the code called upon? Only at the start of the game or...

Happy if I can be of any help:)

Thanks a lot for your dedication!

Yours
Daniel
 

Aetius

Nitpicker
15 Badges
Jan 11, 2001
9.204
1
Visit site
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Heir to the Throne
  • Majesty 2 Collection
  • Europa Universalis: Rome
  • Sengoku
  • Warlock: Master of the Arcane
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Rome: Vae Victis
  • 500k Club
  • Hearts of Iron II: Beta
The symptoms are known. What he needs is a 100% way of recreating the problem. Something like free Vassal, ally vassal and declare war and it will always be asleep. Not that works, but you get the general picture. The fact that it reoccurs in all the games says that it is something fundamental.

DOW doesn't seem to be connected I have seen countries declare war on countries and never do anything, despite the fact that the victim country had no army and the attacking country had a large army. This usually followed by a white peace and a truce. Maybe it forgets it has units or new armies are not known by the computer unless they are at war. I have no idea. The diplomatic AI doesn't sleep AFAIK. The "moving unit AI" does sleep at bit though.
 

Dinsdale

Field Marshal
18 Badges
Dec 10, 2002
2.661
0
  • Europa Universalis: Rome
  • Europa Universalis IV: Golden Century
  • Europa Universalis: Rome Collectors Edition
  • Pride of Nations
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Rome: Vae Victis
  • Victoria 2
  • Semper Fi
  • Crusader Kings II
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III
  • Deus Vult
Originally posted by Aetius
The symptoms are known. What he needs is a 100% way of recreating the problem. Something like free Vassal, ally vassal and declare war and it will always be asleep. Not that works, but you get the general picture. The fact that it reoccurs in all the games says that it is something fundamental.

Obviously it's not possible to recreate 100% of the time. That's what makes it such a tough find.

Does anyone out there play the game without pausing? If so, could you comment whether the sleeping issue still occurs.
 

MarkShot

Major
56 Badges
Nov 20, 2002
736
23
Visit site
  • Hearts of Iron IV: Death or Dishonor
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Hearts of Iron IV: Cadet
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Crusader Kings II: Conclave
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Crusader Kings II: Jade Dragon
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis 4: Emperor
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II
  • Europa Universalis IV: Res Publica
  • 500k Club
  • Cities: Skylines
  • Cities: Skylines Deluxe Edition
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
Here is the typical programming way to debug this problem.

Have the beta generate a log file of debugging information that would be of interest to Johan. When people think that they have found sleeping AI, then email the log file back to Johan for inspection. Perhaps, that will narrow down the search space for him.

---

By the way, since I am new to the game, what is the general recommendation for how often the game should be reloaded? How many simulated years? Of course, like others, I have been getting the occassional CTD with the latest beta. So, that kind of makes reloading necessary at times. :)
 
Oct 22, 2001
8.242
0
Visit site
Originally posted by Aetius
DOW doesn't seem to be connected I have seen countries declare war on countries and never do anything, despite the fact that the victim country had no army and the attacking country had a large army. This usually followed by a white peace and a truce. Maybe it forgets it has units or new armies are not known by the computer unless they are at war. I have no idea. The diplomatic AI doesn't sleep AFAIK. The "moving unit AI" does sleep at bit though.

I'm not sure what you are meaning.

Anyhow DOWs are the most obvious symptom of the AI sleep disease. Just compare the number of DOWs made that month you load a game with any other month in mid-play. Appears to be pretty easy to check also.
 

unmerged(13277)

Doc said "you can go home"
Dec 29, 2002
837
0
www.lhjworld.sa-net.dk
My 5-cent worth

I a bit unsure if the ai actually falls asleep.
I have run a huge number of freehand games this last 1-2 month, messing with the ai.

I came to think of it. The vast minority of ai’s in the game has nothing to do!
They have no plan, they are peaceful by nature, they have no missions, and they have no places to conquer – and thus have noting to do!
If you study the ai files, and there functions, you will notice that close to 90% of all countries is set for doing noting – and when they do something, they ai files also says that they have to mainly conduct defensive wars. e.g. liberate own provinces, go mainly for high value provinces, keep troops close to home etc.
It is actually no wonder, once the game has run a few rounds; the ai has build up good relationships with surrounding nations, that it in human terms ‘falls asleep’ – while it in ai terms is doing exactly what its suppose to do.

Now while I do acknowledge that some ai’s that do have places to go, money to do it, opportunity and strength to do it, does seam to sometime lay much to low in unusually long time period (20-30 years) – but they usually come around again, themselves, or either by events or dragged into something by another nation.

I also know that if you re-load, there is a huge amount of activity, much war declaration.

Well I did read a while ago here, that this was because the relation between nations was not acknowledged at the very start of the game (or start of a reload). Thus in the small time it takes the game to figure out that A has good relation with B, those ai’s manage to declare war on each other, because they don’t know that they have good relations.
And as one knows one ai war seldom comes alone. Dragged along by alliances or ai’s that does have something to do, that now ‘triggers’ because nations they are supposed to conquer is now at war etc…anyway, it all falls like a card house, one event dragging/triggering another during a reload on and on and on – I’ll bet that is exactly what you see in a reload.

Another to support this behaviour, that not all things are accounted for during a reload. If you noticed it takes a few days before one can release national provinces as a vassal during a reload. Now this should not be possible since the revolt.txt, which is the file that determinate what you can release, is required even to start the game. But as a matter of fact it does take a few days before the info in revolt.txt is translated into game functions.
Which could suggest that part of the save games are also not understood right from days one- but takes a few days too for all parts to acknowledge it all.

So when you look at it, I don’t think that the ai falls asleep at all, since he does exactly what his supposed to do – which is nothing! But what you see in a reload, is not actually a waking of the ai, but a !!bug – that forces the ai to do things he would otherwise not do.
So the real problem is rather simpler I think – supply the ai with something to do, by supplying ai files that is not saying that the ai should indeed go to sleep, e.g do nothing!

Well it’s a test that can be done.
Make the most warmonger ai files that can be done, just attack attack regardless of own provinces, regardless of value etc.. Apply it to all nations in the game with a ‘to conquer’ tag of all other nations in the game – and watch if the ai still falls asleep.

My personal bet is that he does not :)
 

MichaelK

Second Lieutenant
11 Badges
Feb 6, 2003
159
0
Visit site
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • For The Glory
  • Hearts of Iron III
  • Heir to the Throne
  • Europa Universalis: Rome
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Europa Universalis: Rome Collectors Edition
Johan

Apart from the normal "sleep" problem, which could be fixed by reloading, there is another "sleep" situation. By approximately 1700 European countries stop to make wars against each other.
Sometimes it happens, but very seldom, which is completely different from wars in 1400s and 1500s.
Wars are going mostly in Asia and betweeen European and non-European countries. I am not sure
about the reason: may be AI is not starting war if potential enemy has very high land technology development level ?
 

Dinsdale

Field Marshal
18 Badges
Dec 10, 2002
2.661
0
  • Europa Universalis: Rome
  • Europa Universalis IV: Golden Century
  • Europa Universalis: Rome Collectors Edition
  • Pride of Nations
  • Crusader Kings II: Holy Knight (pre-order)
  • 500k Club
  • Rome: Vae Victis
  • Victoria 2
  • Semper Fi
  • Crusader Kings II
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III
  • Deus Vult
Originally posted by Daywalker
I a bit unsure if the ai actually falls asleep.
I have run a huge number of freehand games this last 1-2 month, messing with the ai.

Daywalker, your post is interesting, however having spent some time trying to replicate the problem. It's not a case of the AI simply doing nothing, it's a case of the AI being at war and neither building troops nor moving them.

After a reload, the AI prosecutes the war as normal.
 

Aetius

Nitpicker
15 Badges
Jan 11, 2001
9.204
1
Visit site
  • Crusader Kings II
  • Europa Universalis III
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Heir to the Throne
  • Majesty 2 Collection
  • Europa Universalis: Rome
  • Sengoku
  • Warlock: Master of the Arcane
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Rome: Vae Victis
  • 500k Club
  • Hearts of Iron II: Beta
Originally posted by Daniel A
I'm not sure what you are meaning.

Anyhow DOWs are the most obvious symptom of the AI sleep disease. Just compare the number of DOWs made that month you load a game with any other month in mid-play. Appears to be pretty easy to check also.

I mean that even if the AI does declare war it can be asleep.

I had an ally, Pskov that declared war on Tver every 5 years, but never ever did anything. Pskov had an army of 20 000 men and Tver had no army (I made sure of that by invading them and destroying it). Pskov never moved its army to Tver. Obviously the Pskov Troop AI is asleep when it comes to moving its troops but the Pskov DOW AI is working fine.

Thus DOW AI is not connected to the Troop AI since one of them can be awake and the other asleep. IMO the sleeping troop AI is far more serious than possible DOW sleeping.


Originally posted by Dinsdale
Daywalker, your post is interesting, however having spent some time trying to replicate the problem. It's not a case of the AI simply doing nothing, it's a case of the AI being at war and neither building troops nor moving them.

After a reload, the AI prosecutes the war as normal.

Exactly.
 

Peter Ebbesen

the Conqueror
61 Badges
Mar 3, 2001
16.914
4.881
  • 500k Club
  • Hearts of Iron II: Beta
  • Victoria 2 Beta
Originally posted by Daniel A
I'm not sure what you are meaning.

Anyhow DOWs are the most obvious symptom of the AI sleep disease. Just compare the number of DOWs made that month you load a game with any other month in mid-play. Appears to be pretty easy to check also.
The DOW symptom is, as far as I have seen, separate.

[speculation]
It seems as if, on reload, relations are treated as if 0 (or even -200) the first day and then sorted out to their proper values over the few days. That means a brief breathing space where most of the world is disliked or hated, which causes the AI to be much more likely dow somebody.
[/speculation]

Really farfetched :D, but it seems as if *something* that produces the same symptons is the cause with the DOWs.

EDIT: In other words, it might be that the DOW AI is really working as designed, but just fooled by bad relations.
 
Oct 22, 2001
8.242
0
Visit site
Daywalker and Peter E!

You may be on to something here. This should be very easy for Johan to check!

If it is like this you are right that this DOW-frequence problem really is a separate issue.

But perhaps this TVER/PSKOV problem is a child of this. DOW is made at reload when one (was it Pskov?) believes Tver is their real enemy. But then, just when Pskov is getting to get starting and invading, they realise that hey "Tver are our friends really, we shouldn't go and invade and plunder their territory..."

If this is the case then the DOW problem and the AI sleepiness during war may be connected after all. Assume Pskov never fulfilled the requirements for invading Tver and those requirements are the same as for DOWing (or at least similar). But the tests for these requirements gives an errounous answer when made at day 1 on a reload since the relationship between the two nations is temporarily wrong at that precise moment.

Johan! Please check this!!!!
 

Johan

Studio Manager Paradox Tinto
Administrator
Paradox Staff
Moderator
15 Badges
Dec 14, 1999
18.409
38.945
  • Diplomacy
  • Teleglitch: Die More Edition
  • War of the Roses
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Magicka: Wizard Wars Founder Wizard
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Imperator: Rome Sign Up
  • A Game of Dwarves
  • Magicka
  • Starvoid
No... the relation have nothing to do with it.

The underlying problem is that AI lose track of resources at times.

I found some of those problems this weekend, and it should be better now.
 
Oct 22, 2001
8.242
0
Visit site
OK! So that theory of mine (that relations had an impact on the decision of invading the territory of your foe or not) was not correct.

But Johan, the theory put forward above, that the AI nations does not know the correct diplomatic relation towards other nations at relaod time. Could that one be correct? It should be easy to verify and fix and if so we would get rid of the problem with too much DOWs made at reload time.