Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site forums as they ran on Ultimate Bulletin Board, 1998–2001. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 2005 site & forums

  Apolyton Civilization Site Forums
  Civ3-General/Suggestions
  Arguments why its nearly impossible to program an "almost human" AI. (Page 1)

Post New Topic  Post A ReplyPost A Reply In A New Window

This topic is 2 pages long:   1  2  profile | register | preferences | faq | search next newest topic | next oldest topic bottom of page
Author
Topic:   Arguments why its nearly impossible to program an "almost human" AI. Format for Better Printing
Ralf
Prince
Sweden
Mar 2000
posted June 23, 2000 06:57   Click Here to See the Profile for Ralf   send a private message to Ralf
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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).]

Steve Clark
Prince
Colorado Springs, CO
Oct 1999
posted June 23, 2000 10:23   Click Here to See the Profile for Steve Clark   send a private message to Steve Clark
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.

Ralf
Prince
Sweden
Mar 2000
posted June 23, 2000 16:24   Click Here to See the Profile for Ralf   send a private message to Ralf
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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:
../../Forum6/HTML/001244.html ../../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.

Steve Clark
Prince
Colorado Springs, CO
Oct 1999
posted June 23, 2000 17:11   Click Here to See the Profile for Steve Clark   send a private message to Steve Clark
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.

TheLimey
Prince

May 2000
posted June 23, 2000 17:17   Click Here to See the Profile for TheLimeyClick Here to Email TheLimey  send a private message to TheLimey
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.

UltraSonix
King
Melbourne, Australia
May 2000
posted June 23, 2000 23:12   Click Here to See the Profile for UltraSonixClick Here to Email UltraSonix  send a private message to UltraSonixSend a Message to UIN: 97330588 Visit UltraSonix's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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...

Ralf
Prince
Sweden
Mar 2000
posted June 24, 2000 09:59   Click Here to See the Profile for Ralf   send a private message to Ralf
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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:
(../../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?

S. Kroeze
Warlord
the Hague, the Netherlands
Dec 1999
posted June 24, 2000 11:48   Click Here to See the Profile for S. KroezeClick Here to Email S. Kroeze  send a private message to S. Kroeze
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.

Biddles
Prince
Melbourne, Victoria, Australia
Mar 99
posted June 25, 2000 00:42   Click Here to See the Profile for BiddlesClick Here to Email Biddles  send a private message to BiddlesSend a Message to UIN: 20518789 Visit Biddles's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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

TheLimey
Prince

May 2000
posted June 25, 2000 01:15   Click Here to See the Profile for TheLimeyClick Here to Email TheLimey  send a private message to TheLimey
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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'.

Ralf
Prince
Sweden
Mar 2000
posted June 25, 2000 11:24   Click Here to See the Profile for Ralf   send a private message to Ralf
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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).]

TheLimey
Prince

May 2000
posted June 25, 2000 12:32   Click Here to See the Profile for TheLimeyClick Here to Email TheLimey  send a private message to TheLimey
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.

MidKnight Lament
King
Melbourne, Australia
May 99
posted June 26, 2000 09:27   Click Here to See the Profile for MidKnight LamentClick Here to Email MidKnight Lament  send a private message to MidKnight LamentSend a Message to UIN: 16823806 Visit MidKnight Lament's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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

Googlie
King
Vancouver, BC, Canada
Apr 99
posted June 26, 2000 11:55   Click Here to See the Profile for GooglieClick Here to Email Googlie  send a private message to GooglieSend a Message to UIN: 83455324 Visit Googlie's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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

Steve Clark
Prince
Colorado Springs, CO
Oct 1999
posted June 26, 2000 12:23   Click Here to See the Profile for Steve Clark   send a private message to Steve Clark
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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'.

DaveV
King
USA - EDT (GMT-5)
b.02-15-99
posted June 26, 2000 12:37   Click Here to See the Profile for DaveVClick Here to Email DaveV  send a private message to DaveVSend a Message to UIN: 57491035
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.

