CIV 4 - AI Requests

I'd go a step further, Trip. If a computer player were playing for a cultural victory, the foundation would be there in playing as an expansionistic war monger. If you have a huge Civ that's highly productive, highly stable, highly profitable, the AI would only need to rush all kinds of cultural improvements in one city.

The same would be true, then, if you introduced an economic victory into Civ 3. The most economically viable nation would be the most expansionistic. Clearly the same is true about the space race.

The victory types don't really open up different gameplay styles at all, because one gameplay style is simply the most rewarding. Hence, the AI might as well just go for the "bigger is better" approach -- with very little depth.
 
Maybe the victory types have to be made such that bigger is worse for some of them...
 
Yeah, that's what I think. Or -- a different way of saying the same thing -- there is a bonus to being small. Even if it's as simple as expansionistic empires spend a lot more trying to expand and build new settlements, while someone else manages to achieve the same economy and same army within a 6 city empire.

A bonus for peace would be a welcome addition, as well. In real life these days, Nations try to encourage peace for economic reasons. When war is going on, you lose access to important trading partners and trade routes -- even when two of your friends are at war. So maintaining the peace maintains a lot of benefits from trade -- no nation can prosper as an island. (A metaphorical island, not a physical island.)

And how can people worship your culture around the world if the world is your enemy?
 
dh_epic said:
For what it's worth, though, I bet the Galactic Civ AI (not that I've seen it in action) would probably outwit most of the Civ 3 AI because of that fact.

The GalCiv AI would beat the Civ3 AI if they are playing GalCiv. The Civ3 AI wins if they are playing Civ3. The game balance for each is astoundingly different, almost opposite. In GalCiv, all tactical advantage goes to attackers. In Civ3, most advantages go to defenders. So the GC AI in Civ3 burns itself out to no useful end, while the Civ3 AI in GalCiv would split its forces between "attack" and "defense" and go down in flames when the haymaker knockout punch socks it right between the eyes.

Watching the GalCiv AI playing itself (AI vs AI warfare) I find no strategy. The sides throw themselves at one another, everything they've got leaving no reserves, and the first one to collapse (other side reaches their planets in force) is finished.

Ah, but throw in a third party! Human player or other AI backstabs one of the first two AIs, whose forces are all away from home. EASY PICKINGS. This is in fact the uber cheese of GalCiv gaming. Those who rose quickly to the top of the Metaverse ladder (after the scoring change to close out the "thirty ten minute games on beginner outscores one five hour game on top difficulty" loophole) did so largely on the strength of pitting the AI's against one another, no matter the cost. (And the costs to buy AIs into attacking one another would stagger Civ3 players, they are HIGH). Then the human players swoop in and hit undefended worlds in an "alpha strike" to hit all worlds in one clip and wipe out the defenseless target.

The only defense in GalCiv is a good offense. The only way to defend is with your navy in the field. If they get to your planets, you lose.

The GalCiv AI has one leg up on the Civ3 AI, and that is on the diplomatic front. The GC AI has four primary diplomatic behaviors (or strategies) while the Civ3 AI has only one. This makes the diplomatic game in GalCiv much richer, though the AI's inability to pursue anything other than the biggest navy it can muster eventually undermines that.

From a purely objective standpoint, the Civ3 AI is stronger. Not in every area, but in the total package, definitely. And yet there is so much more that could be done with AI. Somebody's going to do it some day, somewhere, in some game. Here's hoping that game will be Civ4!


- Sirian
 
Ah well, I didn't mean to make a point about how combat is done in GalCiv so much as the combat focus of GalCiv is all you really need to win Civ 3. If you have an AI that is proficient in combat in Civ 3, then nothing else matters.
 
Wow, interesting discussions especially on GalCiv, a game which I have not played but have heared has a good AI.

