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

June/July Patch Notes

Discussion in 'Civ5 - General Discussions' started by 2K Greg, Jun 17, 2011.

  1. binhthuy71

    binhthuy71 Emperor

    Joined:
    Nov 3, 2003
    Messages:
    1,887
    Location:
    Southern California foothills
    LOL! Your first sentence reminded me of the days in Civs III and IV where you had to add the line "AI no patrol" to the .ini file just to keep the turns from taking half an hour while AI units milled around aimlessly.

    I agree with your second point; the resource/build options in the first few turns are limited enough that it seems possible to hard-code a few optimal strategies for them. If the AI got off to a better beginning then it might not need such massive advantages throughout the rest of the game.
     
  2. ElWanderer

    ElWanderer Warlord

    Joined:
    Apr 1, 2006
    Messages:
    117
    Location:
    Woking, UK
    Now I'm flashing back to Civ II and being worried the game had gone into an infinite loop moving an AI unit around in a big circle on my railroads (infinite movement along railroads, who thought that one up?!)

    Waits to be 1-upped by a Civ I comment... :)
     
  3. Megalomano

    Megalomano Chieftain

    Joined:
    May 30, 2011
    Messages:
    48
    Location:
    Mexico
    A better A.I example would be the one of Galactic Civilizations 2, it is so polished that the computer player doesn't cheat AT ALL to win in the highest difficulties, instead it uses pretty good dynamics (counters) and proven tactics(from actual players), it also compares its current progress every turn and acts accordingly, in lower difficulties they make more human-like mistakes, have less knowledge on how to counter a human player and use bad tactics that somebody new to the game would make.

    In CiV the A.I doesn't even notice when they are about to lose in diplomacy (even when they build the UN themselves), or cultural, they just sit there spamming units and (eventually) backstabing everyone else in the map with their 500 cannon carpet :lol: they also start asking for a ridiculous amount of gold and cities when they are at war with you just because they have a stronger army, but they never realize that they have not killed a single unit (due to its own incapacity to wage wars over water or get past a choke point ), so you just have to wait until they get really bored and finally declare peace for free.

    Just hope future games start revolving more around better gameplay (satisfaction, immersion and options for every player) and advanced A.I instead of shallow graphics and overused cheesiness (Loading screen and tech quotes). So instead of 50 Artists you can have 50 Chess players/programmer formulating and creating a really good virtual player, hell i once read about a computer that could beat a world chess champion, without cheats of course :rolleyes:
     
  4. Libertarian

    Libertarian Pansophist

    Joined:
    Nov 1, 2001
    Messages:
    186
    Most calculations of the permutations in a chess game are somewhere between 10^29505 and 10^31248 — none of which take into account a 9-Queen game for either side, which itself would raise the number by thousands of orders of magnitude.

    Incidentally, as a former champion of my state (not bragging, just offering credibility), I wouldn't characterize the free Windows game as "so good". I would say that it has a decent 3-move tactical examination algorithm and an openings database that isn't half bad.

    But it is strategically very weak and easy to beat with careful play.
     
  5. Bringa

    Bringa King

    Joined:
    Jan 23, 2006
    Messages:
    677
    Played through a game as Aztec on the new patch. New finish-a-policy rewards feel pretty good. Early culture from racial passive + social policy that pretty much does the same feels very powerful. AI still very, VERY bad at dealing with anything involving the ocean (water scary! AI no go near it!) Even though Japan had a much bigger army, I built a bigger fleet (bigger than... nothing) and just bombarded him into the ground. Five destroyers in range of a city means you don't even need to bring artillery.

    Fun game, but I didn't feel like the AI was stronger.

    Have 2K/Firaxis said anything about non-sync turns for online multiplayer? I mean I guess I could always save after a round in hotseat but that strikes me as silly.
     
  6. WeaselSlapper

    WeaselSlapper Prince

    Joined:
    Mar 16, 2009
    Messages:
    505
    I am a programmer and I understand exactly how hard it is to program an AI. However with the money they've made from this series they have the resources to make a competent AI. To be honest I've always been amazed at how they are able to do what they've done with the AI in civ games, but the AI in 5 is just plain bad.

    You're overselling the complexity of Civ and underselling the complexity of Chess. Both games have basic strategies and gambits and both there's multiple ways to get checkmate. I'm not saying they are equal but Civ is not exponentially more complicated. And even if it were they made a computer ten years ago that could beat the best Chess player in the world straight up.
     
  7. WeaselSlapper

    WeaselSlapper Prince

    Joined:
    Mar 16, 2009
    Messages:
    505
    I'm not saying the AI in SC2 is the pinnacle of AI, but it is good and much better than the civ AI. Granted I'm not as good at SC2 as I am at Civ, but it does seem to build units that counter the ones I'm throwing at it. I'll give you that it may just seem that much better because it can micro every part of it's game at once which is a lot more important in SC, but it at least gives a good appearance of being competent.
     
  8. Bandobras Took

    Bandobras Took Emperor

    Joined:
    Jun 27, 2007
    Messages:
    1,922
    Location:
    Orem, UT
    What was the budget on that project? Adjust for inflation, please.
     
  9. WeaselSlapper

    WeaselSlapper Prince

    Joined:
    Mar 16, 2009
    Messages:
    505
    I couldn't find a budget for the project, but it was IBM's "Deep Blue" project and they did it in 1997, almost 15 years ago. Here's a link to the Wiki: http://en.wikipedia.org/wiki/Deep_Blue_(chess_computer). If you can find a budget for it I would be interested to know as well.

    I would bet that the budget for Civ 5 was substantially more than a project IBM did as an experiment that they made zero financial gain from (they dismantled the computer shortly after it won).

    There are also several chess engines that can be very competitive in tournament play against humans. If 2K cared about Civ 5 they would go and recruit some of the people that develop those engines.

    Now I'm not saying I expect the AI to be able to beat the best Civ players straight up, but it should be able to at least beat an average to good player in a fair fight.
     
  10. Txurce

    Txurce Deity

    Joined:
    Jan 4, 2002
    Messages:
    8,274
    Location:
    Venice, California
    The biggest difference between the Civ 5 AI and earlier versions is 1upt. Its task is exponentially more complex than that of earlier versions. Chess and any version of Civ? "Exponentially more complicated" doesn't do Civ justice.

    You might lose that bet. IBM was exponentially bigger than whoever backed Sid Meier way back when. And the Deep Blue project was a highly successful gambit in public relations, and probably had an aura effect on the entire company.
     
  11. player1 fanatic

    player1 fanatic Fanatic

    Joined:
    Mar 19, 2002
    Messages:
    2,639
    Gender:
    Male
    Location:
    Belgrade, Serbia
    That's a myth. GC2 AI had bonuses at higher difficulties just like Civ games. The only difference was that on some lower difficulties AI was dumbed down.
     
  12. Grassland Farm

    Grassland Farm Warlord

    Joined:
    Apr 16, 2011
    Messages:
    242
    Location:
    Le mighty motherland France
    My very own reaction to the update:


    YES! YES!



    God, a bonus for filling SP. Thanks, Thanks god.
     
  13. MkLh

    MkLh King

    Joined:
    Jul 18, 2008
    Messages:
    903
    Location:
    Finland
    I wouldn't even use the word "exponentially" - Civ is infinitely more complicated game than chess in a computers perspective. In chess there are probably less than 100 possible moves in each turn. In Civ there are so many possible moves you can't even imagine that number. The basic approach of chess programs (seeking through a search space of possible future moves) just isn't viable in Civ.
     
  14. elprofesor

    elprofesor Pluri-editing poster

    Joined:
    Oct 28, 2010
    Messages:
    773
    Location:
    (hint: I can type "Ñ")
    I did a (very basic) attempt to program a Chess AI a year ago. The "brute force" algorithm doesn't work, my computer could hardly handle 3 moves in advance. I've read that an AI has been created that can apply the "brute force" algorithm to ensure victory, but it can't handle more than 7 pieces at the same time, combined (Chess starts with a total of 32 pieces); it was called "playing Chess with God".

    The Chess AI works because:
    -there's a very large database of Chess games. You can "hard code" some of the most well-known situations for optimal results and computer efficiency.
    -the Chess AI has been developped for dozens of years.
    -there are extremely good players that can analyze most situations quickly. Thanks to their analysis, algorithms that "value" a certain disposition of pieces on the board, so that only the most "beneficial" will be analyzed with the "brute force" algorithm.
    -the number of possible movements (20-30) and the number of turns till the end game are both VERY small compared to Civilization 5, plus you can (and have to) do more than one move per turn in civ: troop movement, buildings, gold-rushing... In Chess, when facing an unexpected situation (which happens way less often than in Civ, because of the previous reasons), you can expect to pull something off with "brute force" for some turns. You are going nowhere with this approach in Civ, it just isn't viable; so you have to rely on "valuation" algorithms made by the devs... while hoping there is one for each situation you face.

    The AIs will get better at managing their economy very fast with patches because of well-known optimal openings. But the militaristic AI will always have trouble, because you can't hard-code all the possible dispositions of troops. Plus, the devs have to choose: improve the tactical AI or improve the strategical (i.e., maximise revenues and get to victory as fast as possible) AI.

    IMHO, RTS AIs are better than Civ5 AI because everything goes so fast that tactics are in the background of the grand picture, so only the "strategical" AI needs to be improved to make a challenge. And then you've got the 200apm that has been mentioned before too...

    PS: for something to be exponentially more complicated, you need to have a progression, or some other kind of variable. If both are fixed, then you could say as well that they are inversely proportional, since you can always add a multiplicative factor :p
     
  15. Trias

    Trias Donkey with three behinds

    Joined:
    Oct 1, 2008
    Messages:
    594
    Since the civ AI must be able to deal with different mods, it can't use hardcoding. It can be pushed in the right direction by the xml, but it cannot rely on hardcoded openings. Instead it has to figure out the opening from "first principles" (i.e. the various XML values).
     
  16. Libertarian

    Libertarian Pansophist

    Joined:
    Nov 1, 2001
    Messages:
    186
    With respect, I'm afraid you're terribly misinformed about chess. Above, I gave the number of chess permutations (not including 9-Queen games because that's been shown to be too difficult to calculate). It is indeed a number you cannot imagine.

    Also, the best chess programs don't work by "seeking through a search space of possible future moves". They begin with a database of openings that includes grandmaster games over the past hundred years or so. If you stay "in book" during the opening, the computer will move almost immediately and will play perfectly. (That's why Kasparov played such weird openings and defenses against Big Blue, and also partly why he lost. His idea was to take it out of book almost immediately.)

    But once you're out of book, the computer examines positions (not moves). This used to be done by brute force until IBM programmers worked in conjunction with human grandmasters to produce algorithms based on "rules" developed over time about such things as the effect of pawn positions (closed, semi-open, and open, etc.) and other things. That is, the best computers now emulate what humans do — namely, they ignore examination of pointless and futile variations, which reduces the number of positions they must examine by many orders of magnitude.

    The best programs also now have strategic algorithms, which they had lacked before. Becaue they will and do take advantage of a 7 by 10^35000 tactical matrix, they are nearly impossible to beat tactically. You will not, for example, catch them in any Morphy-type wow-what-a-surprise combinations that end with untenable positons for them. In fact, they will unleash tactical surprises that you have missed, forcing for example the loss of your Queen in six moves.

    But the best programs no longer do brute force strategic examination. Rather, they have a singular strategic algorithm, taken directly from the play of people like Capablanca, Petrosian, and Fischer. In other words, they work to simplify the position as much as possible through the exchange of equal material, constantly on the outlook for even the slightest positional advantage. They do this by "scoring" the variations they examine, and then playing the one with the highest score. In the rare event of score ties, they will select a random one among them.

    And so, the computer's middle game is fairly boring unless the human falters tactically.

    But the end game is all book, just like the opening. Every known ending position is programmed into it, and so its only task in simplified ending positions is to work "backwards" from the winning position to the current position and then moving accordingly.

    The point of this whole TLDR is that it is a false dichotomy to compare AI algorithms for chess and for Civ. There is a completely different underpinning play model. It's made more difficult in Civ NOT because of the possible permutations but because of the inability to devise the kinds of databases that chess models use. The Civ AI must play "by the seat of its pants" because there exists no century's worth of opening and ending positions.

    The difference is easier to see if you consider the way both chess programs and the Civ program offer levels of play, from most difficult to easiest. The chess program null hypothesis is the scoring of positions, and so its default is to play perfectly. For easier settings, it's simply a matter of selecting the positions with lower scores thus giving the human a chance to take advantage of "mistakes".

    Civ, on the other hand, works oppositely. Its null hypothesis is to make the best possible play within the rules at the lowest levels, and then to "cheat" at the highest levels by ignoring rules that bound humans.

    I hope this helps to facilitate a better understanding of how the two compare — or rather, how they really don't at all.
     
  17. Trias

    Trias Donkey with three behinds

    Joined:
    Oct 1, 2008
    Messages:
    594
    Note that the civ5 AI, actually follows that same principle. It scores possible positions and then chooses the one with the highest score. According to some of the prerelease dev interviews it even has the build in mechanic of not always choosing the
    highest scored option on lower difficulty levels.

    The problem for the civ AI is actually scoring the various positions. There are various aspect that make this much more difficult in civ than in chess.
    - Civ5 doesn't have centuries worth of human playing experience to help build algorithms that score positions.
    - The civ5 AI has to account for changing rulesets. It has to work for almost any XML mod, and therefore has to evaluate positions based directly on the XML data. (Relying on a database of standard situations, simply is not an option.
    - Civ is a limit information game. This means that the AI has to make "educated guesses" to evaluate a position. This is something that is very hard to program. (For this reason the civ AI (at least in past iterations) is given slightly more information than the human player, to simulate the experience and knowledge of the human player in guessing what is happening in the rest of the world.)
    - There are actually a lot more positions to consider. This especially true for the tactical AI, which each turn has to decide which of its units to move and in what order.
     
  18. Libertarian

    Libertarian Pansophist

    Joined:
    Nov 1, 2001
    Messages:
    186
    Thanks for those corrections, Trias. I do think we agree, however, that a comparison of chess AI and Civ AI is of the apples and oranges variety.

    Lib
     
  19. elprofesor

    elprofesor Pluri-editing poster

    Joined:
    Oct 28, 2010
    Messages:
    773
    Location:
    (hint: I can type "Ñ")
    Are you sure about that? Programming a decent AI with a given ruleset seems already a titanic task. I'm not in the dev team, so I have no idea of what they are thinking, but getting a good AI for the core game, while coding some extreme cases, seems more important than building an AI that can answer all possible modded situations (because of the impossibility of "brute force" algorithms, and the limits of an "evaluation" algorithm).

    That's a very important point that hadn't been covered before, and one of the reasons the AI enjoys so much putting ranged units in the front line.
     
  20. WeaselSlapper

    WeaselSlapper Prince

    Joined:
    Mar 16, 2009
    Messages:
    505
    Yes, that is the case. I've seen several interviews with the development team and they have designed the AI to work with virtually any mod. They said that since modding has been such an important part of Civ they wanted to make sure the AI could handle anything the community could throw at it.

    One thing I just thought of that could really help the AI at least in combat is program in a few different types of cases. Like if it's vastly outnumbered it will go into Guerilla Warfare mode and only fight battles it knows it can win and survive, obviously this would be defense only. Also if it looses too many units in a given location (a choke point for example) it determines the situation is a no win and looks for a different route or tries to come in from multiple ways at the same time, think the Persians at Thermopylae.
     

Share This Page