I'm Going to State the AI Problem as Eloquently as Possible.

Originally posted by ETO_Peregrine

Civilization is far more complicated than chess, but computers today are far faster than they were when chess was one of the only computer games. Yet the Civ III AI doesn't seem to use the principals of the basic chess AI. It doesn't attempt to predict the future game state based on its actions, nor does it follow clear goals. Compared to the complexity of the game, the ruleset that the AI uses is very rudimentary, and so produces the inexplicable results we've come to loath.

Great post ETO, and while I BASICALLY agree with what you're saying (especially about those stupid settlers) i think you fail to see the real differences between Chess and Civ.

The most simplistic factor of Chess is that you can only move ONE peice each turn. Now, I'll make a conservative estimate and say that during the mid-game (of chess) there might be around 80 possible moves per player per turn. If the computer was going to be looking 10 turns to the future, that makes around 80^20 (80^2^10)(a DAMN big number) of possible combinations, of which the A.I has to choose 1 of the original 80.

Emphasis on the " choose 1".

Now Civ in the Late Game. Lets say 16 civs, (15 held by AI, obviously) Each civ hold around 20 cities (again a conservative estimate). All are railroaded, and each civ holds around 100 military units. Now, say your empire covers around 500 tiles. According to the Chess AI, the computer must AT LEAST try to move all 100 units to ALL 500 squares, PLUS any possible forays into enemy territory. Thats around 600^100 = A HUGE NUMBER The main difference is the fact that the computer can move MORE THAN ONE UNIT!!! . Now, if the computer was going to try to predict the movements of ALL the other civs 10 turns into the future, then that would be 600^16000
(600^100^16^10). Now multiply this by the other 14 civs that the computer is controlling.

Then add in unit construction, building construction, wonder construction, tech/tax/happiness rates.

As I hope you can see, comparing the chess AI and the CIV AI is physically NOT POSSIBLE. CIV is not an exagerrated game of chess, it's a simplified game of life. The CIV AI CANNOT predict future outcomes, but must be programmed to act only on the CURRENT STATE OF THE GAME! ONE TURN AT A TIME!! Even this is enough to strain computers, especially once you add in the animations, and all the other eye and ear candy.

I hope you guys are starting to respect the amount of info your brain can process :p
 
The problem realy isn't with the AI. It's the fact that we've ONLY got the AI to play against. It's like walking into a gym to play pickup basketball, and the only opponents you can face are sixth-graders. Sure, you can make the game tougher for you by adding more sixth graders on the opposing team or making all of their baskets count for more points, but in the end, they're still sixth graders and beating little kids at basketball gets old real quick unless you're one of them yourself.

I think this game will show a lot more strategic depth once people are able to face off against other people. Until then, we're just playing one-on-one against a pack of middle schoolers.
 
Originally posted by PaleHorse76
Leave God's name alone, Stuka. :p Until Thunderfall says their is a problem with it, it is his.

