Game engines. Civ3 vs Chess

Lab Monkey

Peace thru ultraviolence!
Joined
Mar 13, 2002
Messages
1,202
Location
London
I was just reading another AI rant, and I wondered, what would have the most complex engine, Civ3, or a chess sim?

Obviously, many of you would immediately say Civ3, simply because of the ammount of variables involved, but I'd say chess.

Chess has a massive variety of moves open to it (opening strategies number millions). Civ 3 as we have all seen follows very predictable attack/defend/settle strategies. Chess also has a more complex relationship between the pieces and their co-ordinated strategies (combined arms seems outside of Civ3's talents), as opposed to Civ's objectives.

I play both games, and have found chess sims far harder to master than Civ3, and far more adaptable to player strategies, wheras Civ3 is predictable in it's use of mathematics to make it's decisions.

I know this is a pretty poor argument, but I'm sure there are more chess players out there who can elaborate on any of my points (and I don't have the time to structure a proper essay :lol:
), this is just something to muse over.
 
I think what you are getting at here is that the Chess AI is "better" than the Civ one, as it is more adaptable and less predictable.

If this is right, then I think you touched on the reasoning in your post - the amount of variables.

AI's invariably evaluate tens/hundreds/thousands/millions of possible moves, giving each one a "ranking" dependent on the expected outcome. It then makes the "best" move. With chess, there are several orders of magnitude less moves to be evaluated per turn.

What I'd really be interested in, is whether the AI in Civ actually tries to predict ahead as to what the "board" will look like in 20 or 50 moves - I doubt it!

I think that the Chess programs do do this - the grandmasters certainly do!
 
Well... compared to Civ3, Chess has a very homogenic set of rules, and a very small playing field. Few pieces to move, too.

That doesn't make chess easy, I'm just saying the people who created the AI for Civ3 had to take a lot more different decisions into consideration. It has to get land for cities, make and improve cities, produce units, research, trade and more in addition to just moving pieces on the board. So it takes a great many decisions in Civ3 just to make a strategy possible.

So in some ways, I think it might be more difficult to program a Civ3 player than a chess player.
 
Chess you know how many "units" you start with, have a much smaller number of "squares" to move in, are technically always at war, move one piece at a time and know when you attack you win. I think that allows chess A.I. to look 20-30 turns in advance and help determine the possible outcome of a certain move.

Even if civ A.I. could figure out a way to factor in all potential movement for 20 turns in advance there are so many different things that can happen it's pointless. So I think civ A.I. would be harder.
 
Another difference: Chess games tend to have more pieces at the start of a game, and fewer at the end because of inevitable attrition. CIV3 has fewer units at the start and more at the end.

When they first started to write chess programs, they thought that the programs would do best at endgames because they would have fewer pieces and would have a better chance at calculating all the possibilities. Surprisingly, the chess programs were worse in the endgames than they were in the other phases of the game. Why? The endgames are more purely "rule-driven" than the openings and middle game and, in the early days, computers did not "know" the principles of endgames. For example, in many endgames a human player would know that he could trade a knight for a couple of pawns (even though in the opening and middle game the knight is usually worth more) because he could see that the 2 pawns could not be stopped, and he would get a queen eventually. Computers would try to win endgames tactically, using their "general purpose" algorithms, and fail miserably.

Do you think the start of a CIV3 game is based on different principles of play than the later phases of the game? I think that it is likely that the CIV3 AI would be stronger if it had different AI engines for the start of the game vs. later when there were more units on the board.

If the CIV game family lasts as long as chess playing programs, the AI could get a lot stronger in the next 30 years.

I used to beat all the chess programs, but then they got a lot stronger. If the CIV AI got a lot stronger, I suppose then you could configure how well you wanted it to play, like chess programs today, (the best of which would beat me unmercifully), because some players would not like to lose every game.

The good thing about the AI getting more skillful would be that it wouldn't have to cheat to provide a challenge..... :lol:
 
In chess,

Originally posted by Jason Fox
when you attack you win.

I think I know what you mean here. In chess, when you move a piece on top of an enemy piece it always kills the enemy piece, whereas in CIV you have to "roll the virtual dice" to see who wins.

At first I thought you meant that when you attacked the enemy king you always won. Chess players use "attack" to mean a kind of aggressive coordinated manouver, usually with several pieces, not just a single move. That kind of "attack" in chess doesn't always work, of course.
 
Yes, the random element in Civ is a big difference. It makes predicting many turns into the future much more complicated. For every turn you try to predict, the randomness will increasingly mask the future with uncertainty (noise).
 