I want to go back to the point I was making a while ago. I still think that ultimately, given realistic limitations on Firaxis and the kinds of machines they want Civ4 to run on (I expect the medium range P4 2.0ghz machine would probably be their recommended / low end machines by Civ4) we have to pull back a bit from setting our expectations to high.

With that said, ultimately, what this genre entails is strategizing. Planning and Execution.

On a tactical level, there is little argument that the AI has always been very competent in the execution of its moves. It can read the board very well and can take advantage of bad moves made by the human players (hence the save and reload phenomenon with so many TBS games)

What the game falls down on is on the Planning and Strategizing elements of the game. Developers tend to go with a preprogrammed 'catch all' AI flavours (defensive/offensive) that attempts to be the optimal macro 'AI strategy' for all situations. This ultimately leads to the fact that the AI is left with no facilities to plan and create a long term strategy, but rather react to the current situation.

People tend to talk about diplomacy, war and building as seperate spheres, but as human players we all understand that each sphere builds on the other, and a civilization that dominates one sphere tends to dominate all others. So this goes to my belief that providing the AI with the ability to forecast expected future variables for itself and its rivals and use these expectations to form short / medium / long -term plans will lead to a much improved AI in all spheres. The same data could be fed into all 3 spheres and lead eventually to coherent macro strategies.

If the AI forecasts that it will to be disadvantages in 20 turns given current known variables, this may trigger one set of diplomatic actions (heavy trading and relationship building with other AI) which in turn could tie into its building sphere a change in priorities to build certain buildings to 'shore up' forecasted weaknesses and ultimately a change in war strategies. If may for example decide to pick off another Civ which is projected to become even weaker or alternatively stay pacifist to buy time.

What I want the Civ4 AI to strive for is internal consistency in all spheres. It may not mean the AI would become harder to beat, but I would expect that by virtue of being more consistent and having facilities to forecast the future, it can make plans according and react with a sense of time, rather than out of time.

In terms of realistically seeing this happen, I believe it is possible. Forecasting models are not an unknown science and there are plenty of models out there for the developers to use (or they may choose to employ multiple models and take an weighted average score from multiple projections) and making many many calculations is something computers are quite good at doing.
 
I think an internally consistent AI is an important goal, maybe even more valuable in some ways than a challenging AI.

The problem is that you're also assuming that players are internally consistent. They aren't. Players are opportunistic, greedy, almost psychopathic. See post 127 to see what I'm talking about (and what I'm proposing). A player will keep an ally for most of the game, and then turn on them when it's the most profitable. A player doesn't care about reputation, in fact, it'll probably let a bad reputation slide and go after a weaker player who tried to play honest.

Still, an internally consistent AI should be in the balance... but addressing a deeper gameplay issue -- maybe it should be profitable to play consistently.
 
Fascinating thread. But I wonder if too much effort will be spent on the AI and not on the 'rules' per se. It seems to me that a lot could still be done with the current AI level (not the system of how it is programmed - I know nothing of that) with modifications to the rules and the hardcoding. For example, i always feel that there is not enough balance with war. How is it that a middle ages government can continue to spend the same on research when at war as when at peace? Doesn't all that stuff (purchase and maintenance of arms, horses, etc.) cost money? And what about higher prices for goods, the general disruption in society (moving from frontlines, running from pillagers, recruits, etc.), or the internal cost of feeding all those troops? Shouldn't a country at war build up debts or reduce scientific leanings? (As an aside, perhaps there should be two components to science - public and private). I always wanted to see an additional payment penalties to make going to war more costly.

Or armies. Yes, I know they are broken as is, but even in the old way, there is no penalty for losing an army. Seems to me there would be a huge morale problem or increase in war weariness if a key army/leader was killed. This would make you use an army with more care.

The balance for the game 'win' is definitely out of whack. I'd like to see a turn away from the military which is dominating the game too much.