Stuff2
Warlord

Sep 1999
posted June 26, 2000 15:38   Click Here to See the Profile for Stuff2   send a private message to Stuff2
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.

Ralf
Prince
Sweden
Mar 2000
posted June 26, 2000 17:09   Click Here to See the Profile for Ralf   send a private message to Ralf
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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).]

UltraSonix
King
Melbourne, Australia
May 2000
posted June 26, 2000 23:35   Click Here to See the Profile for UltraSonixClick Here to Email UltraSonix  send a private message to UltraSonixSend a Message to UIN: 97330588 Visit UltraSonix's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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...

Ralf
Prince
Sweden
Mar 2000
posted June 27, 2000 00:15   Click Here to See the Profile for Ralf   send a private message to Ralf
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.

Urban Ranger
Emperor
The City State of Noosphere
May 99
posted June 27, 2000 02:57   Click Here to See the Profile for Urban RangerClick Here to Email Urban Ranger  send a private message to Urban Ranger
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.

TheLimey
Prince

May 2000
posted June 27, 2000 09:18   Click Here to See the Profile for TheLimeyClick Here to Email TheLimey  send a private message to TheLimey
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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

Stuff2
Warlord

Sep 1999
posted June 27, 2000 10:27   Click Here to See the Profile for Stuff2   send a private message to Stuff2
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.

yin26
King
Work in Seoul, Korea. From Los Angeles.
Apr 99
posted June 28, 2000 02:21   Click Here to See the Profile for yin26Click Here to Email yin26  send a private message to yin26
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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).]

Grier
Warlord
of Sheffield, England
Feb 2000
posted June 28, 2000 02:35   Click Here to See the Profile for GrierClick Here to Email Grier  send a private message to Grier
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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).]

UltraSonix
King
Melbourne, Australia
May 2000
posted June 29, 2000 18:42   Click Here to See the Profile for UltraSonixClick Here to Email UltraSonix  send a private message to UltraSonixSend a Message to UIN: 97330588 Visit UltraSonix's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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...

yin26
King
Work in Seoul, Korea. From Los Angeles.
Apr 99
posted June 30, 2000 08:24   Click Here to See the Profile for yin26Click Here to Email yin26  send a private message to yin26
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.
Ralf
Prince
Sweden
Mar 2000
posted June 30, 2000 08:44   Click Here to See the Profile for Ralf   send a private message to Ralf
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.

Grier
Warlord
of Sheffield, England
Feb 2000
posted June 30, 2000 09:02   Click Here to See the Profile for GrierClick Here to Email Grier  send a private message to Grier
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
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.
Steve Clark
Prince
Colorado Springs, CO
Oct 1999
posted June 30, 2000 09:47   Click Here to See the Profile for Steve Clark   send a private message to Steve Clark
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
That along with its companion idea, 'different modes of winning'.
Sikander
Prince
Boulder, Colorado, United Snakes of America
Jan 2000
posted July 01, 2000 18:41   Click Here to See the Profile for SikanderClick Here to Email Sikander  send a private message to Sikander
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Quite an excellent thread. I have a few (well maybe more than a few) thoughts.

1) As has been stated before, these Civ style games are many orders of magnitude more complex than chess. Any chess like approach to analysis is doomed to failure, even for a computer as powerful as Deep Blue. Consider:

Chess: 64 squares, 1 terrain type.
Civ etc.: Thousands of Squares, numerous terrain types.

Chess: I move, you move.
Civ: I move possibly 100 (or more) units, you move your numerous units.

Chess: I move and attack with 100% probability of success.
Civ: I sometimes have a fractional movement point, and all combat has some chance of failure. Therefore numerous sub-analysis paths must be calculated.

Chess: Same simple map every game, with only one opponent.
Civ: Possibly different maps every game, with several opponents.