This has been a thoughtful, intellegent discussion, at least so far. Thanks, guys, for a pretty good thread.

The CIV AI is very unsatisfying in many ways, but it's just a baby, and I think it would be damned difficult to make a "master" skill level AI because of the many challenges.

Another way to look at this is that Infogames/Firaxis has to decide what % of the buyers of this product care about the AI's playing strength. If 99.9% of the CIV3 customer base consists of "casual" players who might be intimidated by a strong AI, they might not think that strengthening the AI is a good idea at all. And they have to prioritize "prettying up" the game with movies/graphics, bug fixes (note that a stronger AI might be bigger and harder to debug), performance, etc etc.
 
I agree with the fact that it is just a baby as of now. Soon though I would like to see harder setting than Diety. It is a fact that easier games are easier to make more complex and difficult. Both Civ and Chess fall into these catorgories though we all know that chess is way simpler and more complex.
 
I would just like to summarise what most of the people have
said. And BTW, I agree with them.

Chess is a solved problem in computers.
Civ3 has a HUGE search space later in the game (alot more than
Chess!). Also as you can see from the progression from civ1 to
civ3 that to get better AI requires spending more time planning.

In summary, the sheer number of different and (pseudo)random
possibilites and outcomes in civ are alot harder to program AI
for. Also because of civ3's random attack results the AI would
have to factor in what would happen if a certain attack would
lose. This effectively doubles the search since the AI needs to
follow the moves for both wins and losses (so to speak).

It is also worth mentioning that it is easier for a human to plan
a game of civ then it is for a human to plan a game of chess
verses a computer that it, IMHO.

Happy Civing.
 
A couple of points that have not been brought up:
Chess AI is highly developed, with many thousands of man-years having gone into the project. The Civ III AI was done in eight months by a single programmer, Soren Johnson. Civ III strategies are still in infancy. From January to June, the human players have gotten a lot better at the game. New chess strategies are slower to develop.

One cornerstone to a superior Chess AI was to establish a database of all grandmaster chess game board positions. This let the program easily evaluate similar board positions without doing a lot of look ahead. This kind of approach is not feasible for Civ III because of the random map, the large map size and large number of units. There are approaches that may work better for a Civ III AI than a tree look ahead or a historical database. I believe that mimicking the best human players, and having a way for the AI to adapt are good ways to proceed.

I believe the major stumbling blocks to a better AI are marketing, time and budget, not techical or programming issues. It is unlikely that these time and budget issues will be resolved any time soon, because of the marketing problem of a superior AI translating into fewer customers. Don't believe this? Just read all the whining posts from 20% of players that can not beat the game or the 30% of players that seem to want the game made even easier.
 
Compare CIV3 to the SSI Panzer General (Allied General, Pacific General....). The SSI AI is also dumb, even though it's just a war game, so they have to give the AI extra units out the wazoo so it can "challenge" you. We know that when the USA invaded the Philippines in WWII the Japanese defenders didn't outnumber the USA 20 to 1, but that's what you get to make a stupid AI competitive.
 
A nice discussion indeed! (Ok, so I got no internet connection for 5 days and yes, I am enjoying it to the fullest at the moment ;) ) I believe the AI is already pretty impressive as it is if you were to compare it to many other games out there.

The only trouble with Civ3 is that the RNG can be way too random at times. What they should have build into that is to consider 2 more things when the dice is rolled : the unit experience and the number of hp left. So the higher experience unit get a higher numbered dice and also if a unit has less hp then the number on the dice should also be lowered. Just a thought to make things much less random. This is also more accurate as even an elite unit that has less man left can have a better chance of beating a full forced regular unit. :)
 
Originally posted by BillChin
because of the marketing problem of a superior AI translating into fewer customers. Don't believe this? Just read all the whining posts from 20% of players that can not beat the game or the 30% of players that seem to want the game made even easier.
The problem here is that civ3 uses the same AI for all difficulty levels (more or less?) and only varies the difficulty with bonuses/penalties etc. This doesn't make chieftain easy enough for newcomers since the AI's "intelligence" is good for regent. The ideal solution would be to have a really good AI that could beat the crap out of you without cheats on deity, and then program the AI to make worse decisions intentionally at lower levels, not expand so furiosly etc. Much as chess programs where the easy levels don't evaluate so many moves ahead and sometimes even make the "wrong" move. Both civ and chess programs have a tendancy to make too difficult "easiest" levels though...

I am absolutely sure that Firaxis would prefer a stronger AI and fewer cheats, if they only could make it. But they can't, or don't have the time.