That said, the key imporvement in the AI is not making it smarter in the strict sense, but making it better able to use what it has. Even some hardcoded responses to particular actions could make the AI 'smarter'. That is, it would take actions in situations where it currently does nothing or not take certain actions where it currently does something. For example: The AI always seems to make troop incursions over your boarder. This should mean something. Currently it doesn't (they just take the shortest route from A to B regardless of who they go through). But if the AI avoided it except when it had a ROP or wanted to 'truly' probe your defense in preparation for an attack, the AI would force the human to be the 'cause' of attack more often (instead of repeating the 'remove troops' command every turn until they declare war). This small change has huge ramifications, which I assume you see in MP (which I don't play). This doesn't require a smarter AI, but an AI that better uses the rules that are in play.

The only way to do this today may be to actually write up responses (scripts) to certain situations. And while this has nothing to do with AI programming, if one had a processor that could make the calculations fast enough, it would make the game a more enjoyable experience, because the opponent responses would be more logical.
 
ukrneal said:
The balance for the game 'win' is definitely out of whack. I'd like to see a turn away from the military which is dominating the game too much.

Im not trying to advertise my thread or anything but id just like to propose my idea that I have recently posted on these forums. I wont go into details coz it takes me too long to explain because I waffle a lot. Anyways, basically the best (well, most realistic IMHO) way to solve the military problem is to impose restrictions on the number of cities that can be occupied. This wouldnt take the form of a rock solid limit but more of a steady increase of unhappiness and corruption for the more cities youve occupied. This would be particularly true for the Democracy and Republic govts which specialise in scientific research. While govts such as Communism and Facism would suffer much less from occupation related unhappiness but (particularly in the case of communism) commerce and hence scientific research is severly reduced.

These elements are already starting to show up in the C3C game, particularly with Facism which can support a large military and low war wariness but is very limited in terms of culture production. Also communism is limited in commerce thereby reducing scientific research for a govt that is suited to conquest. These balances work well in the short term, but once an enemy is conqured completely you suffer almost no effects from the occupation of territories. This is totally unrealistic, there is not a single empire in history that has managed to continually conqure more and more lands until it controls the entire globe. Sooner or later the people begin to get unhappy with the continuing cost of conquest and occupation of lands that are not their own, corruption sets in as the government is forced to govern larger and larger areas and the military is spread thiner and thiner. These gradually take their toll on a civ until civil war, revolution or invasion from outside forces causes the empire to collapse.

Sorry to waffle but I just cant comprehend the logic behind Firaxis when they decided to allow a single civ to expand and expand without any limitations. Sure, in the current game you suffer from increased corruption the further away from the capitol you are, but who cares, so long as your central cities are doing an okay job in supporting your military, you can keep conqureing as if there were no tomorrow.
 
I think an internally consistent AI is an important goal, maybe even more valuable in some ways than a challenging AI.

The problem is that you're also assuming that players are internally consistent. They aren't. Players are opportunistic, greedy, almost psychopathic. See post 127 to see what I'm talking about (and what I'm proposing). A player will keep an ally for most of the game, and then turn on them when it's the most profitable. A player doesn't care about reputation, in fact, it'll probably let a bad reputation slide and go after a weaker player who tried to play honest.

I'm assuming you are responding in part to what I said in my previous post

I think you misunderstood what I meant. Consistency in the way I derscribed it is derived from the fact that the AI's various spheres of activities (military, diplomacy, macro empire management) will be dictated by a consistent set of variables (both current and forecasted) which will allow it to make 'internally consistent' decisions.

My key point was really on the forecasting. I believe strongly giving the AI tools to forecasting will emulate the human's ability to look at the map and sort of tease out potential threats and potential 'targets' for invasions. Giving the AI tools to forecast (via forecasting models) is what I was talking about.

The data from these models could then be used for the AI leader to make important strategic decisions. If one civ is projected to grow increasingly powerful, and it is close, the AI leader may decide to do something about this. And because we have a consistent set of variables to work on, the diplomatic, military and macro empire management spheres of the AI will all recognize a common enemy and act accordingly.

