June 23, 2000, 06:57
|
#1
|
King
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Sweden
Posts: 1,728
|
Arguments why its nearly impossible to program an "almost human" AI.
Please, don’t be pissed off about the “negativity” in above heading – personally i DO agree that many AI-improvements can be done, in order to raise CIV-3 above CIV-2. I just think we all should be more aware of the built-in limitations in so called “artificial” intelligence.
The Artificial Intelligence (AI) has ONE major advantage over humans, and that is a BIG advantage in pure number crunching capability. Programmers can use this to setup a bunch of expressions, conditions and variables – then letting a flood wave of oncoming tasks “fall through” a logical boolean maze (steel balls furiously trickling through a Japanese pachinko-game, comes to my mind), and repeatedly getting relevant and speedy task-solutions.
By comparison humans alone compare rather pathetically (but only in terms of speed, that is).
There is a snag, however (that tip the scale heavily back in favor of the human player):
Considering today’s computer- and programming-technology, above pachinko-approach only works really outstanding if the “world” is relatively confined (like the 8x8=64 square-world of chess), the variables are simple (only black and white tiles/pieces and only 6 of the latter) and the rules are few and distinct (I don’t know how many rules chess has, but they certainly aren’t many, and there is nothing fuzzy about them either).
If any of above three factors (world size, possible variables and rules complexity/ diversity) - not to say all three of them, is added to (like in a modern turn-based PC strategy game) the AI: s ability to “analyze several moves ahead”, “follow a game plan”, with “intuitive” and “long reaching” strategic/ tactical maneuvers, is SEVERELY limited.
(One can argue that real-time action games like “Tomb raider” or “Quake” have huge worlds, but there’s no big need for an AI that “analyze” and “think ahead” in these games. The programmers just have to place out enemies her and there that, trigged by certain conditions execute some automated template reactions – also, in an 100% known setup-environment).
Thankfully, no one asks for an IBM Deep Blue-AI in the upcoming CIV-3 game anyway. Personally, i would be happy if the AI only could be more effective in building land and city-improvements and upgrading max 2-4 topnotch units per city, on basis of already achieved tech-advances – basically, that’s it (well, a little more perhaps).
Still, many of the upgrade-suggestions found on this site perhaps often ask for the impossible – an almost human AI, that “schemes” several moves ahead, and then moves around hordes of coordinated army-units, with tactical brilliance.
Why is it impossible? Well, to understand this we have to come to grips with the principal difference between human (living) intelligence and artificial (dead) intelligence (if you think this post is waaay to philosophical about the subject, you can always choose to stop reading right now. Otherwise, hang in there – i am almost halfway through here).
What the human Civ-player can do (and the AI simply cannot do) is to literally OVERVIEW (experience) the game situation, and, within a blink of an eye, sort out huge parts of not-so-promising strategy/ tactic solutions, and instead concentrate directly (and only) on those very few plans and ideas that actually DO seem promising.
We can describe this as a “bird eye-sort out” ability, something unique the living (human) intelligence.
By comparison, the game AI (or any silicon-based AI for that matter) is 100% dead and non-experiencing (of course). It lives in a 2-dimensional “flat” world, symbolically speaking - by that i mean it cannot possible “overview” anything.
In practice this means that if a CIV-programmer tries to create something “almost human” in terms of AI-software, he is forced to write an AI that meticulously analyzes/ evaluates all the myriads of possible combinations of Choose-, Build-, Upgrade and Move-possibilities, that each and every individual game-turn has to offer, no matter how relevant or less promising 98% of these possibilities are (the reason for the latter, is the lack of living “bird eye-sort out” ability – because of this, the programmers has to gather ALL possibilities BEFORE they can let the program evaluate and rank any appropriate countermeasures).
Also - he has to program it to analyze each-and-every of these combinations; at least 3-4 game-turns AHEAD! (or “deep”, using chess-language). Again remember that the AI cannot “overview” from above – to compensate, it has to take a “2-dimensional only” approach analyzing any possible moves, at least 3-4 game-turns ahead. Like in computer-chess.
This is (as we all know) not that difficult to achieve then it comes to a relatively simple and clean-cut strategy-game like chess. But, in a MUCH more complex and option-divided game like CIV-3; the massive amounts of calculations involved to mimic “almost human” behavior, is absolutely staggering and mind-boggling.
Today’s programming-technology is simply TO primitive, and our home computers are, at present state, just TO slow to achieve anything like this. I don’t know, but I reckon if computers where about 100 times faster, then today’s P-3:s an Athlon:s, they perhaps would cope better with such a task (if the processing power doubles every 18 month, that means about 15 years from now). The latter is a pure guess.
Thankfully however, most of us CIV-veterans often use the same tested and well-tried strategy-approaches, game after game. This should mean that the CIV-programmers also could make more use of pre-made templates to make it easier for the AI to compete. These “pre-made templates” should be automatically executed then deciding in which order to…
> Add city-improvements to AI-controlled cities (not for free however - enough resources still have to be accumulated before any AI-improvement can be built).
> Upgrading city-area surroundings (done automatically in many stages of the game – no need of AI-controlled settlers to manually move around and do it).
> Building and upgrading units* (again, enough resources is, of course, is still needed)
> Choosing AI tech evolution path (following pre-made templates - no AI evaluating needed).
* The only exception is if an enemy captures more then two AI-cities within a certain amount of time – the AI should intervene and interpret that as an “invasion”, and automatically order the rest of the cities to switch to military unit-building. Also if AI decides to siege and capture enemy cities some extra of course units has to be made.
As I said, nothing is resource-free – but the AI shouldn’t do the actual choosing – that should be automatically executed by above “pre-made templates”. The ONLY things the AI should concern itself with is…
> Moving around AI-controlled units outside the cities (this is what AI mainly should do).
> Deciding when to grow its empire (either by expansion or conquering).
> Connecting cities with roads (using settlers outside the city-areas).
> Dealing with foreign affairs – diplomatics (some template guiding needed though, in order to save the weak AI from itself).
> Building wonders (again, at least some template guiding needed).
Perhaps I missed something above – anyway: to summarize; the CIV-3 programmers need to FREE UP the AI as much as possible, in order to let it work more efficiently on fewer selected tasks. The more the AI is confronted with buckloads of confusing choices, the more the AI is likely to buckle down (and screw up). This is the sad truth.
I am not saying, that it is impossible to create a strong AI – (perhaps I am swearing in church now) but a certain amount of AI-benefits (giving AI some benefits over HI on the highest levels) and some heavy use automated “pre-made templates” trigged by certain conditions is absolutely necessary if we want to se an CIV-3 AI that stand a fighting chance.
A lot can be done to improve the CIV-AI on an overall strategic level. But as for moving around huge AI-controlled invasion-armies in tactically coordinated Napoleon-would-be-amazed maneuvers? Forget it. The latter just isn’t possible to achieve today.
[This message has been edited by Ralf (edited September 01, 2000).]
|
|
|
|
June 23, 2000, 10:23
|
#2
|
King
Local Time: 18:54
Local Date: October 30, 2010
Join Date: Oct 1999
Location: Colorado
Posts: 1,555
|
Very well put, a much more detailed response than what I tried to say in the AI thread:
quote:
Originally posted by Steve Clark on 06-15-2000 04:43 PM
The AI can be 'taught' or 'learn' or 'have a plan' if it is programmed to recognize certain conditions from many variables. In a consumer-based game such as Civ3, there are only so many variable and conditions that can be practically programmed. What most of you are asking is intelligence similar to humans in factoring many variables and conditions to make the best choice. I just don't think that's possible given the many other complexities of the Civ game.
|
As a veteran of software design and development, it is proper to ask users (or consumers) what they would like to see in a product. However, you run the risk of setting unrealistic expectations. The way to counteract that is to communicate back to the users what the specifications will be. If Chris would to come back in the AI thread and define what the parameters of the AI will be in Civ3, that will help us understand what Civ3 will be. But then again, knowing some of the folks here, nothing will meet their unrealistic expectations.
|
|
|
|
June 23, 2000, 16:24
|
#3
|
King
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Sweden
Posts: 1,728
|
Thanks, Steve – its nice to know that one isn’t entirely alone in this forum, when it comes to having ideas about HOW the AI suppose to achieve this or that. And not only talking about WHAT it supposes to do. I understand you’re having first-hand experience of AI programming - for my part, i have never actually programmed one single code in my entire life (and definitely never dabbled with complex AI-programming).
I look at the problem from an entire different viewpoint - the philosophical one: the principal difference between “3-dimensional” (living) intelligence vs. “2-dimensional” (artificial) intelligence. What can be done with clever AI-programming, and what cannot be done – at least considering today’s tech-level? And are there things that NEVER can be done, regardless ultra-advanced future programming- and processing-technology? Interesting stuff!
Anyway, I’ve been fishing for more AI ideas in this forum, and I came up with these two threads, with perhaps some interesting ideas in them:
http://apolyton.net/forums/Forum6/HTML/001244.html http://apolyton.net/forums/Forum6/HTML/001101.html
Before I comment on these, i would again like to emphasize the importance in trying to FREE UP the burden of confusing choices the AI has too make. As I mentioned the programmers can do this by taking a reductional approach in terms of what the Civ-AI actually MUST deal with, and leaving the rest (as much as possible) to be executed with Pre-Made Templates. Triggered by certain conditions/ events these PRT: s can be “kicked in” or “kicked out” by the AI, whenever it suits best.
CIV-3 could even “record” (i am on thin ice here – don’t know if this one is feasible) new player PRT: s (only overall strategic choices/ basic habits), and then “export” or “import” new ones to/from other players. This is originally Adm.Naismiths idea, although he’s talking about “downloadable trained AI: s” (perhaps not so feasible – although a marvelous idea).
All attempts of AI-strengthening doesn’t always have evolve around “tinkering with the code”: Then creating/ playing scenarios for example, it’s important to give the player the ability to block out certain units/ techs/ wonders in order to “save the AI from itself”.
I remember once playing the CIV-2 second WW-scenario, and the AI was busy founding new cities – in the midst of world war. Blocking the use of settlers could solve this problem.
Also, blocking less useful city-improvements and military-units in order to “force-guiding” the AI to choose solutions that’s is “best for itself” in the long run – could be appropriate, in other scenarios.
|
|
|
|
June 23, 2000, 17:11
|
#4
|
King
Local Time: 18:54
Local Date: October 30, 2010
Join Date: Oct 1999
Location: Colorado
Posts: 1,555
|
I do have the perception that discussions like this fall on deaf ears here in this forum. Seems like some folks don't have much of a clue as to designing and developing complex games, thus they demand the unrealistic elements and then complain when they are not achieved.
But, I admit it is fun to come up with new ideas and to discuss conceptually what elements that could go into civilization-building games.
|
|
|
|
June 23, 2000, 17:17
|
#5
|
Prince
Local Time: 00:54
Local Date: October 31, 2010
Join Date: May 2000
Posts: 384
|
Its more brainstorming than anything else, if you ask me.
Of course since its a public forum there will be some chaff in with the wheat.
Maybe its surprising that there aren't more proposals without a hope of being implemented.
|
|
|
|
June 23, 2000, 23:12
|
#6
|
King
Local Time: 10:54
Local Date: October 31, 2010
Join Date: May 2000
Location: Melbourne, Australia
Posts: 1,728
|
Since I only dabble in programming, I've always held out some hope that AI could actually be done properly in Civ3. But now my hopes have been dashed...
------------------
No, in Australia we don't live with kangaroos and koalas in our backyards...
|
|
|
|
June 24, 2000, 09:59
|
#7
|
King
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Sweden
Posts: 1,728
|
Ouch! This is why i originally hesitated to post this thread. Either annoyed responses, or ones that have sad blue smiley´s on them. Still, i think its better to concentrate on changes and improvements that the AI actually stands a fighting chance to DIGEST, and make proper use of - seen from an AI-programming point of view.
Some have suggested that Firaxis should “leave a great portion of (the AI) open to be programmed by a 0 level 'hacker' (as civ/SMAC allow in the .txt files). But allow more than is available now” (Theben). Well, those .txt files are nice and i hope they keep them – adding more to them? Sure, just don’t expect “the Holy Grail” from this. We STILL have the overall problem with almost exponentially rising data-processing demands (read my initial post above about this).
That is if we all stubbornly insist (and expect) to have a “foreseeing” AI that cleverly exploits every single feature suggested in this site, at the same as “it” commands hordes of combined and coordinated land/sea/air-units in fox-like, multi-stage battlefield maneuvers (ok, perhaps i exaggerated a little here).
Anyway, the sooner we ALL have a 100% realistic picture what these AI-programmers at Firaxis humanly can hope to achieve, the sooner we can concentrate on suggestions that are actually feasible – and therefore avoiding the risk of future disappointments. Then suggesting yet another feature add-on, ask yourself:
Are there ways to incorporate this without having to “bother the AI” too much with yet another bunch multiple-path abstract choices it supposes to choose wisely from?
Expanding the tech-tree with many new interesting advances can be done, without straining the AI too much. Here is however, a really nightmarish example that CAN’T be added without grinding the calculating AI to an absolute halt. 30 suggestions how to deal with the research (of over 80): Please add…
Multiple research-topics, Development inertia, Research priority slider bars with inertia, Technological fields containing minor techs, Gateway techs, AI tech trading intelligence, Serendipitous advances, Problem based technology research, Trickle-down list of research, Multiple prereqs, Boolean prereqs, Prerequisite points, Prerequisite equivalence, Redundant techs Mutually exclusive technology Random tech tree, Offshoot techs, Forbid out-of-order tech, Concepts vs applications, Randomized applications, Further research on one tech, Supporting techs for other ideas in other threads, Technology gain by usage, Enabling triggers, Different cost for trailblazers and followers, Less deterministic research progress, Tech synergy, Tech bleed, Reverse energizing, Minor nation tech bleed, and so on… More? Go to:
(http://apolyton.net/forums/Archives/Archive-000004/HTML/19991028-9-000027.html)
There is a total off 85 suggestions (NOT including individual new techs-advances, mind you).
Now, i understand that nobody expects ALL of above to be integrated in CIV-3. But, the thing is if you has read and understand my initial posting about artificial “flat” intelligence, about “analyzing all the myriads of possible combinations”, and “several game-turns ahead” – then “evaluating and ranking it” before any appropriate countermeasures can be selected and executed by the AI - you hopefully understand better why it is so utterly impossible for any AI-programmers to incorporate even a lesser part of above. 2-3 of them perhaps, that’s it.
And if they nether the less do, the AI going to suffer badly in all the other departments of the game - lame diplomatics, for instance.
These AI-programmers can only cope with incorporating so and so much (they suppose to un-bug that thing, as well) and your PC can only process so much, and finally the average civ-player has only so and so much patience when it comes to waiting between game-turns. There are limits guys!
The question one has to ask oneself is: Is it absolutely necessary to force the AI to “analyze” in which order to do this or that tech-advance? Does above “smorgasbord” of alternative ways for tech-tree advancement, really add THAT much to overall game-experience?
Even at the cost of a more fragmented weaker AI? Can’t the AI choosing process be more or less bypassed, just following Pre-Made Templates (PRT: s) instead (unless something triggers it to temporarily take over command)?
Don’t se above suggestions in a negative “halfway empty” kind of way. Se it as “halfway full” instead, meaning freeing up more UN-DIVIDED AI-code to be used better, elsewhere in the game.
It would be nice to see more examples what could be done to refine and cultivate what the AI actually MUST deal with, and what can be done by other measures?
|
|
|
|
June 24, 2000, 11:48
|
#8
|
Prince
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Dec 1999
Location: the Hague, the Netherlands, Old Europe
Posts: 370
|
Dear Ralf,
I am not angry at all, and only a little bit sad. But to me it is not clear what's the essential message you want to convey. Do you want to say it's impossible CivIII will have better AI than CivII? And that its useless to answer Chris Pine's question about how we beat the current AI anyway?
Is it really impossible to 'teach' the AI not to cut all trees? And that it should build a road in an irrigated tile? Or that with the current rules a Palace(Masonry) is essential to survival?
I went to the thread you had selected and agree that in this thread the sense of reality seems lost. But I would say: don't worry! If 5% of the presented ideas will be implemented it would be beyond my expectations. It is just a list of ideas and when the Firaxians will be actually reading all suggestions I would be surprised. The same applies in my opinion to the current list: all impossible suggestions will reach the dustbin sooner than you can say "Civilization"! Because the people who read such a list are professional programmers, while I am not, nor are most posters. They can and should easily seperate the wheat from the chaff!
One last question: what was/were the most silly suggestion(s) -in your opinion- I presented in the AI thread?
I am still glad Firaxis asked for feedback; I don't think it can influence the development of CivIII in a negative way.
|
|
|
|
June 25, 2000, 00:42
|
#9
|
Prince
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Mar 1999
Location: Melbourne, Victoria, Australia
Posts: 404
|
None of this explains basic AI stupidity though.
For example, why does AI morgan keep throwing probe teams at me when I have the HSA (in smac not smacx).
Why do AI formers rove around on the same few spots doing nothing?
Things like this don't require an AI that can strategise like a human, all they need is a few lines of programming telling them not to do stupid crap like this.
------------------
- Biddles
"Now that our life-support systems are utilising the new Windows 2027 OS, we don't have to worry about anythi......."
Mars Colonizer Mission
|
|
|
|
June 25, 2000, 01:15
|
#10
|
Prince
Local Time: 00:54
Local Date: October 31, 2010
Join Date: May 2000
Posts: 384
|
Did you read the above at all?
The point is... its not just 'a few lines of programming'.
Also, most AI programming is inclusive rather than exclusive when describing hinting for behaviour. I.E. Telling units what to do, rather than 'not do'.
|
|
|
|
June 25, 2000, 11:24
|
#11
|
King
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Sweden
Posts: 1,728
|
I have read the whole thread once more, and I can understand better now why “its not clear what's the essential message i want to convey” (is it possible to improve Civ-3 AI over Civ-2, or not. Is suggestions to Chris Pine a waste of time, or not?). I shall try to clarify this now:
Is there ways to make the Civ-3 game-challenge much more rewarding and interesting to play than both Civ-2 and SMAC? Yes! I truly believe so! Read on…
First some basics: The Civ-3 game is going to be equal, if not bigger then SMAC. The “world size” factor is going to be roughly med same, but the “possible variables-” and the “complexity/ diversity of rules” factor is going to grow - at least somewhat. This means that it’s NOT going to be technically (or humanly) possible to create en AI that simply tries to analyze its way to greatness in true computer-chess style. The massive data processing needed for such and task is simply TO staggering an indigestible.
This leave the programmers with the following option: Besides trying to write an AI that does the job as best as possible, they really has to constrict themselves - not only how many rules and variables that should be taken into account – but also in which areas in the game where the AI should be best applied. An example of one such a key-area is:
> Moving around units (yes, Biddles – a unit moving pointlessly back and forth several times per turn, ought to be fixable – at least that).
But, also in this area there are limits: Is it, for example, possible to tweak the AI to unleash 10-15+ invasion armies rolling over your borders, capturing your cities/ destroying your crops and railroads? Perhaps, but forget about fox-like and coherent pinch-maneuvers. If such invasions do occur it going to be a pretty straightforward hit-and-miss affair (lets hope they at least try tweak these units to pillage a lot more, whilst moving around).
In order to make up for inadequate calculating power, but still hopefully give the veteran Civ-gamer a run for his money, these programmers have only 3 extra support-leg options left:
1/ Cheating, 2/ Benefits and 3/ the use of Pre-Made Templates.
1/ AI Cheating means that AI-controlled civs sometimes get things for FREE in certain stages of the game, like wonders, improvements and even units. There where some cheating in the original Civ-game, a lot less in Civ-2. I think i can speak for everybody in this forum on this particular subject: We don’t like it – it destroys the feeling of accomplishment. Avoid!
2/ AI Benefits means that the AI gets some advantages over human player on the highest levels of the game. One can argue against that, but as long as we cant have games that analyzing everything computer-chess style, the developers has to throw in something to make up for any analyze-gaps and blind spots. Its common practice, and we have to except it.
3/ Pre-Made Templates means that (as i mentioned before) instead of forcing the AI “evaluate” and “choose” in which ORDER this or that tech-advance, city-improvement and even single unit should be build – the whole AI evaluating process is BYPASSED.
Instead the AI follows blindly a pre-made setup (a template) until something triggers it to temporarily take over direct command.
You can compare it with a blind man being given exact blind-read instructions how to move around inside an unknown building. He can follow this pre-made template meticulously and rather effectively (with minimal of independent analyzing). If he never the less bump into something – he temporally put his blind-read map in his pocket, and starts to feel ahead and analyze the situation. Soon feeling confident, he can take the map up again…
This is, in essence, what we should come up with: More PRT-suggestions how to bypass that stupid AI as much as possible – to save the AI from it self, so to speak. It has nothing to do cheating - as I said before the AI shouldn’t get anything for free. AI-controlled libraries and universitys STILL have to accumulate enough lightbulbs, in order to advance forward in the tech-tree, for example.
The player could even manually edit this templates (how, many times haven’t you wished for some way to once and for all force-guide those AI-controlled civ-enemies to build more city-improvements and less military-units, but with higher class – quality before quantity).
We could even have multiple of these templates, letting each AI-civilization choose its own template, according to goals and temperament.
Of course there are limits. You can’t move around units, much less armies, this way. The simple reason is of course that continents and other locations are different in each and every game. Not to mention the moving unit-targets. AI must do this, to the best of its ability.
Diplomatic affairs also have to be dealt with by the AI – at least to large degree. But every FIXED amount of choices (tech-tree, city-improvements, choice of government, units) can (and should) by a large degree be chosen by these “blind-read” templates.
One last example:
We all know that those AI-controlled settlers do a rather crappy job – and quite honestly, i don’t think code tweaking is going to help that much in Civ-3 either.
Instead, the whole “automated settler” thing should be bypassed altogether INSIDE all the AI city-areas. Outside the city-areas they are still needed for intercity road connecting and fortress-building. Instead the AI city area tiles should be upgraded automatically, gradually and repeatedly without something moving around doing it. A sort of automatic time/ ripen-process, with includes mines, roads and railroads at later stages.
The same city-tiles ripen-process also applies to the human controlled cities, with the exception that the player can (if he chooses to do so) use his settler to “force guide” which area-tiles should be ripen first.
I don’t know if above is the best solution. Just don’t let the AI-controlled settler “choose” what to do - it just can’t manage it.
The bottom line is this: On a tactical unit-moving level not that much going to happened in Civ-3 compared to SMAC – at least not in the AI unit-navigation department. Some noticeable minor fixes and fine-tunes here and there, but that’s about it, I believe.
On an overall strategic level however things (should) look different: Ask yourself, if the AI cities had just as many city-improvements as your cities, if they there guarded with 2-4 topnotch units (half defensive/half offensive), if the city-areas where just as well developed as your cities (with some emphasis on shield-production). Wouldn’t this alone mean a much more challenging game-experience? It can be accomplished, not by “trimming the AI” - but bypassing it all together using force-guiding templates.
There are also lots of feasible minor AI-adjustments that can be done with has great effect on game-play: Here is one in repeat:
Two+ AI-cities captured within fixed amount of turns = means “invasion” = remaining cities switch to offensive military-unit production.
Another one: If invaded = AI offensive unit stays garrisoned lashing out preemptive strikes at any foreign unit who comes near IF no city-area tiles are pillaged ELSE move out attack.
I think it would of much help before suggesting how individual units should behave, if we tried to set it into some simplified schematic rule context – And, Or, If, then, else, =, like above, and ask our self: is this feasible?
I have some great hope on “The rise and fall of empires” idea. I believe i have seen this idea in this forum, but I don’t remember where.
Big empires consisting of 20-25 cities should be a real threatening instability-factor in itself.
Not only because of any widespread unhappiness. Not only because poor city-development (the ICS strategy) - ALSO if you are TO advanced + unthreatened + superior (the logic here is that nationalistic counties want to break out then there’s no big outer invasion-threat (minor borders-quarrels doesn’t matter) and take a nice slice of your empire with them.
Another break out reason is the “rich mans martyrdom” – “Why should we continuing sharing our wealth with to you (paying taxes) – we want to keep within our own counties”.
The later should only be possible however if the empire is really big and really superior to anybody else. The split up should consist of a min 20% - max 35% of your all your cities. A rather shaking experience, in other words.
Small empires below 10-12 cities should have much less happiness problems with HUGE 25+ size cities, then big 20-25 city empires – even though the circumstances otherwise are similar. This to encourage small empires as a feasible alternative.
And finally: If Firaxis combated that annoying ICS-problem once and for all - you have to agree S.Kroeze (and other who read this), if all of above overall strategy-ideas would be fixed and implemented (with good result) we would really be a more overall challenging game.
The only remaining snag would be the “AI unit-moving navigation” problem, which i explained above. It is not possible to do something really drastic about that. Still, it would be a great upgrade anyway, don’t you agree?
[This message has been edited by Ralf (edited June 25, 2000).]
[This message has been edited by Ralf (edited June 25, 2000).]
|
|
|
|
June 26, 2000, 00:32
|
#12
|
Prince
Local Time: 00:54
Local Date: October 31, 2010
Join Date: May 2000
Posts: 384
|
I consider the key point to the whole invasion thing is analysing how you see things as a human-
Humans can strategize in advance, yes... but also consider how they (we ) group the resources (or data to an AI )
Essentially, stacks, or groupings of units, need to be turned into data entities. The AI has to desire to build units appropriately grouped, and give them tasks- defense, assault, etc.
These entities if necessary should be split up into multiple transports to reach a target location, before being regrouped, to achieve their target.
They'd be resupplied when they lost cohesion through battle losses, and may even tactically retreat to regroup.
The AI may be able to look at the current defences of a nation to decide how powerful these stacks should be.
To help... a fuzzy logic AI script might be used.
|
|
|
|
June 26, 2000, 09:27
|
#13
|
King
Local Time: 10:54
Local Date: October 31, 2010
Join Date: May 1999
Location: Melbourne, Australia
Posts: 1,235
|
I hope you don't mind that I'm not going to read half this thread before I comment, but I just wanted to say that it's nice to hear someone actually talking about how the AI could be improved (and it's limitations) rather than just saying, "we want better AI", or "it should/n't do this/that". So my congrats go to the people who are actually trying to tackle it. (It's a lot to get your head around).
I'm not sure that some people on this forum understand the absolutely huge and difficult task that goes into designing any sort of AI, let alone one that can cope with the complexities of Civ.
- MKL
|
|
|
|
June 26, 2000, 11:55
|
#14
|
Emperor
Local Time: 17:54
Local Date: October 30, 2010
Join Date: Apr 1999
Location: Palm Springs, California
Posts: 9,541
|
Some of you old-timers who were around in the Jan - March 99 days at the pre-crash Alpha.owo forums might remember the similar discussion then.
As I recall, a couple of the beta playtesters (Tom Stobie was one, if memory serves me right), actually wrote out the code and published it in the forum with an appeal to Firaxis to incorporate in a patch.
Of course, nothing was done.
But that was then...this is now.
Good luck in getting them to listen this time.
Googlie
|
|
|
|
June 26, 2000, 15:38
|
#15
|
Warlord
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Sep 1999
Posts: 274
|
I have some experience of programming although i have never programmed AI. I'm sorry if this is a stupid idea but here it comes, i'm sorry for my bad english.
Wouldn't it be possible to do like this:
There is three levels of AI.
- The overall AI
- The Provincial AI
- The Micromanegement AI
The overall AI works like this:
It gets the overall status of the civ. And compare it to the overall status of other civs. This level decides what the overall policies is, what to focus on (science, warfare, industry, agriculture or economic growth).
The provincial AI: This level decides how to realize the overall policy. FE If the most important policy is "economic growth" this level will try to build marketplaces and so on. Although this levels also decides when it's more necessary to, on a local level, concentrate on something else than "economic growth". This levels also decides which cities/regions that is possible to invade and how many armies that are needed.
The micromanegement AI: This level of AI simply tries to fulfill the orders it got from the provincial AI.
I'll give an easy example to make sure that you understand my point.
The overall AI says: ATTACK OUR EVIL NEIGHBOR THE ROMANS
The Provincial AI says: Make sea attacks on rome with 3 cruisers and try to capture Neapel with 8 tanks.
The micromanegement AI says alot of things like:
move ship xxx from xxx to rome. Move tank xxx from xxx to Neapel. e.t.c.
|
|
|
|
June 26, 2000, 17:09
|
#16
|
King
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Sweden
Posts: 1,728
|
About AI city-foundation strategies:
I often started by founding a base of 3-4 nearby cities - usually by then i uncovered much territory relatively far away with help of scouting warrior-units. I could then overview the map and make a foreseeing strategic decision:
I will move my next two settlers far, far away to that fertile and promising patch of land over there, and found two new cities. From there I will create a new base of cities – then i can expand both city-bases inwards, like burning the candle at both ends.
Above type of foreseeing city-expanding strategies is very hard/ impossible for the AI-programmers to mimic, right? What could be done (not 100% sure, giving my lack of hands-on programming experience) is to mimic the following strategy:
I usually (about 4 times out of 5) bump into a coastline with my first settler, within 2 turns. If i do i found a coastal city (if not i found one anyway, inland). After I founded my first c-city i always “stay glued” to the coastal line with the following settlers. After I founded about 10-12 coastal cities, i start to work my way inwards.
This strategy works very effective on big islands and even small continents – it’s often the best way to make use the land most effectively. Lets not however argue if the latter is correct or not – my point is: it should be possible to tune the AI to do this. Right or wrong?
About the AI unit “shuffle”:
He, He!! I have to smile then I read this, Steve. When I played Civ-2, i always played the land only expansionist/ perfectionist who had naval attack-units very far down on the priority-list. That didn’t hinder the AI to “shuffle” (sometimes 2-3 naval-units) about 2-3 squares outside many of my coustal-defence/city-wall/tanks defended C-cities anyway. If they declared war, the AI just kept smashing destroyers and what not, again and again – to little effect.
Also: If it’s possible (I didn’t know that) for the AI to “know” if the human player (HP) has naval-attack units harbored somewhere, it should also be able to “know” other average unit or defence-improvement data as well - and from this having rules for, then its meaningful to continue bombarding/attacking, or not. How many AI-units is allowed to be lost (without killing HP-units in return), before AI truce- and peace-negotiations are urgent.
In my case the AI-threat represented by those shuffling naval-units often was totally contra-productive. The build-/maintain-resource cost + the unit-away-from-home unhappiness, must have been a very heavy burden on the AI-civs.
Anyway, I see your point then it comes to shuffling in order to “detect” HP-units (but why shuffle in its OWN tracks SEVERAL times – WITHIN that same turn?).
DaveV: “So while scripting and/or templates are a good idea, they *must* be changeable. As strategies mature and new schemes are developed, the AIs should be able to keep up. This also would lessen the problem of the AI becoming predictable and therefore beatable”.
I totally agree – I want those templates editable.
[This message has been edited by Ralf (edited June 26, 2000).]
|
|
|
|
June 26, 2000, 23:35
|
#17
|
King
Local Time: 10:54
Local Date: October 31, 2010
Join Date: May 2000
Location: Melbourne, Australia
Posts: 1,728
|
I actually have nothing to contribute to this thread 'cause I'm not a very experienced programmer, but I've got to say that, guys keep it up! Some of these stuff provide fascinating insights into how a game can be built.
------------------
No, in Australia we don't live with kangaroos and koalas in our backyards...
|
|
|
|
June 27, 2000, 00:15
|
#18
|
King
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Sweden
Posts: 1,728
|
Not only do I want those templates (and/or scripting) editable – I want them to be individually and uniquely different according any AI civ temperament/strategy-style. I want LOTS of variants to randomly choose from. I want to test out other hardnosed civ-veterans most successful (and for me unknown) .txt templates, downloadable through the Internet – one for each AI-civ, as well - and test them ALL out - simultaneously.
The words “Templates” (or scripting) sounds like something rigid and predictable, and therefore boring - something that doesn’t change from game to game. I really don’t have to be that way. Far from it.
One can’t always “blame the developers” however. I remember about a guy who complained about the ICS-strategy, and how boring it was for him to play the game that way, again and again (although effective).
The answer from another guy was: Well, just don’t play the game that particular way.
|
|
|
|
June 27, 2000, 00:23
|
#19
|
King
Local Time: 18:54
Local Date: October 30, 2010
Join Date: Oct 1999
Location: Colorado
Posts: 1,555
|
quote:
Originally posted by TheLimey on 06-25-2000 01:15 AM
Also, most AI programming is inclusive rather than exclusive when describing hinting for behaviour. I.E. Telling units what to do, rather than 'not do'.
|
There alot of good points made here. I think the above is one of the best ones. What this means specifically to Civ is that the AI, when starting out, builds their cities based on a set of rules (3 cities 7 squares apart along the nearby river) depending on some variables (terrain, proximity to others, etc.). Further growth or building of units/improvements is primarily based on a set of conditions (whether under attack, demographic rankings, powergraph rankings, etc.). In others words, 'if A and B equals X, then it will do Y'. It is not going to be programmed like a human to say 'will plan to do X in about 10 turns, therefore must do A and B now, and C if Y happens in the meantime'. Because of the incredible amount of conditions and variables in Civ, it really can't be programmed to think ahead very much.
In response to programming a few lines to fix the AI units 'shuffle'. What would you have it do instead? For example, the AI knows that you have built or are building a naval attack unit in city A. It is programmed to try to intercept that coming out of your port and the only way in can do it is by shuffling between a few squares. It would be difficult to program it as how a human plays it.
Simplistically put, the AI cannot 'see' the game as we see it. It plays the game only with numbers representing terrain values, unit values and coordinates. Even if you don't know programming logic. Take out a piece of paper and create a 20x40 grid. Then place a settler in one grid and then write down all of the factors going into deciding what and where to build - using only numbers representing everything in the game. Then multiply that 1000 fold to add in all of the other complexities of warfare, trading, diplomacy, etc. Then you will have any idea of why it can only do 'if A and B equals X, then it will do Y'.
|
|
|
|
June 27, 2000, 00:37
|
#20
|
King
Local Time: 20:54
Local Date: October 30, 2010
Join Date: Dec 1969
Location: USA - EDT (GMT-5)
Posts: 2,051
|
Several comments:
The ultimate test of any Artificial Intelligence upgrade would be the Turing test: if you can't tell whether you're playing an AI or a human. That goal is unreachable, but some relatively simple programming tricks could improve the AI vastly.
One of the early AI programs was Eliza, which would reply to your conversation by looking for key words and giving scripted replies. People were amazed by the seeming intelligence of a rather simple program.
Part of the problem here is the Sherlock Holmes effect. At the end of the story, when Holmes reveals his train of reasoning, everyone says "well, that's obvious!". But without knowing the details, the answer seems to appear by magic. Similarly, the AI programmers in Civ II have laid their work bare for all to inspect via the cheat menu. Not only does this allow people to say, "that stupid AI was building a library when it should have been building a temple", but it allows people to analyze the AI algorithms. The human players' intimate knowledge of the AI techniques leads to a style of gameplay specifically geared to exploit the AIs' weaknesses. Plus, what may have seemed like optimal strategy at the time the game was released has been trumped by new techniques.
So while scripting and/or templates are a good idea, they *must* be changeable. As strategies mature and new schemes are developed, the AIs should be able to keep up. This also would lessen the problem of the AI becoming predictable and therefore beatable.
To sum up - the AIs don't need to *be* intelligent, just to *appear* intelligent. There is a huge difference. No AI will ever be able to compete one-on-one with a top human player, but they can put up a much better challenge than they do now. Although Civ is much more complicated than chess, the AIs in Civ have several advantages over their brothers in the chess world: they outnumber the human player, they can have handicaps in production/research, the human player has limited information, and there are many more roads to a winning game.
|
|
|
|
June 27, 2000, 02:57
|
#21
|
Deity
Local Time: 08:54
Local Date: October 31, 2010
Join Date: May 1999
Location: The City State of Noosphere, CPA special envoy
Posts: 14,606
|
A very interesting method of determining advantages and disadvantages is the field (or influence) model first proposed by Chris Crawford (for a game at least).
In the original article Chris proposed to use a "field" to model the influence projected by any given unit in a game. This "field" is the same as the fields in classical physics, and can be represented by: I = S/R**2, where I is influence, S is strength of the unit, and R is distance. You can modify the fomula to have the field strength dropping faster or slower.
This can be expanded in Civ3 to include influences of specials, terrain, cities, and whatnot. You can have different sorts of influences: food production, shield production, etc. To take a concrete example, the computer builds a city at a particular location after it has optimized a number of influences, say, grain production and shield production.
A couple more points on AI programming. First, you don't have to recompute everything whenver something changes. The program can store the results of the previous computations and make modifications according to the changes that have been made. That will save a lot of time.
Second, it can make use of a database just like Deep Blue. It can store previous moves and strategies, thus cutting back on computation requirements by a huge amount.
|
|
|
|
June 27, 2000, 09:18
|
#22
|
Prince
Local Time: 00:54
Local Date: October 31, 2010
Join Date: May 2000
Posts: 384
|
You make a very good point with regard to weighting using fields; its a great idea to have a number set that we can 'see' and 'use'.
Regarding your last statment though, while it *could* store previous moves and strategies... what would that achieve;
To be useful in branch prediction, you'd need to know (also) about the map, and the moves of other players too. You'd also need to know the success or otherwise of certain actions (combat for one, for instance).
This imposes several factors elsewhere in the game; for instance you need to make unique identifiers for units, to insure that they can be identified as the same entity by whatever processing you do later. As you introduce these unique entities you need to classify them.
There are a bunch of other considerations, such as gold level, tax settings and so on that also need to be stored on a turn by turn basis.
Whist this isn't an overwhelming amount of information, it is a lot, and would slow down the processes. How significantly? I'm not sure.
The analysis definitely won't be possible on an in game basis. It will have to be between games.
Then the question becomes, how do you interpret these logs you generate. How does a computer know that its moving towards unit 20 towards location X1,Y1 rather than X,Y, was a tactical mistake. Humans can reduce the situation to identifiable parts and use visualization to identify strategies and their outcomes.
Of course, you could always copy a human; do what you think, but save the state of the analysis each turn. If the success values aren't high enough go back a number of turns depending on what the goal was, and retry the same situation using the next permutation of strategy. Quantum gameplay
|
|
|
|
June 27, 2000, 10:27
|
#23
|
Warlord
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Sep 1999
Posts: 274
|
I don't think the AI has to store all of the history. It should instead concentrate on the current turn.
First of all. The AI - should have some kind of knowledge of it's power compared to other civs atleast those where a embassy is established.
This power should be a few clear defined variables like:
Economic strength
Economic growth
Military strength
Military growth
Scientific strength
Sceintific growth
Population
Popualtion growth
Overall strength
Overall growth
The thing is this.
Every civ tries to get the biggest number in all these areas. But also they are carefully not to get involved in someone that is too powerful. In those cases where the AI "don't know" it simply puts a guess into the variable.
This variables are what makes the AI-player decide if you are strong enough to be a threat or weak enough to be able to defeat.
Then reputation, nationalism, ideologies, governmentform, and the "feeling" for other civs is what determines if they actually will declare war.
Then after this is done the AI - will use it's geographical knowledge of you for determing which cities they should invade.
Then after this is done it will worry about actual troop movements.
What i mean is that the AI don't need to consider everything at the same time and it doesn't need to store old moves. It simply has a number of variables telling it how things are going, another bunch of variables telling it what to do about it, another bunch of varibales telling it how to do it and finnaly a bunch of varibles for doing it.
Every event and action will in some way influence some of these variables. Some kind of randomness should also be incorporated and then the AI-player will seem almost intelligent. Or atleast not as stupid as it is now. As it is now it seems like every unit and every city has it's own agenda. But all you need for overall AI - decisions is overall variables and that is not so hard to get.
|
|
|
|
June 28, 2000, 02:21
|
#24
|
Born Again Optimist
Local Time: 20:54
Local Date: October 30, 2010
Join Date: Apr 1999
Location: This space reserved for Darkstar.
Posts: 5,667
|
On this topic of AI, I have seen more than one programmer/designer (including Brian Reynolds) say something like this:
"Basically I play the game and think about what I would do in a given situation. This then gets programmed and tested. If the result makes for a more challenging AI in a given situation, the instructions are kept, otherwise tossed. Repeat repeat repeat."
In other words, this is a kind of asynchronous learning process where it's the programmer doing the learning and "instructing" his program to do better next time. The limitations of this are glaring:
** The AI will never be better than the programmer himself (and let's face it, most programmers simply can't play the game as much as dedicated fans do).
** Once the game is released, the AI is more or less unable to learn anything new since the programmer can't possibly continue to tweak the AI according to what develops in the "real world" of Civ gaming. Thus, a trick that beat the AI one game will beat it forever. Find enough tricks and the game is no longer a challenge.
Some possible solutions have been these:
** The .txt files, as far as I know, were originally made popular by Brian Reynolds. This is an extention of the programmer making the AI better...except it's the gamer himself who is the programmer. Obviously the gaming community itself can much more readily tweak the AI to address the strategy of the week, and I hope to see this ability expanded for Civ3--but it's still only a patch-work solution.
** A more promising solution, the AI Holy Grail, is to eliminate the need for the programmer/gamer in this process entirely and find a why for the AI itself to analyze and correct the decisions that lead to its defeat. One simple step is the rock-scissor-paper method whereby the comp "remembers" what you attacked with at any given point in the game and makes the proper counter for the next battle or even the next game (if you allow it to build and build on its record of how you play). Again, this can be beaten by simply understanding that the AI will now expect you do to A, B, C. So doing D, E, F will likely result in an easy win. In part, this is how Big Blue is beaten--unorthodoxed (but, of course, clever) chess moves simply throw the AI for a loop.
This "memory" is still better than nothing, though, as most players simply stick to a pattern themselves, and if the AI can record and react to it over several games, you would in effect be training the computer to beat your specific game plan. I have to admit, this has appeal if only in that I would need to keep trying different things in order to keep the AI off-balance. By the way, that works well against human players as well.
But the big piece is still missing: How do you program an AI to intelligently expect the unexpected, to cleverly try the unexpected itself, and to learn not only from what has actually happened in previous games (which can be done in at least a simple way) but to predict what might happen beyond that stored experience (which would require, at last, "intelligence"--keeing in mind that random responses might occasionally look smart but will generally fail, so its more than just being unpredictable)?
Most of us aren't actually all that intelligent in this sense either when you think about it. That's good, in a way, since the AI could learn to beat us given enough exposure to our patterns of play (though I suppose we'd need user profiles so that your brother doesn't come on and confuse the poor AI with something different from your strategy).
But true intelligence is more than this, obviously, and to expect it from computer code when its rare to find in human beings themselves is a grand hope indeed. Personally, I think if computers ever become THAT smart, [insert scary Doomsday sentence here]...
Until then, a strong on-line community with the tools to tweak the game is still our best bet for a Civ3 that will evolve along with us.
[This message has been edited by yin26 (edited June 28, 2000).]
|
|
|
|
June 28, 2000, 02:35
|
#25
|
Warlord
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Feb 2000
Location: of Sheffield, England
Posts: 232
|
Well the only thing that I can say to follow Yin26s' excellent post is that the AI doesnt have to be better than (or even equal to) a human player to give a good challenging game, cos remeber there are often 7 (or more) civs against you, which puts the odds against you anyway.
My only comment on improving the AI is that if you get rid of ICS then you also get rid of the easiest way to beat the AI, and that will make the game more challenging.
[This message has been edited by Grier (edited June 29, 2000).]
|
|
|
|
June 29, 2000, 18:42
|
#26
|
King
Local Time: 10:54
Local Date: October 31, 2010
Join Date: May 2000
Location: Melbourne, Australia
Posts: 1,728
|
You know, Grier's right! I hadn't thought of that - perhaps a near-human AI is not needed after all...
------------------
No, in Australia we don't live with kangaroos and koalas in our backyards...
|
|
|
|
June 30, 2000, 08:24
|
#27
|
Born Again Optimist
Local Time: 20:54
Local Date: October 30, 2010
Join Date: Apr 1999
Location: This space reserved for Darkstar.
Posts: 5,667
|
It's true that being ganged up on or giving the AI more resources to work with, etc. is a workaround. In Age of Kings, for example, putting the AI on "Hardest" gives it such a jump on you that you end up playing a totally different kind of game to survive and win. Not that this is bad in its own way, but once again its a matter of finding how best to let the AI screw up than it is executing great strategy...though some of what you develop could translate well to multiplayer.
|
|
|
|
June 30, 2000, 08:44
|
#28
|
King
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Sweden
Posts: 1,728
|
To summarize it all: I can live with the overall “unit-navigation problem” - IF Firaxis instead concentrates its efforts on…
* The overall AI City-management problem.
(Use force guiding scripts/ templates instead – and many variants of them, so no game is the same).
* The ICS-problem (and not only the extreme variant of it – also building 12-15 cities and 2-3 early Wonders BEFORE building basic temple/marketplace structures should be combated).
* The implementation of the “Rise and fall of empires” idea. TOO successful and far ahead should also have its distinct disadvantages. (By the way, is there a thread about this?)
… Then above alone should ensure a much more interesting game. Repeating SMAC with different graphics just isn’t good enough.
|
|
|
|
June 30, 2000, 09:02
|
#29
|
Warlord
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Feb 2000
Location: of Sheffield, England
Posts: 232
|
IMO the rise and fall of empires is the most essential change required for civ3, as its one of the only ideas that will actually make civ3 a different game without losing the cannon civ elements.
|
|
|
|
June 30, 2000, 09:47
|
#30
|
King
Local Time: 18:54
Local Date: October 30, 2010
Join Date: Oct 1999
Location: Colorado
Posts: 1,555
|
That along with its companion idea, 'different modes of winning'.
|
|
|
|
Posting 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
|
|
|
All times are GMT -4. The time now is 20:54.
|
|