And these are only the some of the problems with only one aspect of the game. (Movement and combat)

Now consider that as simple as chess is, it took a dedicated team of expert programmers years to train a supercomputer to reliably beat an expert chess player.

This is a problem that not only won't go away, but will get more difficult as player demands for more complexity outpace advances in computers and programming techniques.

The solution lies in thinking outside of the box. As stated above, the game complexity for the AI must be drastically reduced if it is going to be able to produce a quality opponent for a human. Fortunately, this doesn't have to be as painful as one might imagine. Consider exactly what is being simulated by these 'god' type games:

An immortal being manages an empire at all levels for all time. Not all that realistic, but loads of fun.

In reality, President Roosevelt probably had more power in his hands than any human being ever had in history previously. He had speed of light communication, and vast armies armed with the latest weapons. Yet he never had so much power as to be able to dictate even operational details to his commanders. He had to kowtow to MacArthur's strategic vision in the Pacific in order to safeguard his political grip on power. Now imagine the limitations forced upon ancient emporers with shaky internal power structures and speed of horse communications. Or even worse, Monarchs in the middle ages, with numerous scheming and often rebellious 'subordinates'. A vast majority of his time would be spent trying to hold on to his Kingdom, with very little left to improve the infrastructure of his people or for wars outside his borders.

Thus I suggest that a new model would seek to be more of a simulation and less of a 'god' level excersize. This would simplify the game by turning such things as tactical considerations over to a player's AI generals, while the player himself would be kept busy managing the internal and external political situation. With both the AI and the player at the mercy of the same AI generalship, a huge amount of player advantage would melt away, with no need to endlessly tinker with the AI tactics in order to keep them one level above embarrassing. I for one take very little pleasure in playing a bad wargame against a bad opponent, and would not miss Civ's tactical units on a strategic map style of combat.

With this major portion of the game now 'hidden' from player control, a much more realistic (and at least for me fun) game can be produced. Realistic movement and supply considerations can be economically introduced with no fear of human abuse. Simultaneous movement can become a reality (not a bad idea in a game where the minimum turn length is a year), and will reduce the enormous advantage given to the attacker when all of his units can expend a year's worth of combat power before the defender can react.

These reductions in the need for extensive AI programming will enable the design team to concentrate more on the building and management side of the game, which is easier to do, since it is basically the human vs. the management model, rather than the exceedingly complex human generalship vs. AI generalship. Limitations on the size and scope of the player's power are also a good idea. I would use political settings and speed of communication to judge just how large an empire could be and still remain whole over time. Thus an ancient empire with post roads and an efficient bureacracy could become quite large, but could break apart due to external or internal pressures (as stated above) much as Rome etc. did. To sum it up, I would like to do more on the management screen, and less micromanagement on the map.

Finally, it has been suggested that a record of the game be kept so that the AI can 'learn' from history and improve over time. This is a good idea, but not practical due to the immense complexity of the game as currently configured, and the very limited amount of processing power and memory currently available to the PC. Perhaps it would be wiser to contemplate a larger centralized database (with an appropriately larger computer) to continuously improve the AI. Players could sign up to upload their game data to the host, and in return (perhaps for a small fee) receive the latest version of the AI algorithm. This might well keep the game fresh, and in return would give the designers a reason to continue to support the game.
[This message has been edited by Sikander (edited July 01, 2000).]

Adm.Naismith
Prince
Milano - Italy
Oct 1999
posted July 02, 2000 18:20   Click Here to See the Profile for Adm.Naismith   send a private message to Adm.Naismith Visit Adm.Naismith's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
I left two weeks for a vacation (far from any PC) and what I find when I come back? Some old "friends":
1) Downloadable AI pattern
2) Simultaneous turns

Thanks!

I programmed for some years, but only business things, not AI at all, so I don't know exactly how actually AI development works.