This is something the current Civ3 AI lacks. As already described, the AI takes an assesment of the 'current' state of the game. This lack of forecasting (making projections) makes the AI miss rising threats against it, and make internally inconsistent decisions. It's diplomacy for example is almost independent of its macro economic, and military policies. It acts randomly and without reason because each sphere is not really connected to another. AI's may sign treaties one turn and break them because the diplomacy routines really don't communicate (and don't see any of the variables) the AI threat management routines (I'm sure there are some) are looking at. What we want is for the AI to identify threats and act consistently accross the board.

Edit: I don't agree completely with your assesment of 'the player' as there are many types. As a player, I value my reputations highly because I tend to lean more towards peaceful trade/opportunistic landgrab and controlling the world through my economic power rather than breaking treaties left and right to get the maximum benefit for myself. But this is for another discussion and completely OT. :)
 
Not completely OT :) I think you, as a player, play how I'd LIKE to play. Except somehow, I always get caught up in the greed of winning by domination. And, as such, I go through war serially. Everyone is my ally except one person, and then so forth. I'm not saying there's no merit to how you play, but there's certainly no rewards in Civ for playing the way you play.

And as long as the rewards for valuing your treaties are miniscule compared to the rewards for breaking them, a competitive AI has every reason to play inconsistently.

I think the AI issues are very much tied to improving the whole strategy of the game, in my opinion.
 
You still don't quite understand where I'm getting at.

Consistency has nothing to do with how long it keep you as a friend. It however has everything to do with a coherent macro strategy that is multi faceted.

When I pick a target or targets, I build my strategy around this target. Do I need more of X buildings? What new units do i need? Which treaties do I need to sign. Do I renew trade agreements? Decisions are made based on an a plan.

The Current Civ3 AI does not recognize it. It recognizes threats on a military level, and acts accordingly but this recognition has little effect in how it deals with the world in its foreign policy and trades. What I have proposed is to give AI forcasting tools.

The AI will use forecasting algorithms on its own data and well as other Civ's data to tease out historical trends. Which civ is rising, which civ is waning. And then use a combination of forecasts to project into the future what these variables would look like (GPT, military size, pop growth, science rate etc) From this, it can form 'expecations' on how a variety of fields.

For example. GPT and Science. It can compare what it projects to have in X turns with what it projects other Civs to pull in in X turns. This would allow it to guage if it should build more infrastructure to compensate for a weakness.

What I'm ultimately trying to get at is to allow for the AI to form reasonable expecations based on its strengths (number crunching). It is true that human players don't count GPT or science beakers per turn put into a spreadsheet and make a forecast of what we expect to get in 20 turns. However, we do somethign similar in how we asses the 'play field' and guage the relative strengths of each civ and where we expect to be.

The AI, lacking the faculty of a highly developed cranium needs specialized tools. While it will use game data in a way humans don't use, what it will ultimately do is roughly approximate the 'expectation' formation we do at ease all the time. Not only that but forecasting models also allow the AI to tease out historical trends, which can also help it look at the relative growth rates of its rivals and that data could play a role in how it deals with the world.

And hopefully, with this kind of toolset at its disposal, the AI can act with internal consistency in the way it goes about playing the game, on a macro level. That is, its economic, political , diplomatic and domestic policies are coherent, make sense and are geared towards some intermediate goal formed in part from its forecasts.
 
So really, you're talking about giving the AI more heuristics than relying completely on algorithms. "Assume the guy next to you is ready to attack you." "Assume that 2 troops isn't going to be enough to win." "Pick a goal and stick with it." "Think of how this interaction contributes to your goal." "Think about how this tech trade will affect your conquest."

This would certainly be more realistic... maybe even more effective.
 
Well giving it a forecasting toolset is just more algorithm. But it is to approximute human heuristics on macro strategy management. We can look at the board and form reasonable expectations of which Civ to target and where we think we will be given current growth patterns without much trouble.

