June/July Patch Notes

I don't think the bar is that high. Seeing the AI arc around helplessly when it pops a Great Person is just silly. (Even sillier is the Great General wandering around unguarded.)

Don't think the AI being good enough to beat a human straight-up is realistic either, but aside from combat AI, if it just put together a decent opening infrastructure strategy it could do without some of the massive high-level bonuses. (Multiple techs, multiple extra units, multiple cities/settlers.)

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.
 
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.

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... :)
 
I bet the AI in StarCraft II could play circles around the AI in Civ V at Prince. I would love to see a time in Civ when Diety is where the AI and player are completely equal.

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:
 
The reason that free chess game is so good is because there's a fairly small number of permutations to a chess game.
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.
 
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.
 
I don't mean to sound like I'm defending exactly how bad the Civ5 AI is, but I'm not sure you understand how difficult a good AI is to program. The reason that free chess game is so good is because there's a fairly small number of permutations to a chess game. A modern computer can calculate every single possible combination of moves for the entire game in just milliseconds. Since the board always starts the same, it can also be pre-programmed with entire sequences of winning maneuvers from the opening and when the board or portions of the board match a certain configuration. It can also very simply analyze one move versus another to objectively work out which is better, since the only goal of the game is a check-mate, which can only be accomplished a finite number of ways.

A game like civ is exponentially more complex in every single aspect, and therefore these same approaches don't apply. Think of it like predicting the weather. It's much easier to determine what will happen in an indoor terrarium than it is to predict what will happen outside. Meteorologists are also frequently wrong for the same reason that it's simply a much more complicated problem than most people realize.

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.
 
People keep bringing up SC2 as an example of "good AI", and although I'm a noob at the game I find it poor. It's strats are incredibly predictable: it just relies on high apm on higher levels (if I had 1000 apm I'd do decently too). Civ is *much* more complex in it's mechanics than SC2 and the options available are far more open-ended than "build units and send them crashing into the opponent's units" which is essentially what the SC2 AI does. So no disrespect to SC2 (love the game) but it's not the pinnacle of AI programming some make it out to be imo. Sorry to go OT.

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.
 
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.

What was the budget on that project? Adjust for inflation, please.
 
What was the budget on that project? Adjust for inflation, please.

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.
 
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... 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.

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.

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).

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.
 
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...

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.
 
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.

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.
 
That's exactly what he was responding to. People aren't complaining that Diety is too easy because of the mechanics, diety is too easy because the AI is inept. If the AI in the free Chess game that comes with Windows 7 can be as good as it is (granted I haven't played it much, but it seems pretty good) the devs of Civ Devs should be able to make an AI in a single player focused game that can at least compete with a person without having massive cheats.

I bet the AI in StarCraft II could play circles around the AI in Civ V at Prince. I would love to see a time in Civ when Diety is where the AI and player are completely equal.

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:

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.

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
 
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.

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).
 
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.
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.
 
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".
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.
 
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
 
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.

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).

- 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.).

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.
 
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).

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.
 
Back
Top Bottom