Take not God's name in vain.
(Besides, it's a common megalomania syndrome associated with Civ players, so be nice. ;))
 
Originally posted by Zachriel


Take not God's name in vain.
(Besides, it's a common megalomania syndrome associated with Civ players, so be nice. ;))

HA!!!!!!!!!!!
 
So far no one has framed the AI problem in the way I see it. The AI problem has little to do with technical factors. The problem is that a better AI means higher costs and fewer customers. No publisher is going to sign up for that mix. I believe the current AI is decent, as it can beat 20% of players on a level playing field. With more resources for AI development, that percentage can be increased.

My first premise is that only a few players want a better AI, maybe 20% of the total audience. Read the many whining posts by players frustrated by the game to get an idea of how much market share a better AI might cost the company. I got a whiff of this when I suggested several ways to make a better AI for the upcoming Master of Orion 3 game. Several fans went ballistic and said they would throw the game in the garbage if innovative ideas such as an adaptive AI (one that learns human strategies and adapts) are put in the game. Believe me, publishers pay close attention to people that want to throw their game in the garbage, especially if the suggestion increases their costs :)

My second premise is that a decent AI is a doable project, given enough time and budget and the right approach to the problem. Aye, there's the rub, time and budget. The Civ III AI is primarily the responsibility of one programmer, Soren Johnson, who has other duties as well. I am of the opinion that he is a brilliant guy and has done a good job given the limitations placed on him.

Triple the AI budget and I believe it can get good enough to beat 40% of players on a level field. Maybe 10x it and you get to 60%, and have something going. Ten times the AI budget probably means an increase of around 25% for the overall budget as there is marketing, management, graphics, other programmers. But that is still a significant increase in costs and unfortunately a decrease in the customer base.

One cost effective way to approach the problem is to let fans script the AI. The start up costs are huge for developing the scripting language and the processor, but once in place it becomes a powerful engine. Ship the game with a few basic scripts and let the fans have at it. The Darwinism that takes place on boards like this one would lead to a better AI. Each fan's scripts would have a different personality. Have a random selector at start up from available AIs and a human player can get close to a multiplayer feel in single player games.
 
Programming an AI is probably THE most difficult thing to do in a game, so I will advise everybody to refrain on easy and fast judgement like "it sucks". Sure the AI is light-years below any human, but I personnaly consider that it does a good job on comparison with other games AI. Perhaps not outstanding, perhaps not THE BEST, but nevertheless a very honorable job.

And I'm not precisely a fanboy, so i'm not biased on this subject :)

I hate the design of the AI (=> not emotional, too much "playing a game" rather than "impersonnating a civ"), but on "raw power", it works well and is quite well programmed.
 
BillChin I feel you are right on the money, the reason for not having a stronger AI is that the benefit/cost ratio does not pay off. While many of us enjoy a challenge and pulling out from those certain failures (my favorite game I played in TA was one where I was constantly just about to be obliterated and had to make precision raids with my el-cheapo units to survie), there are more who don't. Unfortunately a majority of the customers don't like a game where they can consistantly (or even always) win. There have even been complaints from people because they only got a low rank in that post game rank system.

A user editable AI component would of course as you said be the ideal situation. It would allow the developers to design an AI for the 80% general fan of the game. And then let hard core fans design an AI for the 20% who want a strong AI.
 
Originally posted by Jazz_Newton

As I hope you can see, comparing the chess AI and the CIV AI is physically NOT POSSIBLE. CIV is not an exagerrated game of chess, it's a simplified game of life. The CIV AI CANNOT predict future outcomes, but must be programmed to act only on the CURRENT STATE OF THE GAME! ONE TURN AT A TIME!! Even this is enough to strain computers, especially once you add in the animations, and all the other eye and ear candy.


You're right on the complexity issue. What I meant to say is that the Civ III AI should use some of the same principles as the chess solution, not the same algorithm. Though, you'd be surprised at exactly how powerful modern CPUs really are. The AI wouldn't be able to think up to thousands of turns ahead like the chess AI can, but it should be able to make guesses about the future. There are constructs that the computer can use to logically boil down the entire game state into a form simple enough to process in a reasonable time yet faithful enough to the game reality to make decisions that make sense to human observers.

The computer can be made to focus on certain areas at a time just as the human player does. Given a set of priorities, the AI could calculate what units/squares/cities to treat with concern and which to ignore, at least for the time being.

For example, if the AI has stack of 200 units on campaign, it should be aware that the square that stack is on and the surrounding game elements are of vital importance, whereas one of its ships on patrol isn't that crucial. Or, putting a settler next to a resource should be a more important goal to the AI than plopping a city on all desert tiles.

Just as a note, I'm not trying to senselessly bash Firaxis and its programmers, but I am disappointed in the lack of advancement in AI evident in Civ III. I think Civilization deserves better.
 
Originally posted by Craterus22
I have fond memories of the AI for OGRE by steve jackson games (C64os)- this was from the late 80's(ithink)


OGRE, a classic game. I hadn't even though about it for many, many years. Thanks for reminding me.