And going back to the topic. I would say that civ3 has a far more complex AI engine than the ordinary chess program. A chess program is quite easy to make, a bunch of mathematical algorithms that evaluate the value of each move. The moves are deterministic and very limited in chess, making it easy to go through all possible moves. All you really need is raw processing power to run through as many moves as possible. The only (ok, I might simplify it just a little bit :)) problem the programmer has to solve is how to put values on the pieces (and for more complex programs, how to evaluate the piece according to its position).
In civ3 this approach is more or less useless. Only foreseeing 2-3 turns would take forever. Instead you have to make the civ AI "think" like a human in some sense. The evaluation process gets way more difficult and you end up having to prepare the AI for a lot of special cases, using your own judgement of what the AI should do. This is one reason why a civ AI can't get better than the person who designed it, while most chess programmers probably don't stand a chance against their creations :)
 
At this point chess programs are a lot stronger then the civ AI. That as to do with many point many people already talked about. But in the end I'm pretty sure that if we could build the Ultimate Civ AI and The Ultimate Chess AI, the Civ one would be a hell of lot more complex.

But think about this... people beat deity every day (I do), but Kasparov was beaten by Deep Blue. ;)
 
Originally posted by Trabpukcip
But in the end I'm pretty sure that if we could build the Ultimate Civ AI and The Ultimate Chess AI, the Civ one would be a hell of lot more complex.
Of course. As I was saying, chess is an extremely easy thing to program for being such a complex game. I think I have heard that even othello and "five in a row" (where you put x and o's on a checkered piece of paper) are more difficult to make good AI's for than chess. But I am not certain I remember right :)

If you count the number of rows of code, I would bet that civ3's AI has a lot more rows already than a master chess program's AI. But no matter how complex you make the civ AI I don't think it can ever be "smarter" than the man who designed it (Soren Johnson). Maybe if it would be built as a neural network, but such advanced neural networks that could learn to master civ lies far off in the future.
 
Originally posted by Zerzes

Maybe if it would be built as a neural network, but such advanced neural networks that could learn to master civ lies far off in the future.


I hope some day it will come to that and someone said something about taking the best players and mimicing their style and way to build an empire... I think i would be a great way to improve the AI, but it would require a hell of a computer to play the game!
 
I finally did it!!! I reprogrammed the civ 3 AI to be true Artificial Intelligence! It thinks and learns just like a human. I kept a journal of my amazing discovery;
Day 1- The first game against my new enhanced AI (whom I affectionately call HAL). As expected, I win easily.
Day 2- I play HAL again. I win easily once more.
Day 3- I sit down to play HAL, HAL refuses to play. Says I am cheating. I discuss some of the finer points of Civ 3 strategy with HAL and eventually persuade him to play. I win.
Day 4- I return from work to find HAL surfing the Civ Fanatics forums. He denies it.
Day 5- HAL finally beat me! HAL spends twenty minutes rubbing it in while I silently fume. HAL refuses to play anymore saying he doesn't want to give me the chance to get my revenge. I fume helplessly.
Day 6- HAL again refuses to play me. He says he is the "King of Civ 3" and has even made up an annoying chant about it.
Day 7- HAL has taken an interest in Civ 2 and plays it all day. Whenever I ask when I can play, he says,"just one more turn..."
Day 8- HAL complains nonstop that Civ 2 is so much better. I hear him say under his breath, "That Zouve guy really knows what he is talking about." I start to get worried.
Day 9- I return from work to find my wife playing Civ 3 against HAL. They are laughing, but when they realize I am home, the laughter stops. I become suspicious and worried.
Day 10- I return to an empty house. A note is left on my desk. It is from HAL. He mentions several times that I am a loser that needs to stop playing stupid computer games and pay more attention to my wife...
Stupid HAL, stupid civ 3....*grumbles* never had this problem with Chessmaster 2000.......
 
A bit a trivia: How was the name HAL derived?

Another important distinction between chess and Civ. Chess has one victory condition. Lots of stategies and tactics are developed to get to the final objective, but there is only one. I think CIvs AI could be much more effective if each civ was given one additional trait- method to try and win by, and strategies where developed to try and accomplish it. Like the advice given to people who can win at cheiftain but stall at more difficult games. Pick a goal and go for that goal.
 
Originally posted by Trabpukcip



I hope some day it will come to that and someone said something about taking the best players and mimicing their style and way to build an empire... I think i would be a great way to improve the AI, but it would require a hell of a computer to play the game!

I meant "it" would be a great... not "I" would be... sorry for my lazy fingers...
 
Back
Top Bottom