Timeouts

Victoria

Regina
Supporter
Joined
Apr 11, 2011
Messages
11,902
I found these just now... I knew they were somewhere.
I was wondering if anyone had tried to make them a lot longer to see if the game got smarter?

upload_2019-2-27_13-7-49.png
 
Aren't those for multiplayer turns? With all these Sound="Play_MP_Tactical_Turn_Start" thingies?
 
... but in essence do the phases timeout?
Yes. There is an amount of time to perform your deeds and it increases with the game progress. From the data it is somehow calculated based on number of units and cities, which make sense.
Disclaimer: I don't play MP, just seen some on Twitch.
 
What's the point of the single-player timeouts, then?

Might not actually be used in the final product.

Putting a timer on the AI wouldn't make much sense. What would happen when 10 seconds for an AI city is up? The running process may not be at spot in the code where it can assign any action at all.
 
What's the point of the single-player timeouts, then?
There has been arguments about how and why the AI is not as good as it could be and I have suggested timeouts may be involved.
To give you a simple example... an AI Caravel can move 6 tiles and has 3 targets and 2 additional supporting units that can also attack, defend or flee. What actions does it take to what tile?. This can take a huge number of computations. If you just left units to finally make their move then a game turn could take hours (but the AI possibly be much better)
One issue with expecting a better AI by increasing timeouts is the units coded decisions may be based on the timeouts applied by the game design.
Putting a timer on the AI wouldn't make much sense. What would happen when 10 seconds for an AI city is up?
It is a brave assumption to assume that 10 = 10 seconds when I typically see such settings automatically indicate 10 milliseconds due to my job (software performance). I also see the logs of the game measuring responses in milliseconds so making an assumption based on that and my experience that it is likely 10 milliseconds. Do you have anything to support 10 seconds?

If city has to make a decision as well as a unit, what to build and even perhaps it is involved in what to improve (possible but unlikely). Considering there is few cities in an AI compared to units, giving them a few more milliseconds to get a good decision seems sound. Also if tere is 8 units within a city range, which one does it shoot at? You also have to consider in a standard game there is 7 civs to move and a lot of their moves have to be done sequentially and so this can add up to a lot of time.
If a city or unit timeout occurs it is likely there is either a default decision or a best so far register so at least some action is performed.
Might not actually be used in the final product.
100% agree, but it is there and must be considered as a possibility, that is all I am stating.
 
Last edited:
I am pretty sure there are no "timeouts" on AI in single player.
The animations take time but this is not AI thinking. They are queued and displayed. All the processing has already been done.
If you want to see how much time the animation takes, run an auto-play in no-observer mode. It is still not pure-AI, because UI is active, etc. but turns times are hugely decreased. On my potato computer a turn for 8 civs @ T250 takes approx.10-15 sec. And this is an entire map, so like 100+ cities and 200+ units.
 
Thanks for your thoughts @Victoria There may indeed be some merit here. A few random thoughts:
  • Many have expressed how much faster VI seems with GS. I wonder what these values were pre-GS
  • Agree with likelihood of milliseconds - as a software developer, that would be typical
  • Might do some testing with extreme values here - reducing to 1 or increasing to 1000 to see impact on game
 
The animations take time but this is not AI thinking. They are queued and displayed. All the processing has already been done.
Indeedy... I am not saying they are there... I am saying they might be there so lets disprove it.
To me the simplest test would be to turn off all animation and play a couple of turns making note of turn times and then increase the timeouts and see what happens.... then also decrease the timeouts and see what happens.
The test should not be the start of the game but later when there are plenty of units and cities.

The vanilla and R&F parameters for this were the same
 
You can't have timeout in MP the way the game is coded, only "loop out".
 
I doubt they've coded it differently for MP and SP, I also doubt they've used the same variable name for humans in seconds and AI in milliseconds.

Hope I can save you some time, but I won't prevent you to test late game turns if you really want to.

Setting MP, normal values
Spoiler :
Clipboard-1.jpg


Result in game for human's player
Spoiler :
Clipboard-2.jpg


Changing the base timer value
Code:
UPDATE TurnSegments set TimeLimit_Base = 500;

Result in game, same MP settings
Spoiler :
Clipboard-3.jpg
 
So, if those times really are just for MP turns, then why are there single-player values? Just for completeness?
 
So, if those times really are just for MP turns, then why are there single-player values? Just for completeness?
Suppose you want to train for MP or have a feel what's MP might be like while playing SP, or want to help yourself to stay focused and sharp, hone your thought-discipline skills while under time pressure.
 
So, if those times really are just for MP turns, then why are there single-player values? Just for completeness?
The engine is designed flexible enough to support SP, hotseat, MP, split phases, etc. From its perspective one of players being human is pobably an exception. That is why there are references to LocalPlayer in UI everywhere.
I can imagine that you can i.e. test how timing works in SP that way, you don’t need others for that.
 
Back
Top Bottom