I find very interesting most of the posts here, mainly those about "different approach" to AI behaviour, and I agree that Firaxis should:

Put "AI templates" in a form that can be imported into CIV III to keep the challenge high.

Let the game, or an external server (good idea I red here), able to store game history, analyze to a simple level the winning tactics, then export a new "AI template" to share with others players.
As in some computer chess tournament, putting a good server into crunching some thousand of game confronting different "AI pattern" will help a lot into selecting the "best of breed" to put on Internet, free to download.

I bet after two/three months of hard core fan games we can get some interesting path to victory to use tuning "AI templates".
What a "long term game value"!

Instead, I'm not sure about the idea of put some human game control back to AI: it will level the playfield a bit, but it will raise the frustration of players. I tried SMAC governors in a game, then I was very happy to put the option off: if I was forced to use a bunch of idiot as my governor I probably should have put the whole game in the bin.

But Simultaneous turns alone is a VERY GOOD leveller: it force the human player to cope with a variable situation, where he/she can't know exactly how the enemy will act THAT SAME turn.

It's not so bad for an already limited AI player, because a pattern is only a general frame, and the AI navigation/attack decisions are short-sighted and limited by actual game AI development.

It left the control into the hands of the player, but introducing a bit of "uncertain".

But Simultaneous turn doesn't gain the attention it deserves (take a look to the EC3 poll), so I know we haven't any chance to see a CIV (put your number here) using it.

------------------
Admiral Naismith AKA mcostant

Urban Ranger
Emperor
The City State of Noosphere
May 99
posted July 05, 2000 01:58   Click Here to See the Profile for Urban RangerClick Here to Email Urban Ranger  send a private message to Urban Ranger
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
It is necessarily to store the map as the AI know it between turns. There are two advantages:

1. If properly programmed this should reduce time required to evaluate a situation. Of course there are many unknowns, that's why this past "experience," stored as a database, is imperative. That's precisely how human would do when facing a new situation: reach back into his memory and pull out similar ones. Now, it is necessarily that such resemblances are fuzzy, not exact. But it beats starting from a blank slate. Having a degree of fuzziness also produces surprise moves on the AI's part, since moves become probablistic and not deterministic.

2. Again, this prior knowledge helps the AI to make better moves, since it can look deeper, by discarding "hopeless" moves using a pruning algorithm. Certainly this is not perfect and some bad moves are actually brilliant, but we make such mistakes too. It certainly lets the AI to know what combination moves are good, and wastes no time in making them.

I agree what Brian and company did programming the AI is, well, silly.

1. They don't know if what they do is the best move for that particular situation.

2. The AI becomes just a huge IF...THEN loop looking for a set of predetermined moves.

3. The AI never learns; makes the same mistakes over and over again.

Steve Clark
Prince
Colorado Springs, CO
Oct 1999
posted July 05, 2000 15:45   Click Here to See the Profile for Steve Clark   send a private message to Steve Clark
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
After taking some time off, I mulled over the issue of AI in civilization-based games. I don't have anything profound to say except I think most of you are setting yourselves up for a significant let-down when Civ3 comes out. Here are some thoughts.

The AI in complex games such as Civ will NEVER, EVER be as good as an expert human player. The idea of letting the AI take over micromanagement tasks from humans is preposterous. IMO, Civ2 does not involve that much micromanagement as compared to other strategy titles, so why give some of that up when you will likely ALWAYS do a better job (e.g., autosettler, city locations, pathfinding, etc.)? No, I'm expecting that there will be some level 0 changes we can make in order to handicap ourselves when playing against the AI.

Civ3 will appeal to the masses (in order to sell 500,000+ units) and not just to hard-core strategy gamers who expect Big Blue-type AI. The AI will be programmed (like now) to play at the King level so to give inexperienced players a chance. It will not give Deity players much competition unless there are handicaps. If you want Deity-level competition, play against humans or play a challenging scenario.

