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

Basic question re AI: RTS versus TBS

Discussion in 'Civ6 - General Discussions' started by Stringer1313, Jan 25, 2019.

  1. Stringer1313

    Stringer1313 Chieftain

    Joined:
    Sep 10, 2014
    Messages:
    829
    I just saw this article about an AI crushing it on Starcraft: https://www.vox.com/future-perfect/...l-intelligence-google-deepmind-starcraft-game . As you know, Starcraft involves infinite amount of possible decisions every microsecond, and this AI was able to beat proplayers.

    I am confused about how an AI exists that is able to beat programmers in an RTS game involving an infinite number of possibilities and choices that have to be made every nanosecond, when the same AI is unable to play a TBS involving a smaller number of choices (granted, still a lot), on less of a compressed timetable.

    I also remember someone saying that the AI programmer in Civ 6 was brought over from Starcraft. To me starcraft is infinitely more complicated (and hard as hell, which is why i stopped playing). Why is it so hard to make a good Civ 6 AI?
     
  2. SxSnts9

    SxSnts9 Chieftain

    Joined:
    Jul 16, 2014
    Messages:
    124
    I think the problem is that they brought the guy over from StarCraft. As you said RTS and TBS are VERY different. I imagine the perfect coding for StarCraft does not match up well with a game like Civ 6. I know next to nothing about AI coding though so I'll leave the in-depth answers to the professionals. But Firaxis probably made the call to have shorter turn times over fantastic AI. I imagine there is a great 4x TBS AI out there...just haven't found it yet. Would probably drag turn times on for hours.
     
  3. The googles do nothing

    The googles do nothing Chieftain

    Joined:
    Feb 5, 2017
    Messages:
    189
    Gender:
    Male
    I've never played starcraft but it sounds like it has different complexity then civ. Only one win condition and only one opponent. Could the AI figure out exploits in the game like a human can, or did it just play the rules really well?
     
  4. Mr Jon of Cheam

    Mr Jon of Cheam Chieftain

    Joined:
    Oct 26, 2017
    Messages:
    420
    This is an independent AI designed by an organisation purely focused on AI with the express goal of demonstrating the potential of AI. It's very different to having a small team tasked with creating a competent AI for Civ, it takes a huge amount of investment and time.
     
  5. man_in_finance

    man_in_finance Chieftain

    Joined:
    Jan 9, 2019
    Messages:
    48
    Gender:
    Male
    Well simply because it is very hard to make AIs that are good at any complicated system. It was not "easy" to make one good at Starcraft. The work has been done over many years by potentially 1000s of people costing billions of dollars, and I suspect they want to keep the knowledge somewhat confidential for commercial reasons. I doubt Firaxis has that capability.

    Also note that these AI systems typically use neural networks so there is a problem with transparency and control. A neural network might be exceptional at making decisions but you don't know why it makes them and you might not necesssarily be able to tone them down - who wants to play against a supercomputer and lose everytime? Whereas the CIV AI is at least deterministically controlled and explainable.
     
    Zaarin, Uberfrog and Hatchie like this.
  6. SupremacyKing2

    SupremacyKing2 Warlord

    Joined:
    Oct 25, 2014
    Messages:
    4,196
    Location:
    Indiana
    I think it is easier to make a strong AI in an RTS because in a RTS, quick reflexes matter more. And a computer can have much faster reflexes than even the best player. The AI can implement its actions in a millisecond. For example, the AI does not need to move a mouse or hit a key on the keyboard to build a new unit, it can just do it instantly. And a human will take a little time to notice a problem on a different part of the map whereas the AI will know instantly that it is running out of resources or being attacked somewhere. Plus, the strategy in a RTS is not that complex. It usually boils down to build units and rush the opponent. The AI can instantly build units as soon as it has enough resources. Even the fastest human, will be slower than the computer at noticing problems or responding to them.

    On the other hand, TBS tends to favor the human player because there is no need for quick reflexes. Both sides can take all the time they need. So the quality of the strategies and tactics will be more important. And this is where humans will shine. Unless you are dealing with some machine learning super AI, most humans will always strategize better than a computer. And humans are really good at thinking outside the box and dealing with the exceptions like the case where normally X is the right strategy but in this particular instance, Y is actually the better strategy. Computers tend to just follow a rigid set of rules, if X do Y. They can't really think outside the box like humans can. So strategy games like civ where there is no time constraint, heavily favor the human player.
     
  7. Stringer1313

    Stringer1313 Chieftain

    Joined:
    Sep 10, 2014
    Messages:
    829
    Thanks! This was super helpful. The point about building quickly and attacking with a mob does make sense . Plus good starcraft players are good at micro and obviously AI will be perfect at micro (having the right units cast the right spells on the right targets, etc)
     
  8. Mr Jon of Cheam

    Mr Jon of Cheam Chieftain

    Joined:
    Oct 26, 2017
    Messages:
    420
    The problem with this argument is that the company who created AlphaStar also conquered chess and Go. If they wanted to create an unbeatable Civ AI then they absolutely could.
     
  9. uppi

    uppi Chieftain

    Joined:
    Feb 2, 2007
    Messages:
    4,111
    You may not be able to easily tone them down, but you could always use earlier AIs of the reinforcement learning cycle that still make mistakes instead of the latest one that has ironed out many of those. Once you have a framework for a learning AI, you would use the first passable AI that manages to play the game without hurting itself as the Settler AI and then you would start letting it play against itself. After some time, you freeze one (or several) versions and that is your next AI level. You can continue this for increasingly harder AI levels.

    At this point, I don't think you can claim that humans are able to strategize better than an AI. Go is a lot about long term strategy, and as of last year, the AI can outplay any human. What is true, is that at the current state-of-the-art, humans are much faster at recognizing mistakes and learning from them. An AI can "think out of the box", but only if you allow it to make actions that seem to be a mistake at first. But this means, that it will make a mistake many times until it recognizes that this mistake doesn't lead anywhere and it should just stop doing it. And for a practical AI, there is a time constraint for the AI, which are the turn times. If you take 3 minutes to play a turn, you wouldn't want to wait 21 minutes until all AIs have made their turn.

    My reasons why there is no good Civ6-AI:
    - lack of investment: You would need a large team of good (expensive) AI experts
    - computational complexity: Civ always had the complaint of long turn times, complicating the AI would almost certainly make it worse, especially on a wide range of hardware that players have
    - age: When development on the Civ6 AI was started, there was no way to tell that neural networks would have that much success
    - complex win conditions: makes it harder for an AI to judge whether a move will put it ahead
    - political game: There are many factions in a Civ game, which makes game theory very complicated
    - immersion: Players tend to react badly to an AI that is trying to win at all cost. They will be complaining when a Gandhi AI with +100 relations attacks you because it deems this the way to victory.
     
  10. Kaan Boztepe

    Kaan Boztepe Chieftain

    Joined:
    Mar 26, 2018
    Messages:
    75
    Gender:
    Male
  11. Disgustipated

    Disgustipated Warlord

    Joined:
    Nov 14, 2006
    Messages:
    10,658
    Location:
    Las Vegas
    I didn't see this thread when making my comment over in the AI thread. How many AI threads do we need after all.
     
    Ondolindë likes this.
  12. Wizard-Bob

    Wizard-Bob Always remember to Find Your FUN!

    Joined:
    Sep 7, 2010
    Messages:
    156
    Gender:
    Male
    Location:
    Florida
    Perfect answer! Agree 100%
     
  13. Wizard-Bob

    Wizard-Bob Always remember to Find Your FUN!

    Joined:
    Sep 7, 2010
    Messages:
    156
    Gender:
    Male
    Location:
    Florida
    Why AI is not as good as humans is very simple. The games GO and Chess are often mentioned. For those TBS games, what was the price tag to get AI to beat humans?

    Will never happen for Civ.
     
    Mesrot likes this.
  14. SupremacyKing2

    SupremacyKing2 Warlord

    Joined:
    Oct 25, 2014
    Messages:
    4,196
    Location:
    Indiana
    I think lack of investment and immersion are the two biggest reasons. Creating a really strong AI would cost way more than it would be worth. And the fact is that Firaxis does not really want the AI to win per se, they want the AI to play make believe, ie act like the personality of the civ leader. The purpose of the AI in civ6 is simply to give the player a "big personality" to interact with so that they are not playing by themselves.
     
  15. Unconquered Sun

    Unconquered Sun Chieftain

    Joined:
    Dec 20, 2006
    Messages:
    1,449
    DeepMind requires to be fed huge numbers of historic pro games before it can begin to improve. That was possible for Go and SC, but it isn't for Civ.
     
    bbbt likes this.
  16. Mr Jon of Cheam

    Mr Jon of Cheam Chieftain

    Joined:
    Oct 26, 2017
    Messages:
    420
    No more than the price tag to beat StarCraft?

    But yes it will never happen with civ for many reasons.
     
  17. Kaan Boztepe

    Kaan Boztepe Chieftain

    Joined:
    Mar 26, 2018
    Messages:
    75
    Gender:
    Male
    deepmind actually plays against itself too many times too count and does every move imaginable and checks if result is better than other scenarios. for dota2 last year , it did for a single hero on a single match and single lane more matches against itself than any 10 pros would play in a lifetime
     
  18. uppi

    uppi Chieftain

    Joined:
    Feb 2, 2007
    Messages:
    4,111
    Yes, those are business reasons why they haven't done it. The others mostly just drive up the price of a potential AI.
     
  19. Krajzen

    Krajzen Warlord

    Joined:
    Oct 23, 2013
    Messages:
    2,285
    Location:
    Poland
    Modern video game AI essentially boils down to manually typing a lot of code "if condition x then do y", with a bunch of weighs and stuff. Good luck making an illusion of an intelligent, capable opponent this way; an opponent capable of defeating human brain supercomputer when playing as complicated game as civ.

    AI can make very good impression in shooters, be acceptable in "simple" RTS games, but it tends to sucks among 4X and grand strategy games. It simply requires crazy amount of work.

    There is also another issue - in slow turn grand strategy games it is particilarly hard to hide the stupidity of AI when human has time to think and manage everything - in RTS AI inferiority is slightly less visible because it partially recompensates by being perfect real-time micromanager while human has to think and point and click.

    Civ AI is an insane amount of work which cannot really be advertised to masses, while very big part of playerbase doesn't care about it - after all, better AI means higher difficulty and less map painting...
     
    Last edited: Jan 25, 2019
  20. Karmah

    Karmah Chieftain Supporter

    Joined:
    Mar 3, 2011
    Messages:
    742
    I don't know what you intended to say. It is quite easy to gather carefully crafted logs if you put some basic collection server in place and ask players to cooperate by dropping their games logs. I'm pretty sure that if you had such logs of every games of every civfanatics since the start of civ 6 , you could already get going as some of us here have q. So it is not in place. It is not impossible
     

Share This Page