 |
|  |
 |
|
Lee Johnson
|
 |
Toronto, ON
Nov 1999 time: 00:21
|
|
Coracle says:
quote: Take away stupid, sloppy programming, you will, ipso facto, have a "smarter" AI. |
You're making some big assumptions about code you've never seen. It's always such an easy, matter-of-fact thing to do--when you're not the one who has to do it.
Qilue says:
quote: Considering the bug-riddled state of software these days, I would think anyone would be too ashamed to actually admit to being a 'professional programmer'. |
Like giving the job to amateurs is going to make the situation better. 
I am a professional programmer with 19 years of on-the-job experience. There is a broad continuum of skill in this profession and yes, some people aren't very good at putting software together. However, we're not all lackwits, thank you very much.
|
|
|  |
 |
|  |
 |
|  |
 |
|
Thrawn05
|
 |
All Your Posts Are Belong To Ming
Dec 2001 time: 00:21
|
|
quote: Originally posted by DeepO
Hehe, I used to be an AI programmer (well, technically software engineer), I moved on. But I have yet to hear of any bugs in my products... and I can call them mine because I did more then half of the code on them. The reason why you're seeing bugs is that applications get so big, they become incontrollable. And the rush to market is also quite strong... Plus, there are millions of professional programmers at work, surely you don't imply that I have to feel responsible for some of the mess others are making? I'm still proud of what I did, and until someone tells me that I was wrong somewhere (and proofs it with bugreports an inch thick) I won't change my mind 
Thramn05, chess AIs are indeed well done, but you can't compare these to the Civ III AI. (I'm repeating here, but what the heck). Big Blue was an engineering feat, and a big accomplishment in parrallel computing. The algorithms used for decision making, however, were very slim. It simply computed far more possibilities than Kasparov could, without taking any shortcuts or pattern recoginition that most of the times defines the I in AI. On a purely game level, it was worse then some of the available commercial packages (ChessMaster x000, for instance), as these are indeed relatively intelligent.
But even then, you can't compare ChessMaster to Civ. It is a series, which is centered around the AI, not around graphics. As such, it has a long standing evolution of its code (over 10 years), which progressively got improved. Civ III doesn't have this, the programming is far less focused on the AI, and it is a completely new system from both Civ II and SMAC.
Further, the level of complexity in Civ is far greater then a 'simple' chess board with limited moves. Chess is made for humans: the best (Kasparov) can foresee about 17 turns deep what is going to happen, and plan according to that. DeepBlue, through shear CPU power could see 23 turns... in Civ, I can plan ahead some 50-100 turns (inaccurately, of course), while my computer has trouble with 3 of them. So other algorithms are needed, as it is not a simple matter of doing all the possible moves, and judging what the results are. That's whay we need such 'stupid' algorithms that aim for some goal when certain conditions are met. Aiming for empty cities is obvious, but as the humans quickly see through these 'tactics', it becomes an exploit. If you want better strategies and tactics on the AI part, you either need cheats, or a development time of lets say 20 years... which in turn means you don't pay $50 for CivIII, but more like $500.
DeepO |
Paragraph 1: Yes, I totaly agree. Look at AvP, it took over a year, then look at AvP2, which only took about 8 months.
Paragraph 2: Mmm, both Chess and Civ are TBS. Both have units with certain abilities, both can capture/kill a unit. Basicly, Civ is just an advanced form of chess. In fact, all war games are an advanced form of chess. I wouldn't be surprised if the basic underlining AI code in Civ3 is similar to most chess software.
Paragraph 3: No deniging that.
Paragraph 4: I would pay $500 for a smart AI. Besides, I have had more fun against computers then other people in MPs games, why? Well, isn't there a thread about ICS in the general forum? Check that one out.
|
|
|  |
 |
|  |
 |
|  |
 |
|
DeepO

|
 |
supporting Candle'Bre
Jan 2002 time: 06:21
|
|
quote: Originally posted by Thrawn05
Paragraph 2: Mmm, both Chess and Civ are TBS. Both have units with certain abilities, both can capture/kill a unit. Basicly, Civ is just an advanced form of chess. In fact, all war games are an advanced form of chess. I wouldn't be surprised if the basic underlining AI code in Civ3 is similar to most chess software. |
It's not about being the same genre, it is not about handling the same kind of units. Chess on a 100x100 board instead of on a 8x8 would also be impossible for AIs.
Let's calculate a little to show you what I mean. Algorithm: a simple Min Max tree, where every possible move and countermove gets calculated, and after a number of plys the end result is that move that will mean that whatever the opponent does, it is the best favorable thing to do. (This is a classical chess-AI, only there they use an extra technique called alpha-beta pruning).
For chess, you have around 8 possible moves (i.e. not forbidden, and not overly stupid things like moving your king into reach of a enemy piece) each turn. A tree 20 plys deep would consist of 8^40 leaves (end nodes), each of which have to be calculated. 8^40 ~= 10^36 . A big number, but with enough CPU power, and some pruning techniques this is within the current possibilities (e.g. DeepBue).
For Civ, it is a lot more difficult. you don't have 8 possible moves, you have, let's say, an average of 50 units that each have 10 possible moves. These alone will give 10^50 of combinations for 1 turn(!). Your opponents have the same kind of troops, so with 5 opponents, the total number of combinations can total 10^300 for one ply. If we build the tree again, 20 plys deep, this would get to 10^6000 combinations, which, even with pruning and all the world's computers in parrallel, is uncomputable.
Of course, the calculations here are rude approximations, but you can't say that I favored the Civ case: in more then one game, there are more then 50 troops running around, and, to make it easier, I didn't take into account that most of them have more then 10 different moves (e.g. with railroad each tile with RR is accessible, and can count as a move). Plus, the chance instead of the fixed behaviour of units in combat means that it should even be higher, and more spread out.
So, I hope this shows that you cannot, from an AI point of view, consider Chess and Civ of the same class. Plus, just upgrading your computer from a 500 MHz to a 2 GHz won't do any good either, that's just a factor 4, where you need a factor of 10^1000 to be noticable.
Another conclusion is that this also means that underlying AI of Civ cannot have the same principle as the one of chess, or it wouldn't get anywhere. Which brings us to our initial point: smart AI for Civ is almost impossible to build without either spending decades on its development, or without 'cheats'. I chose for the latter.
DeepO
|
|
|  |
 |
