Page 1 of 1
Custom scenario AI freeze
Posted: Tue May 12, 2015 11:04 pm
by ddtachibana
Love the game and have blown through the Japanese campaign, and so decided to create a custom scenario. I tried a trial run and noticed that in the first turn, the AI is already freezing up, stopping its thinking process halfway of the progress bar.
Admittedly, my laptop may not be very powerful (i5 2.2GHz, 8GB), but I had no trouble with the campaign (even Java?!). Also, this naval scenario I created does include many naval+air units (188 according to unit id) in a 100x60 map. (Attached)
I have then applied the latest hotfix, to no avail. My question is, is this a fault in my scenario designing, my hardware, or the game?
Thanks!
Re: Custom scenario AI freeze
Posted: Fri May 15, 2015 8:49 pm
by ddtachibana
FYI I tried again with the official patch 1.6.7, but still AI couldn't finish thinking.
Re: Custom scenario AI freeze
Posted: Fri May 15, 2015 9:54 pm
by Myrddraal
I just tried it quickly, I don't think the AI is frozen here, but it's really struggling (very intense cpu usage).
Maybe try splitting some of the AI teams into several smaller teams?
Re: Custom scenario AI freeze
Posted: Fri May 15, 2015 9:59 pm
by adherbal
Think it may be useful for us to post a guide/tips on how the AI is best setup with do's and don'ts
Re: Custom scenario AI freeze
Posted: Fri May 15, 2015 10:08 pm
by ddtachibana
I see. I guess it's just my laptop being lame then.
And I would definitely love to see some documentations about AI settings. It's kinda hard to know the defaults and limitations right now.
Re: Custom scenario AI freeze
Posted: Fri May 15, 2015 10:18 pm
by adherbal
In short, the AI will calculate the moves for each AI team consecutively. Once it has determined its moves for every unit in that team, these will be played back to the player. During the playback the AI will continue calculations for the next team(s).
So ideally the teams are small enough to only have a limited visible pause at the start of the AI turn, and then the time it takes to play back the first moves are enough to "mask" the thinking delay for the remaining teams so the player is presented with a more or less uninterrupted sequence of actions.
The complexity (and thus time required) of the AI calculations depends on the AI task, the number of units in a team and (often) the number of nearby enemy units.
So in general, do not throw dozens of AI units into a single AI team on "seek & destroy". This may work, but it will be very slow. Instead split the AI forces into several sections along a frontline and/or several waves, each with a different team ID.
"Defend Hex" tasks are basically inactive until the player moves units into the range defined for this task. This means maps where the AI defends can be quite fast if you split the AI defenders into several spread out groups, where only the teams which make contact with the enemy actualy have to be calculated.
Re: Custom scenario AI freeze
Posted: Sat May 16, 2015 6:52 pm
by ddtachibana
Thanks a lot! That's very helpful for me to redo the AI grouping. I'll optimize the teams and report back.
Re: Custom scenario AI freeze
Posted: Sat May 16, 2015 7:53 pm
by ddtachibana
I split the massive 21-unit team into two, and viola, the AI managed to think its way out!
Now, for another question: if I have one group visible to the AI (but not the other two), will the Seek&Destroy team target that group and travel to attack, or go on to seek for others?