AI turn length
Moderators: Order of Battle Moderators, The Artistocrats
-
StuccoFresco
- 2nd Lieutenant - Panzer IVF/2

- Posts: 670
- Joined: Sun Feb 10, 2019 11:10 am
AI turn length
What is the biggest factor for AI turn lengths? I see looooooooooooong turns when there are very few units in the map, so I don't think it depends on that. Map size? Is the AI getting too hung up on calculating possible pathfinding through it? Numbero of triggers don't seem to impact much, nor does number of "factions" in the game.
-
bru888
- Order of Battle Moderator

- Posts: 6214
- Joined: Sun Jan 10, 2016 5:39 pm
- Location: United States
Re: AI turn length
This is a note that I dug up from my files:
AI Team Sizes and Calculations
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.
That is the usual answer to this type of question. However, you say that you have relatively few units on the map. In that case, look to your map size and complexity. By "complexity," I mean the number of decorations and features like rivers and escarpments.
But frankly, it would take a jumbo-sized map filled with palm trees to really slow the game down in the way that you are describing. I wonder how powerful and viable your computer is if you really don't have many units on the map.
Two other things come to mind: Make sure nothing is running in the background while you are playing the game. Also, look to exclude the game's files from your anti-virus program's monitoring.
AI Team Sizes and Calculations
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.
That is the usual answer to this type of question. However, you say that you have relatively few units on the map. In that case, look to your map size and complexity. By "complexity," I mean the number of decorations and features like rivers and escarpments.
But frankly, it would take a jumbo-sized map filled with palm trees to really slow the game down in the way that you are describing. I wonder how powerful and viable your computer is if you really don't have many units on the map.
Two other things come to mind: Make sure nothing is running in the background while you are playing the game. Also, look to exclude the game's files from your anti-virus program's monitoring.
- Bru
-
StuccoFresco
- 2nd Lieutenant - Panzer IVF/2

- Posts: 670
- Joined: Sun Feb 10, 2019 11:10 am
Re: AI turn length
Strange, it's a farily big map (40x40) but it's 99% deep water, there are only 4 AI teams with 20 units in total. I'm trying to change the AI Teams to "naval defend hex" instead of "naval seek and destroy" to see if it improves and indeed it seems so, albeit this forces me to be more "railroady" during scenario design...
-
terminator
- Field Marshal - Gustav

- Posts: 6115
- Joined: Mon Aug 15, 2011 12:48 pm
- Location: the land of freedom
Re: AI turn length
If you share your scenario, it would be possible to test it on different configurations to see if it is not a hardware problem ?
-
StuccoFresco
- 2nd Lieutenant - Panzer IVF/2

- Posts: 670
- Joined: Sun Feb 10, 2019 11:10 am
Re: AI turn length
It's a scenario of a total conversion mod, it would need the installment of the whole shebang.
Switching to a different order seemed to have shortened the turn significantly, but I must have missed something because the AI fleet is currently nowhere to be seen... Gonna test again this evening.
Switching to a different order seemed to have shortened the turn significantly, but I must have missed something because the AI fleet is currently nowhere to be seen... Gonna test again this evening.
-
terminator
- Field Marshal - Gustav

- Posts: 6115
- Joined: Mon Aug 15, 2011 12:48 pm
- Location: the land of freedom
Re: AI turn length
I have no problems with the AI turn length in official campaigns.