UltraSonix
King
Melbourne, Australia
May 2000
posted July 05, 2000 18:30   Click Here to See the Profile for UltraSonixClick Here to Email UltraSonix  send a private message to UltraSonixSend a Message to UIN: 97330588 Visit UltraSonix's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
OK, many of you would probably wouldn't like this cheap suggestion. How about creating a few maps and then telling the AI how to play on it. So the AI has been rigged, really, to know where to build, all the other starting locations, and where to expand to. The script of what to do would be in a accompanying text file, and could apply to any user-designed map. Obviously this system wouldn't work for a random map, and yes I kn ow, playing on the same maps all the time isn't very fun. But heh, I say it was a cheap suggetion...

------------------
No, in Australia we don't live with kangaroos and koalas in our backyards...

yin26
King
Work in Seoul, Korea. From Los Angeles.
Apr 99
posted July 06, 2000 01:18   Click Here to See the Profile for yin26Click Here to Email yin26  send a private message to yin26
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Actually, for set maps such as Earth, I think that anytime you attack another civ on HIS homeland, he should (in addition to having excellent build orders for his map) get significant combat bonuses reflecting his familiarity with the terrain. Would make for a much more challenging game all around.
Urban Ranger
Emperor
The City State of Noosphere
May 99
posted July 06, 2000 04:12   Click Here to See the Profile for Urban RangerClick Here to Email Urban Ranger  send a private message to Urban Ranger
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Steve Clark,

That's not a problem. It's not hard to have several levels of AI strength built-in. The selection of AI strength can be tied directly to the difficulty level.

Stormdancer
Settler
NM, USA
Jun 2000
posted July 06, 2000 16:00   Click Here to See the Profile for StormdancerClick Here to Email Stormdancer  send a private message to Stormdancer Visit Stormdancer's Homepage!
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Quick note RE: Unit Shuffle.

To solve the symptom: Unit 'remembers' the squares it's stepped on this move, and will not step on one it's already been in.
Note that this can be handled different ways

1) If you step on your trail, back up until you can avoid doing so. (classic maze-solving method)

2) If you step on your trail, 'snip off' the loop, and continue moving.

Both of these have the same potential problems - your unit may just make some huge long wandering pointless dance.

The real problem is that it wants to get somewhere it doesn't know how to get to. Pathfinding has always been a problem in games of this ilk, but obviously it's a solvable problem. The 'don't hit the same spot twice' rule can help with this, as it can give the unit a clearer idea of where NOT to go, at least.

Basically, a quick "If I end up my turn here, would I be better off (closer to my goal) than I was before?" check would at least inform the unit to just sit tight if it wouldn't be.

Still, it's kind of funny to watch them do that anxious little "I wanna get there!" dance. Like a horse running up and down the fenceline.

--Stormdancer
Graduate of the Origin Training Academy.

Daniel Frappier
Prince
Montreal, Quebec, Canada
b.02-15-99
posted August 31, 2000 22:29   Click Here to See the Profile for Daniel FrappierClick Here to Email Daniel Frappier  send a private message to Daniel Frappier
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Interesting Thread,

I think it is a good guess to assume That Civ III will have a better AI then Civ II, marginally better.

I say that if only 5% (probably 2%) of the efforts that went into programming chess in the last 40 years were put into Civilization we would have an AI that would play at the level of a good human player.

Chess is very different compared to a Civilization Game. Chess is above all a tactical game, E. Lasker a former world chanpion use to say that chess is 95% tactics. By tactic we understand the calculation of moves and then counter moves and so on. That's why computers are so strong, the best programs like Deep Blue contain only a fraction of the Strategies that a good amateur player knows but when they play together all that strategy is not of much use if the human player makes only 1, that's right only 1 tactical error. If you were to change the chessboard and make it 16x16 instead of 8x8 and add pieces then Deep Blue would go back to the level of a very mediocre human player and would stay ther until the hardware gets speed up many thousands of times in many years.