Your right though, OGRE was a good game.

Bill
 
Give it up for customizeable AI!

I can't believe that people would cry about a better AI... While I don't want a game that I lose every time, I also don't like games that winning is a foregone conclusion. I don't care for a "cheating" AI, and I really don't like losing 5 to 1 battles with startling regularity.

It's easy to say "this AI sucks", but have you ever tried to tell a computer exactly how to think? I remember an old game called Omega (also for the C64) in which you had to program your cybertank to compete with others. Unfortunately, some of the things it was supposed to do didn't quite work right, and I really didn't have the time to figure out what the real rules were, as compared to the (HUGE) manual, so I never went terribly far with it.

One thing that could possibly be done is to make use of all that time wasted animating things. While you're watching a troop walk from one square to another, that half-second of time can be used to figure other things out. Yes, most of the thinking for a player has to be done before any moves are made, but who says you can't have the next player do his thinking during the animations of the current one? And who says you can't have the AI thinking about things while you're spending the 1-20 minutes necessary to take your turn?
 
Originally posted by TheDS
One thing that could possibly be done is to make use of all that time wasted animating things. While you're watching a troop walk from one square to another, that half-second of time can be used to figure other things out.

Yes, I agree. Except for the very first time I played, I have turned off all animations.
 
I think ETO(and some of the other guys here) touched upon one of the things that I was trying to indicate with my OGRE post (it was late and I didn't have time to get into it)

The AI does NOT have to figure out every units every possible move as described above in the Chess scenerio. In chess you have to calculate out the individual moves BECAUSE it is a small game board. You have to calculate out future moves BECAUSE there is vast movement(and long attacks) possible every turn(bishops, rooks etc.).

The civ AI at the very least should be doing a point total of danger for every visible square. Most Dangerous Areas are ranked and assigned to an agent ai. Agents of the AI should be tasked to take control of a group of units located in a particular area. The overall AI sends production units to the agent ai... "Do I have enough attack strength under my control to attack grid 20,75 (or even an area of squaresdepending how they set up the ai) ?"

Is the ratio of my strength to thier strength between these two opposing forces better or worse than the previous turn? (am i gaining on them? the ai can also do a soft prediction of production potential-moreaccurate if spies are used-in a game like civ the future can be estimated usingsimple charting techniques based on the past ratios and potential production). Some variation of percentage of acceptable attack force strength could be included to keep the attack random(avoiding the "But I had 1.5 times thier strength-they weren't supppossed to attack!" arguments).

I hope this clears up the misconception(by some people) that the civ map should be treated like a big chess board. At the very least we should all realize that there are more empty squares on the civ map than on a chess board.

More places to go for sure - but not more INTERESTING places to go... at least not if the Overlord AI is doing its job to keep peace with neutrals and allies.
 
Lots of people seem to like making comparisons between the Civilization AI and AIs in chess. I would suggest that any such comparison is completely invalid, since the games are so much different. If one insists on making comparisons between far simpler games and Civilization, with respect to the AI, I would suggest comparing it to backgammon. Backgammon is still a relatively simple game, but unlike chess, and like Civilization it is a game of chance (uses dice). Backgammon AIs use vastly different techniques to chess AIs, in a game with a relatively similiar number of states, simply because one is a game of chance, and the other is not.

Further, anyone who still insists on making comparisons between chess and Civilization should consider that the game of Go! is similiar to chess in that it is a finite state, deterministic game, which has a higher branching factor than chess (but nowhere near that of Civilization). AI Go! players are dismal compared to human Go! players simply because of the higher branching factor. Thus I would suggest the comparison is totally irrelevant, and programming a computer to play Civilization is a totally different problem to programming a computer to play chess.

Also, I make the observation that although many people complain that the AI isn't good enough, the requests for a better AI are much varied, and the various requests often conflict with each other.

The most obvious request is for an AI that is simply harder to beat. Another request is for an AI that negotiates in a more sophisticated manner. Also, many people seem to think that the AI expands far too quickly, and would like it changed to use a more "balanced" strategy. Further, some people seem to want an AI which they can develop a repore, a friendship with, who they can give gifts, and who can help each other out in battle etc, presumably because the human player wants to feel all warm and fuzzy inside cause "they're our friends and we help each other".

Firstly, expanding quickly is a damn good strategy in Civilization 3. This is why the computer uses it. It's one of the good things about the AI, and if it didn't do this it would be easier to beat. This means that people who don't want it to expand as fast are in conflict with people who want it to be harder.

Being able to negotiate better probably isn't in direct conflict with any other goal, but it's certainly a hard thing to do, and would take time away from developing other areas. I would love to see the AI able to negotiate well - and I would love to see truly sophisticated negotiations. For example, I would like to "carve up" territory between an AI and myself, i.e. say to them "you can have cities in that region, and we won't build cities there, if we can have cities in this region, and you don't build cities there". Or to be able to somehow communicate with AIs on battle strategies, "we will attack this city if you guys attack that city" etc etc. Of course, this is hard; damn hard. I do think it would be possible to do, but I don't think it's the sort of thing we'd see anytime soon.

As for the AI feeling "gratitude" to you, I think that's nonsense. The aim of the AI is to win the game, same as the human player. The idea of a game is never to have compassion or kindness on other players. The AI is not a tamigotchi, which you make your pet and it shows gratitude to you in exchange. Saying the AI should show gratitude to you is like saying that you think if you are playing basketball against another team, and you are whipping them by 30 points, that if you go easy and let them have a few points, so you only end up winning by 10 or something, that you'd like to see "gratitude" for that.

Now, I think the AI in Civ3 is currently pretty decent. Most people here have probably been playing Civilization of one form or another for five years. I'm sorry, if you have been playing for five years, no AI is going to have a hope of beating you on even terms. That's just the way it is. There are a few problems with the AI which could be fixed, such as it just not building barracks for some reason, which admittedly is extremely annoying since it makes it alot easier than it otherwise might be. There are a few other complaints I have with it, but overall I think it's pretty decent.

And yes, a somewhat sophisticated AI could do analysis like "well this city can't possibly get taken so I don't need any troops in it at all, but that city over there is on the border, and my enemy has 10 cavalry approaching so I need to put as many spare troops as I can in that city", but it would be a substantial amount of effort.

So yes, the AI is decent; it's not brilliant, but it's not terrible either. If you want an AI that is difficult, try playing FreeCiv (http://www.freeciv.org), and then think about what it costs you - the AI of FreeCiv doesn't know about peace either (that's right it's always at war with you). You said you wanted a really hard AI right? :)
 
Let me keep this simple.

The Civ 3 AI we all know does stupid illogical things, that in diplomacy, trades, et al.

When I cut a deal for a tech swap with a civ, and then throw in three bonus resources at no extra cost which causes that civ to KILL the deal and insult me over what I supposedly did to some third civ two thousand years ago, then that AI is braindead.

When the AI declares war on me when my attempt to plant a spy fails, even though I am thoroughly superior militarily, it is braindead. When it suicidally refuses to make peace, even though losing city after city, on anything but a treaty for treaty basis, it is braindead.

When a civ won't accept generous trade offers because they don't like my reputtion based upon something that happened on another continent millennia before to a civ that became extinct 500+ years before they ever heard of them, that AI is braindead.

The examples go on and on. Settler Diarrhea is an example. Most of those crappy annoying towns the AI throws up everywhere are not viable in the long run and just are a waste of time.

Bottom line: the Civ 3 AI strategically may be similar to Civ 2, and is a little better in massing for invasions. It still doesn't learn well at all and repeats mistakes. BUT, the Civ 2 AI never did as many stupid things as the Civ 3 does. And, yes, they both still build battleships in lakes. I would have thought that nonsense would have been solved by now. Maybe in patch # 1.99.
 
Zouave you keep whinning about this "settler diarrhea" problem, but I do not see it. Any half way decent player knows that to have a chance in winning the game, they have to secure as much territory as possible. And this is extra important because of resources. In all my games, from game one, I have matched or exceeded the AI in land grabbing and I will plant "useless" size one cities if I think they will give me an advantage of some sort.

The only way to counter the logic that leads to mass production of settlers is to put in hard code stops, something to prevent you from having more than X cities at a given point in the game. Remember the reason why the game does not advance like history is because all the players are focused on the extreme long term, they don't care about the next 10yrs, only what the world will look like in the 20th and 21 centuries.
 
et

almost anyone that has played the game once has seen "Settler Diarrhea". your greatness aside, it is a weakness in the game.

as a strategy it is weak - all you do is create targets for your enemies to attack - especially when you make a point of putting them in isolated areas with little defense.

the game has a functional, but poor ai. something usefull to practice against if this was a MP game. something not interesting to play against when it is a SP game.

it is not impossible for an ai to be a challenge, that follows the rules of the game. saying its impossible or too expensive is ridiculous. if you build from the begining knowing what the general rules of the game are... the ai you build should be able to follow the rules that you created.

also, if the game AI can hold a grudge for 2000 years it ought to be able to recognize a friend for 2000 years.

the AI should have a sense of survival...

here is a question for you - if you are on the brink of extinction who would you attack first? the most powerful civ in the world? or the guy right above you on the ladder?

or would you make a deal (whatever it takes) to have a stong ally help you attack the guy above you on the food chain...

I have seen the ai pound against the strongest civs with no hope of victory (let alone survival). I have also seen it attack weak civs too, but the stupidest AI should know an impossible battle when it sees it - this one doesn't

I have seen the AI do naval invasions of one ground unit on an island that has 20 enemy units. there was no plan or goal involved that I can discern.

we have all listed the weaknesses of the AI before - I will try to limit the amount I post about in the future(everybody knows what they are-right?)... I won't be able to convince some people that there is anything wrong with this game and thats alright... because that isn';t the point-I think most people post about weaknesses to the game in the hopes that the game will be improved if the problems are known.
 
I have seen the AI do naval invasions of one ground unit on an island that has 20 enemy units. there was no plan or goal involved that I can discern.

I do stuff like this all the time. Usually, it's because I focus a lot more on expansion and city improvement, and have only the most minimal military until toward the end, when I've built everything I can. Sometimes I send a couple units at the enemy to distract them, and think there is an invasion immenent, or better yet, set a good defender on a mountain and let the enemy waste half a dozen units unseating him.

I am annoyed at some of the negotiating, though. The other AIs intrude on my territory, then balk when I try to boot them out. They even DOW me when I'm clearly strong enough to conquer them and everybody else! But if I happen to be on a tile that they just laid claim to, watch out! I better get out now, or I will start a war! And then after I take all their cities, some other jerk goes sour on me (I swear Alexander is eating Lemon Drops) and claims that I violated a Right of Passage with the other guy that invaded MY territory! Huh?

I also get annoyed when they make completely unreasonable offers (1 luxury for 3 techs, 200 gold per turn....), but if I offer something fair, "They will be insulted"! Why can't I be insulted? Maybe that's what "Not a Chance" is for?

I would like to see a Civ surrender, like in Alpha Centauri. I would like to see a Civ be willing to surrender a city or two, or trade cities.

I'm not worried about a civ showing "gratitude". Over time, relationships neutralize. If you don't do something positive for some one now and then, they're not going to care much about you. But they'll probably always hate you. So since I don't hand out bribes that often, it's not surprising to see that I don't have the best of relations at the end of the game, when I'm tough enough to whack em all if I want.

You wanna see good diplomacy? Take a look at Europa Universalis. That's an awesome game, with only one major flaw: it's RTS, but at least you can easily pause it, and it acts much like TBS, and like Dune, it makes sense for it to be RTS. EU2 is out, and I haven't had a chance to get it (still playing with Civ3...)
 
Back
Top Bottom