1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Loading times for Civ VI

Discussion in 'Civ6 - General Discussions' started by Plus Ultra, Jun 6, 2016.

  1. stealth_nsk

    stealth_nsk Deity

    Joined:
    Nov 28, 2005
    Messages:
    5,513
    Gender:
    Male
    Location:
    Novosibirsk, Russia
    Because that's the only area where AI could actually benefit from being multithreaded.
     
  2. AriochIV

    AriochIV Colonial Ninja

    Joined:
    Jul 25, 2006
    Messages:
    5,958
    Location:
    Nehwon
    In theory, a multithreaded AI could do some pre-calculations during the player's turn, and then finalize the calculations and make its moves during its own turn.
     
  3. stealth_nsk

    stealth_nsk Deity

    Joined:
    Nov 28, 2005
    Messages:
    5,513
    Gender:
    Male
    Location:
    Novosibirsk, Russia
    This sounds good, but quite hard in reality. AI struggles to take into account human player moves for 1 turn, and this system requires taking into account 2 human turns.
     
  4. dexters

    dexters Gods & Emperors Supporter

    Joined:
    Apr 23, 2003
    Messages:
    4,182
    Gender:
    Male
    Location:
    Canada
    I think things like research path, decision trees on how to optimize empire management, what civic to pick next, grand strategy stuff looking 20-30 turns out could be done.

    The turn by turn responses to human actions would obv need to be held back ,and there could always be a check for some of the decisions made to see if the variables used to calculate a decision during player turns are still valid.

    I think the AI will be making a lot of longer term decisions that what happens in 1 turn won't affect it, if it simply refers to the turn before that as a guide post for its decision 20 turns out. And if those decisions points are staggered randomly with an RNG roll to prevent humans from finding out on which turns the AI is doing those projections, it would be pretty seamless I think.
     
  5. stealth_nsk

    stealth_nsk Deity

    Joined:
    Nov 28, 2005
    Messages:
    5,513
    Gender:
    Male
    Location:
    Novosibirsk, Russia
    Processor work required for these things could be considered zero, compared to tactics calculations.
     
  6. dexters

    dexters Gods & Emperors Supporter

    Joined:
    Apr 23, 2003
    Messages:
    4,182
    Gender:
    Male
    Location:
    Canada
    Would it work if the processor load is used to calculate AI-AI interactions , like a war between two AIs? or would the programming be too complex ?

    Since I assume the stuff we see IBT between two AIs fighting could be calculated beforehand.
     
  7. stealth_nsk

    stealth_nsk Deity

    Joined:
    Nov 28, 2005
    Messages:
    5,513
    Gender:
    Male
    Location:
    Novosibirsk, Russia
    For areas human player can't see the AI could actually use some simplified rules or just some single calculation for both sides, not assuming they don't know each other intentions. There are a lot of potential for optimization.

    If human player could see battles, it means human player could interfere and so calculations are the same as with AI-Human wars.
     
  8. 4N4C0ND4

    4N4C0ND4 King

    Joined:
    Aug 1, 2013
    Messages:
    413
    Gender:
    Male
    Location:
    Spain
    One thing that might speed things up is the new stacking possibilities; if we assume that the AI will have the same amount of CiV units, and know how to basically stack, it will cut a bit the calculations. Also, with the builders having charges, I hope the AI will have less civil units to control.

    Please tell me if I'm wrong, but I assume the loading times are almost exclusively linked to how AI chose to move it's units.
     
  9. stealth_nsk

    stealth_nsk Deity

    Joined:
    Nov 28, 2005
    Messages:
    5,513
    Gender:
    Male
    Location:
    Novosibirsk, Russia
    It could depend on several factors. As I know, a lot of time between moves is just spent on animations, not AI calculation and could be significantly cut by settings and mods.

    Other than this - yes, the time between moves is used for AI calculation, because that's what you have between turns - AI moves.
     
  10. Plus Ultra

    Plus Ultra Conquistador

    Joined:
    May 27, 2016
    Messages:
    702
    Location:
    Spain
    I have 0 programming knowledge, so bear with me. My question could very well be stupid.

    As long as we have city states, barbarians, >8Civs and the 1UPT system... >20 second turns are always going to be a thing in the Civ series from now on?

    In other words, is there only "so much" that can be done (reasonably) to optimize the game and make use of all that new fancy stuff available like multithreading, 64bit, GPU Ram, etc?.
     
  11. stealth_nsk

    stealth_nsk Deity

    Joined:
    Nov 28, 2005
    Messages:
    5,513
    Gender:
    Male
    Location:
    Novosibirsk, Russia
    First of all, if the length of turns is limited by animations played, there's nothing we can do other than disabling animations :)

    Speaking about the rest:

    1. Computation power grows. Not as fast as 20 years ago, but still grows, this means the same things are calculated faster.

    2. In the recent years new thing appeared, which allows calculations using both CPU and GPU (graphic card). If load on GPU is low (say, we don't display any dynamic 3D between turns) this could allow calculating things even faster, but even if we show some 3D, GPU have some spare resources available for us.

    3. There could be other limits (like speed for loading files from disk), but with amount of memory we have now, that's not an issue at all.

    So yes, the better our computers become, the faster we could calculate the same things. The problem is - instead of just repeating the same things, developers try to calculate more - use more advanced algorithms, take into account more gameplay mechanic and so on. This way we'll likely still have some significant delay between turns.
     
  12. AriochIV

    AriochIV Colonial Ninja

    Joined:
    Jul 25, 2006
    Messages:
    5,958
    Location:
    Nehwon
    There's a finite amount you can do to optimize any algorithm, but I can pretty much guarantee you that Civ V's AI processes could be much more efficient than they are. There are many games that deliver a better AI experience with much shorter processing times.

    Part of the problem may just be that the core AI design in Civ V is not very efficient (as in doing a lot of unnecessary stuff), and there's not much that can be done to optimize it. Judging from what Jon Shafer has said about the AI design (that it was very complex and ambitious but did not yield very interesting results), I can easily imagine that this is the case, at least to a certain degree. But given what an unreasonable resource hog Civ V has always been, and how poorly XCOM2 is optimized (even though it's based on the Unreal engine), I very much doubt that the Firaxis engineers have exhausted all possible optimization options.

    However, with a new ground-up engine and AI design, it's certainly possible that a smarter, less-processor-intensive AI algorithm might be significantly faster (and even more so if it's well-optimized). We'll just have to wait and see.
     
  13. stealth_nsk

    stealth_nsk Deity

    Joined:
    Nov 28, 2005
    Messages:
    5,513
    Gender:
    Male
    Location:
    Novosibirsk, Russia
    This doesn't mean they have more effective AI, more likely they have easier tasks for AI. To put it short, writing AI for stack-based Civ is a hell easier than for 1UPT Civ.

    Also, there are several things to consider:

    1. Priorities. AI experience and turn times are important, but there are more critical things. Crashes are worse, total imbalance is worse, so these things need to be put first. As far as I remember, Civ 1-4 didn't have even single dedicated AI developer.

    2. AI needs to adopt to gameplay. The rules change during development and, to some extent, post release and AI needs to be adopted to them. This makes AI somehow losing as it may be developed only in quite late stages of more or less stable gameplay.

    If we don't consider performance, the best way is to make rule-based engine which allows quickly changing and testing AI behavior. This allows making way better AI (Age of Empires 2 even had tournaments between AI bots), but with significant performance hit, as rule-based engines are not as effective as direct algorithm implementation.
     
  14. Plus Ultra

    Plus Ultra Conquistador

    Joined:
    May 27, 2016
    Messages:
    702
    Location:
    Spain
    Thanks AriochIV, Stealth_nsk

    It seems reducing time between turns is difficult if you wan't to keep the A.I as complex and interesting as possible, but there is certainly room for improvement from Civ V.

    I guess we'll need to wait and see, it can't possibly worse that Civ V, so there's that.
     
  15. JtW

    JtW Prince

    Joined:
    Aug 23, 2010
    Messages:
    575
    Location:
    Poland
    I was always wondering how Paradox games manage to handle over a hundred countries in real-time, and I have to wait a minute for my turn in Civ5 in the late game. stealth's explanations help me understand.

    I agree that managing tactical AI for 1UPT is complicated. TBH, it is my only gripe with 1UPT. I like it as an idea but I feel it doesn't add enough to justify a poorly running game. I am wondering what architectural changes could be done to make it more efficient. Maybe having the AI analyze the map before the game, identify strategic points, chokepoints, etc, and then use that analysis throughout the game? Maybe minimize army movement in peace time? Have concurrent turns like in Civ5 multiplayer?

    I don't know enough about AI development to really know. All I know is I don't want to wait 1-2 minutes between turns once I hit the modern era.
     
  16. Kyuss

    Kyuss Chieftain

    Joined:
    Sep 20, 2002
    Messages:
    46
    Location:
    Madrid
    That is the single most important problem for me and it breaks my immersion completely. I don't want to wait to a game NEVER.
     
  17. dexters

    dexters Gods & Emperors Supporter

    Joined:
    Apr 23, 2003
    Messages:
    4,182
    Gender:
    Male
    Location:
    Canada
    I brought this up in the thread earlier. Since I want to see AI moves relevant to me those animations will need to play. I don't feel the wait on my huge map games particularly onerous and I can't usually parse out how much of each turn is spent calculating the AI vs. informational map animations
     
  18. TheMarshmallowBear

    TheMarshmallowBear Benelovent Chieftain of the BearKingdom

    Joined:
    Dec 27, 2006
    Messages:
    7,550
    Location:
    Inside an Ikanda.
    Would be cool if they added QuickTurns mod features, so that only your enemies' movements are enabled during war time.
     
  19. TheMeInTeam

    TheMeInTeam Top Logic

    Joined:
    Jan 26, 2008
    Messages:
    25,739
    What percentage of the map is in vicinity of human units on a turn to turn basis?
     
  20. Plus Ultra

    Plus Ultra Conquistador

    Joined:
    May 27, 2016
    Messages:
    702
    Location:
    Spain
    Well, that depends right?

    Worst case scenario... If you can now take control of city state armies, we see what happens in other cities through spies, and you have an army/navy strategically positioned in the map... I'll say about 30-40% of the map tops?
     

Share This Page