I would say on the other hand that Civilization is 97% Strategic and only 3% Tactic (my estimate). Probably because unlike chess you are not allowed to play only 1 move but you can play as many as you wish. Think about it, in you're Civ game how much time do you spend managing and how much do you spend on tactic. Even when it comes to tactic if i want to make an invasion with 15 units the terrain is rarely such that i am limiting to moving my units from A to B in 1 specific way and that any other way is catastrophe.

On a final note does of you that spent time looking up at CTP'S AI (the fuzzy system is wide open) probably were stunt by one thing: not the limitation of a fuzzy engine use in a game such as CTP but the very ill conceived rules that were feeded to the fuzzy engine by CTP's AI programmers. To their defense they probably didn't do it this way because they were stupid but because doing it this way was simple and they were sure to finish on time for the game's release.

What i mean by this way is simply things like poping up the next wonder or improvment to build from a list with little reguard to the game situation, same thing when deciding what to research next, etc. etc. And i am sure Civ II or SMAC isn't better.

Sometime in the next couple of years you will see the emergence of a strong AI in a Civ game but it won't come from a commercial cie. it will come from a group of Civs enthousiast.

Ralf
Prince
Sweden
Mar 2000
posted September 01, 2000 16:14   Click Here to See the Profile for Ralf   send a private message to Ralf
Edit/Delete Message    Reply To And Quote This Message
IP: Logged, Admin Access Only
Frappier quote: "I would say on the other hand that Civilization is 97% Strategic and only 3% Tactic (my estimate). Probably because unlike chess you are not allowed to play only 1 move but you can play as many as you wish. Think about it, in you're Civ game how much time do you spend managing and how much do you spend on tactic. Even when it comes to tactic if i want to make an invasion with 15 units the terrain is rarely such that i am limiting to moving my units from A to B in 1 specific way and that any other way is catastrophe".

Exactly! my additional comment: I have never won a game over the AI only as a result of clever tactical unit maneuverings. Unlike chess, i doesnt matter that much in Civ if the AI (or the human player) makes some tactically wrong moves with their units. They can always repair such mistakes in the long run (or just reloading a saved game - pathetic and spineless i now, but many of us (including me ) do just that.

I have ALWAYS won the games over the AI as a direct result of better logistics (= better resource management plus more effective unit-improvement and city-improvement strategies). Strengthening the AI:s ability to handle the overall strategy LOGISTICS are the key to a better Civ AI.
To summarize it: A great AI-civ "should march on its belly" (Napoleon semi-quote)

Because only a few procent of the overall game-outcome depends on proper tactical unit-maneuverings, it such a waste of time to continue to post suggestions about more and different units, and how they shall mimic the human player. Civ is a 97% strategic/3% tactical game, so lets concentrate our suggestions how to improve the overall strategic AI-logistics shall we!
[This message has been edited by Ralf (edited September 01, 2000).]

Apolyton Civilization Site Forums
> > > Civ3-General/Suggestions Forum

This topic is 2 pages long:   1  2 
next newest topic | next oldest topictop of page

All times are EDT

Administrative Options: Close Topic | Archive/Move | Delete Topic | Top
Post New Topic  Post A ReplyPost A Reply In A New Window
Hop to:

Contact Us
Apolyton Civilization Site

Powered by: Ultimate Bulletin Board, Version 5.44a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 2000.

AltaVista Type or paste text or Web address (beginning with http://) here:
Powered
by Systran
Translate from: 

Front Page | Civilization III | Dinosaurs | Civilization II | Call to Power | Call to Power II | Alpha Centauri | Alternative Civs | Misc | Links | About ACS | GameStats
GameLeague | Scenario League | HAC | Civilization Scenario Collection | Spanish CivII Site | Clash of Civs | CtP Maps | Art of War | WesW's Ctp1/2 Site