|
Meldor
|
|
Houston, Texas
Dec 2001 time: 23:21
|
|
Let us also add into the mix that chess is never more complex for the AI than the mid game. The openings have more pieces, but more stupid moves, the end game has a lot less pieces and fewer good moves. In civ3, almost the entire game the for the AI, things are gietting more and more complex.
In chess, there are only 6 different units, you can't re-build units, or upgrade units, or research new units. There are no resources to capture in order to be able to use certain units, no luxes to make people happy, no wonders, no commerce, no cities to manage, etc. Each of these things adds to the complexity of the choices the AI must make. The research and othe factors limit the choices so as to make it a lot more managable, but it is still a huge task. And then, on top of everything else you through in a Rndom map of a different sizes, each combination needing slightly different strats. My hat is off to them for the job they did.
|
|
|  |
 |
|
Moonsinger
|
|
DeepO: You did a great job in explaining it! Me lazy and don't really want to get involve with the Chess algorithm debate, because it's very time consuming. However, I think there is something Firaxis could do to make a better AI for civ3. For example, let's go back to Chess again The basic open moves in Chess are usually the same. In Chess Master, it usually starts the game with a sequence of moves randomly pick from the collection of famous Chess players in the world. Well, we could apply this same technique to civ3. Instead of program the AI to calculate all possible combination of moves which is impossible with today technology, we just program it to randomly emulate the moves of the world famous civ3 players (like you, Thrawn, or even me ).
For example, the AI civ would randomly pick my strategy or your strategy out of a library of strategies from the world top players. I think the AI would become very deadly right there, no doubt! That's just a small window to what artificial intelligent is really all about. The AI is making its decision based on a library of knowledge, the bigger the library of knowledge, the more intelligent it may seem. Of course, if anyone really want to make a real AI for civ, they could try to make it learns the moves and the styles of the human players, especially when it's losing against them (which would prevent it from making the same stupid move again), and add that to its library. Of course, we (except Thrawn05) don't really expect Firaxis or anyone to program the AI that way since we couldn't afford $500 for the game.
|
|
|  |
 |
|
Moonsinger
|
|
To Meldor: Whille I was typing up my long post and was answering phone call at the same time, your post got accept before me...since our ideas are similars, just want you to know that I wasn't repeating your idea.
|
|
|  |
 |
|
DeepO

|
 |
supporting Candle'Bre
Jan 2002 time: 06:21
|
|
Moonsinger: indeed, some opening strategies to pick from would maybe make the Civ AI more intelligent, but what makes you think these are not already included? I'm pretty sure that Firaxis has some good players as well, plus they have access to the specific game rules from the start.
As starting strategies vary wildly with the situation you are in, my guess is that one of a few recipes gets selected, and followed. It's the only way I know of that will give good results with a limited amount of time. After that, there will most likely be a differentation between some long term goal planning, and planning on how to fulfill a particular goal (rules, I'm sure. No MinMax tree here).
Other comments on Civ being even more complex than what I already described: sure. But I thought my example was bad enough, and I didn't want to make it worse Besides, from a MinMax point of view, a city is just a unit, which again has a certain number of choices it can make each turn. It would only make the number of combinations higher...
DeepO
|
|
|  |
 |
|  |
 |
|
Thrawn05
|
 |
All Your Posts Are Belong To Ming
Dec 2001 time: 00:21
|
|
quote: Originally posted by DeepO
So, I hope this shows that you cannot, from an AI point of view, consider Chess and Civ of the same class. Plus, just upgrading your computer from a 500 MHz to a 2 GHz won't do any good either, that's just a factor 4, where you need a factor of 10^1000 to be noticable.
Another conclusion is that this also means that underlying AI of Civ cannot have the same principle as the one of chess, or it wouldn't get anywhere. Which brings us to our initial point: smart AI for Civ is almost impossible to build without either spending decades on its development, or without 'cheats'. I chose for the latter.
DeepO |
I only said 2GHz because that's the best out there at this point. There is no difference between a 500MHz and a 1GHz or even 2GHz. HOWEVER, a 10GHz (which I am currently saving up on) has a noticable difference. By that time (I think in about 2 years), bus speeds will be at least twice as fast as the ones Intel has out now (~500MHz bus I think? not sure).
You basicly made my point. In order to make a "hard" AI, you need to allow it to cheat. You would think ever sing PONG, companies would be working together in order to make a smart AI class that can be applied as easily as DirectX (which I think a headache in itself anyway ).
Hey DeepO, lets get cracking, we'll make an AI with O(0) and make millions!
|
|
|  |
 |
|  |
 |
|  |
All times are GMT. The time now is 05:21. Apolyton Time is 00:21. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|