The AI can't. But what it can do well i crunch numbers and by marrying this ability with the known science of forecasting (there are many many models out there the developers could use) we could have an AI that can essentially form expecations of the future using current and past data. It can then act accordingly given this data.

The AI needen't do this every turn, but say every 5 turns is sufficient. In the interim, lower level algorithms would be active to manage the progress of its plans and unit movements.
 
You know, I don't think that's too far off from what a human would do and DOES. And I think it's very possible.

I do think that there is bigger stuff at work, though, when it comes to AI discussions. I do think we need to address the dilemma with having an AI that either plays viciously and ahistorically, or an AI that plays for historical believability and always loses out to a vicious player. It's tied very much into gameplay -- what do you reward players with in the game?
 
A well-designed, historically-oriented game will play force both AI and player--no matter how vicious--to play according to historical standards.

Example:

A game with range limitations will keep even the most expansionist civ within its area of the map--vicious or not. (This is actually one of the things that makes civ game-play far to simple for a game with that kind of scope IMO; every single military event in history has had to function in terms of supplies first and tactical manuevers second, hence the way things turned out--decision-making, like what dexters intends the Civ4's AI to do, comes afterwards.)

The thing with the AI is that it has to be able to function properly without running into jams. Civ3 does the latter (relatively speaking) but not the former (i.e. if civs are communicating internationally in 3000 B.C. it's not the AI that's the problem but the game mechanics (or in this case, lack of mechanics that would make for a more historically-meaningful game).

Now, I have nothing against throwing in a few little design tweaks to make the AI a little more challenging (e.g. coordinating with allies to attack enemy from two fronts simultaneously). It's just that the above approach makes it easier to be historical by simply placing some historical limitations rather than developing a big-blue-style AI.
 
I hate using the word limitations... I prefer to use the word "hurdles". E.g.: to be able to expand beyond your ancient chunk of land, you have to jump over the "code of laws" hurdle", and/or perhaps the "feudalism" hurdle.

But all in all, good show.

The race is too one-dimensional in previous versions of Civ. But I'd really like to see Civ 4 become a multidimensional race, with progress in one area opening up progress in another, let alone progress in one area limiting progress in another. That would solve a lot of AI problems, to really define the directions of the game in quantifiable multiple paths.
 
Has Firaxis said anything about how moddable the AI will be (if moddable at all)?

More than just aggression level or preference for certain items over others; I'd like to have the ability to set things like minimum force size before AI attacks, tendency to explore, tendency to retreat, chances that it will attack a superior unit...I think what I'm asking for is a corresponding value in the editor for most of the things the AI does.

On thing people have not put enough emphasis on IMO: the AI needs to be able to use every tactic a human would use, at least for the vanilla game.

For instance, even in the final version of Civ3 (C3C v1.22), the AI is quite incapable of taking unit abilities into account (e.g. paratroopers that don't paradrop, artillery that don't move or even bombard much of the time, inability to take advantage of submarine unit's invisibility, build armies, etc.--and that's in the vanilla game).

(I don't know why this thread stopped, it's not like the topic is dead.)
 
A thing that would be VERY interesting IMO, is different civs using different AI srategies, more elaborate then the building preference and agressivness available in CIV3. For example, there could be different warfare strategies (stacks, all-out, flanks, diversions, artillery trap, etc...), different defensive strategies (front lines, city based, etc) or different diplomatic strategies (Ex: certain civs could be treaturous while other would often keep their words, certain civs might be tougher traders, asking for more....etc.). The possibilities are enormous.

This, with the presence of a maximum amount of different civs, would make it a lot harder to predict the AI's behavior and would add a great amount of challenge and possibilities (like for GOTMs). It would also make the higher difficulty levels a lot tougher.

In civ3 they brought a differenciation in what the civs could produce (UU), in civ 4 their should be a differenciation about the way they behave...

(sorry if differenciation isn't an english word ;) )
 
Back
Top Bottom