Thread Tools
Old July 1, 2000, 18:41   #31
Sikander
King
 
Sikander's Avatar
 
Local Time: 17:54
Local Date: October 30, 2010
Join Date: Jan 2000
Location: Boulder, Colorado, United Snakes of America
Posts: 1,417
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).]
Sikander is offline  
Old July 2, 2000, 18:20   #32
Adm.Naismith
King
 
Adm.Naismith's Avatar
 
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Oct 1999
Location: Milano - Italy
Posts: 1,674
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
Adm.Naismith is offline  
Old July 5, 2000, 01:58   #33
Urban Ranger
NationStatesApolyton Storywriters' GuildNever Ending Stories
Deity
 
Urban Ranger's Avatar
 
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
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.
Urban Ranger is offline  
Old July 5, 2000, 15:45   #34
Steve Clark
King
 
Steve Clark's Avatar
 
Local Time: 18:54
Local Date: October 30, 2010
Join Date: Oct 1999
Location: Colorado
Posts: 1,555
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.
Steve Clark is offline  
Old July 5, 2000, 18:30   #35
UltraSonix
King
 
Local Time: 10:54
Local Date: October 31, 2010
Join Date: May 2000
Location: Melbourne, Australia
Posts: 1,728
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...
UltraSonix is offline  
Old July 6, 2000, 01:18   #36
yin26
inmate
Apolytoners Hall of Fame
Born Again Optimist
 
yin26's Avatar
 
Local Time: 20:54
Local Date: October 30, 2010
Join Date: Apr 1999
Location: This space reserved for Darkstar.
Posts: 5,667
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.
yin26 is offline  
Old July 6, 2000, 04:12   #37
Urban Ranger
NationStatesApolyton Storywriters' GuildNever Ending Stories
Deity
 
Urban Ranger's Avatar
 
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
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.
Urban Ranger is offline  
Old July 6, 2000, 16:00   #38
Stormdancer
Settler
 
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Jun 2000
Location: NM, USA
Posts: 16
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.
Stormdancer is offline  
Old August 31, 2000, 22:29   #39
Daniel Frappier
Prince
 
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Dec 1969
Location: Montreal, Quebec, Canada
Posts: 590
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.
Daniel Frappier is offline  
Old September 1, 2000, 16:14   #40
Ralf
King
 
Ralf's Avatar
 
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Sweden
Posts: 1,728
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).]
Ralf is offline  
Old January 10, 2001, 18:44   #41
pchang
King
 
pchang's Avatar
 
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Aug 1999
Location: Mill Valley
Posts: 2,887
However, there are ways to supplement real AI programming that w/ scripts which can yield more effective game play from the computer. Certain parameters can trigger the execution of scripts (It appears clear that CTP and CTP2 utilize this to some extent). These scripts are preset procedures for accomplishing specific tasks which take precendence over other AI activities. Such scripts could be used to load up and land full invasion forces, or settle and expand in new territory (one way to program the computer to use ICS). However, the scripts need to be created by experienced, high level players. The problem with most game programmers is that they are to busy programming to be really good players.
pchang is offline  
Old January 10, 2001, 19:08   #42
Ralf
King
 
Ralf's Avatar
 
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Sweden
Posts: 1,728
I basically agree with what you saying in your post, Pchang.

However, heres an idea that could help Firaxis get around the whole AI-settler path-finding problem. Im not 100% sure if its doable in practice, but It would be absolutely great if it was.

Never mind the title - this post quickly turns into something else further down: http://apolyton.net/forums/Forum6/HTML/002067.html

Any comments?
[This message has been edited by Ralf (edited January 10, 2001).]
Ralf is offline  
Old January 11, 2001, 18:23   #43
pchang
King
 
pchang's Avatar
 
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Aug 1999
Location: Mill Valley
Posts: 2,887
My idea for optimal city placement is the following:

Default method:
Each terrain square has a point value based on its resources.
Squares already in a city radius have a value of 0.
The city placement value comes from the sum of all the squares in a potential city radius.
Computer places city on square with the maximum value.

Script method:
Some trigger activates a specific script. Examples -
survival mode - activates ICS-like settler creation and city creation
bottleneck mode - activates city creation on geographical bottleneck for defense
etc.
pchang is offline  
Old April 18, 2001, 07:54   #44
RGE
Chieftain
 
RGE's Avatar
 
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Jul 1999
Location: Karlstad
Posts: 49
If Civ 3 is going to use the same type of units as Civ 1&2 and SMAC, I think one necessary improvement would be to code the AI to use those units to accomplish goals rather than just having them follow their own algorithms.

For instance, when trying to conquer a city, the AI should first run a check to see which units are availible for attacking that city. Then the AI should see which one attacker will have the highest power compared to the best defender (after taking movement into account). Then compare the second highest powered unit to the next defender, and so on, until the city is empty and ripe for conquest by the last military unit within reach (preferably a wounded or defensive unit). If the AI units loose too many battles for the AI to be able to conquer the city, it's time to retreat.

If the AI doesn't have enough units, or if the present units are too weak to stand a chance, those units should move to a tile with a better defense bonus while waiting for reinforcements. In order to keep units from dancing back and forth (half of the army is heading for the hills to wait for reinforcements while the reinforcements are in the hills), it might be necessary for the AI to take two turns of its own movement into account when determining which units to move to which tile.

One pretty smart thing that the AI is already capable of is to have a weak unit taking cover behind a strong unit, such as the barbarian leaders who always hide behind their troops. This is how strong offense/weak defense-units should behave; catapults and cannons should hide behind phalanxs and musketeers. The AI should only allow a unit to move within strike distance of an enemy unit if the enemy won't have enough power to win reliably should it attack. The only exception to this rule would be if the AI had so many units that it can afford to take such losses during an assault on a city, but then the AI should count those units as dead before calculating the final chances of a successful conquest.

If the AI isn't building or sending reinforcements, the army should either pillage until destroyed, or retreat if there's a city close enough to make it worth the trip, comparing the loss of upkeep to the value the number of shields the units would give when being recycled.

If the army doesn't stand a chance due to city walls or other defense improvements, the AI should send diplomats or spies to sabotage those improvements. In fact, if the AI knows that it has to conquer a city with walls, it should always include enough diplomat units to make it likely that those walls will fall before the army attacks. Because I do that, and usually it's the only way to take a city.

The same idea should be used when the AI tries to create a beachhead for an invading army; there's only a point in doing this if the AI can muster enough units to take a city in one turn. Preferably the AI should search for easy targets once the fleet is getting close to the enemy coast, and if none can be found; land the units on terrain with good defense bonus and have them wait for reinforcements. Not to mention that the invasion army should contain enough defensive units to defend a city once it's been taken.

Huge armies should also bring settlers/engineers that can build fortresses where the army can defend itself. The AI would be able to tell how long it will take for reinforcements to arrive, and how long it'll take to build a fortress; if there is enough time to build it, it's worth the effort. The AI should never build fortresses in its own territory though, unless it's needed for AI units who are fortified to defend from invaders. In such cases fortresses should be torn down by that unit as it leaves for more important duties. Or, as an alternative, have it automatically torn down a set number of turns after its last defender has left.

RGE - if only I found programming to be fun
RGE is offline  
Old April 19, 2001, 06:17   #45
Simpson II
Prince
 
Simpson II's Avatar
 
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Jul 2000
Location: varies
Posts: 588
Ralf,

Eh, I don't think the problem with settlers is the pathfinding. Pathfinding is actually pretty good in Smac, probably a basic A* algorithm. The problem with settling in Civ is that it's done basically at random. The problem with settling Smac is that it isn't. The AI sends pods 30 or 40 tiles to build on a landmark, which is kinda dumb, even with it's native-life combat bonus. And it's entirely the fault of dumb programming, not fundamental AI limitations.

Mostly, what needs to be done in CivIII is to fix bone-headed decisions like the above, which are made simply because the programmers are not terribly great strategy gamers.
Simpson II is offline  
Old April 19, 2001, 13:55   #46
Ralf
King
 
Ralf's Avatar
 
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Sweden
Posts: 1,728
quote:

Originally posted by Simpson II on 04-19-2001 06:17 AM
Mostly, what needs to be done in CivIII is to fix bone-headed decisions like the above, which are made simply because the programmers are not terribly great strategy gamers.


I think you have a totally different playingstyle, then I have. This is why we have such different viewpoints on the importance of a better AI-city placement strategy & pathfinding, then in Civ-2/SMAC.

Consider this:

On two identical big-sized twin-islands far away from each other, with a good perfectionist/expansionist style human civ-player on one island, and one AI-civ on the other island; the human player near the end-game, is most likely to...

- have 95%+ of all available good fertile tiles under some city-area influence.
- have some deliberate city-area overlapping in order to maximize number of cities on a given island-area.
- have as many coastal cities as possible in order to maximize the number of potential inland tiles left to be exploited by inland cities.
- always avoid or have as few unproductive/less productive tiles, as much as possible.

The alone AI-civ one the other identical island however, is likely to have...

- only 50-70% of all available good fertile tiles under some city-area influence.
- either too much overlapping, or AI-cities too far appart with too many wasted tiles between city-areas.
- rather few coastal cities, with less potential inland cities left as a consequence.
- less efficient distinction between productive and unproductive terrain-tiles.

Now, since the ICS-problem is going to be combated in Civ-3 by some rather expansion-restrictive methods compared to Civ-2 (empires above 50+ cities perhaps not practically possible - read my last reply in Poll 20: Settler vs Public works), its pretty important that Firaxis do some radical AI pathfinding/ city-placement improvement in Civ-3, compared with the weak one in Civ-2 and SMAC.

By the way, have you actually read this thread in its whole, and perhaps Should the map-generator be scrapped? link before you answered? Its not that you must, of course. I was just wondering.

[This message has been edited by Ralf (edited April 21, 2001).]
Ralf is offline  
Old April 19, 2001, 14:50   #47
SerapisIV
King
 
SerapisIV's Avatar
 
Local Time: 19:54
Local Date: October 30, 2010
Join Date: Feb 2001
Location: Hartford, CT, USA
Posts: 1,501
quote:

Originally posted by Simpson II on 04-19-2001 06:17 AM
Mostly, what needs to be done in CivIII is to fix bone-headed decisions like the above, which are made simply because the programmers are not terribly great strategy gamers.


Thats a pretty harsh statement, one that I totally disagree with. If you spend years of your life programming civ-style games, you're gonna be pretty good at playing them as well. And while you ***** about the programming, lets keep in mind that the Civ series has had the best balanced and AI of any similar game, I don't see many people lauding the CTP programmers. Programming isn't gonna be perfect, buy the very existence of deadlines, it would be impossible to be perfect. If you think that programmers aren't good strategy players and that you are, go ahead and program your own AI. If you can do better then you can talk $hit, but until we see some of you AI programming, I wouldn't start the OT name-calling crap in here. Especally with people we're relying to get out a good product for our benefit.
SerapisIV is offline  
Old April 19, 2001, 23:36   #48
ChrisShaffer
Prince
 
ChrisShaffer's Avatar
 
Local Time: 18:54
Local Date: October 30, 2010
Join Date: Aug 1999
Location: Iowa City, Iowa, United States of America
Posts: 359
quote:

If you think that programmers aren't good strategy players and that you are, go ahead and program your own AI. If you can do better then you can talk $hit, but until we see some of you AI programming, I wouldn't start the OT name-calling crap in here.


While I agree that name-calling is in poor taste, it's an unfortunate fact that all previous Civ (and variant) games have not allowed players to design an AI. I, for one, would be thrilled to see Firaxis make the AI code open source, or at least let us have more access to the fundamental building blocks of AI thinking. Until Firaxis gives us this capability, suggestions like "go ahead and program your own AI" are pretty meaningless.
ChrisShaffer is offline  
Old April 20, 2001, 08:52   #49
Simpson II
Prince
 
Simpson II's Avatar
 
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Jul 2000
Location: varies
Posts: 588
Well, sorry all, I didn't realize that The Sacred Ones were to be held in The Highest Reverence on pain of eternal flaming. I'm not totally sure how calling someone 'not a terribly great strategy gamer' became name-calling, either, though if anyone was offended by it then I'll certainly apologize to them.

On the other hand, I don't believe that I said anything basically incorrect. Unlike me, the Civ/Smac programmers have the tremendous strategy gaming disadvantage of being people with lives. My fairly extensive observation of the Smac AI (from creating factions, and watching how they perform) has shown problems with the AI which no good Civ-player would ever have induced; behaviour which actually must have taken trouble to program, but which is plain wrong. That's aside from things which could have ben programmed easily in a couple of days, but which would have made the AI far stronger.

I have programmed AI, to a limited extent; I have an ongoing project on a chess AI, and I've done a strategic AI for Age of Kings that is not too bad given the limitations of the tactical AI (it whumps the standard AI hard, as well as the tournament-winning custom AIs which I've tested it against. ) If I ever get my hands on the code for civ or smac (probably vain hope) I'll definitely have a bash at creating a decent AI. I may even do some work on FreeeCiv when I get Linux installed again, though more likely it'll be whenever the C++ version is done. The FreeCiv AI is supposedly quite good at the moment, though, since they taught it to ICS effectively, do proper marine assaults etc.

Ralf,

Yeah, I had read pretty much all of both threads. I totally agree with what you say about what the AI does, and what a decent human player will do in civ. In fact I'd say you're pretty generous towards the AI. We just disagree - in a small part - about why it happens, whether pathfinding is at fault.
In civ the pathfinding was, frankly, terrible; somehow I doubt they looked at any texts on the problem, it must be some sort of homebrew algorithm. However, in Smac pathfinding is actually very good The AI finds it's way around quite effectively (a bit too effectively, but giving it the map does make things a lot easier for the AI programmers, so what the hell.) The issue is the choices it makes in city placement. There are two problems which I can see;

1) Locations are selected (semi-at random?) according to how attractive they are, but not enough attention is payed to their distance from the place they're produced. In reality it's virtually always better to place cities close to the place the settler was produced.
2) City placement appears to be decided on a unit-by-unit level. For a laugh, play a game where all city governors are on and all units are automated as they are produced. What happens is virtually indistinguishable from the AI's behaviour! I strongly suspect that, in large part, that is the AI.

So, overall, pathfinding for settlers is a small to non-existant part of the issue for Civ3.

Your ideas would certainly fix the problems above. An overall city-placement routine which directs settlers to an appropriate spot should fix it, too, IMO. It wouldn't be too complex. Placing cities in a grid or holey grid is close enough to optimal to compete with almost all players. In fact, in Smac it pretty much was optimal! It would, in principle, still allow pre-made maps with AI city-locations mapped out, while still functioning on random maps.

Edit: for an ultra-simple expansion strategy which beats the CivII AI's, go here. If you haven't heard the news then you definitely need to!
[This message has been edited by Simpson II (edited April 20, 2001).]
Simpson II is offline  
Old April 20, 2001, 15:59   #50
ChrisShaffer
Prince
 
ChrisShaffer's Avatar
 
Local Time: 18:54
Local Date: October 30, 2010
Join Date: Aug 1999
Location: Iowa City, Iowa, United States of America
Posts: 359
quote:

I'm not totally sure how calling someone 'not a terribly great strategy gamer' became name-calling


I think people were reacting to the use of the term 'bone-headed', actually.
ChrisShaffer is offline  
Old April 21, 2001, 05:24   #51
Ralf
King
 
Ralf's Avatar
 
Local Time: 01:54
Local Date: October 31, 2010
Join Date: Mar 2000
Location: Sweden
Posts: 1,728
quote:

Originally posted by Simpson II on 04-20-2001 08:52 AM
Your ideas would certainly fix the problems above.


Thanks! Finally I get at least some recognition for my ideas. With few exceptions, I mostly been fighting an uphill struggle when it comes to getting people to understand the need for premade user-tweakable AI-build lists, and also the need for a revamped AI-city placement methods, with all potential AI-city placements already invisibly layed out (like yet unlit red diodes that punctures a electric standalone touristmap - you know; the kind that you can find on most big city railwaystations), in conjunction with the map-generation.

On which potential/invisible AI-city location (or unlit red diode) each AI-civ chooses to build its first capitol city, may very well be totally random as long as the starting-locations are reasonably far away from each other. Also, in which direction each AI-civ chooses to expand may also be random, or then they start to get contact with each other; according to varying non-foreseeable in-game factors.
It is however, then Civ-3 scenario-creators starts to make use of potential AI-city placements on their own maps, that this idea really showes off its advantages. Suddenly the Civ-playing scenario-creator gets a whole new time-dimension under his fingertips. Not only can he now exactly pin-point ideal potential AI-city locations (and distances between them): But he can also determing how each AI-Civ should expand into map-sections thats not yet uncovered in the beginning of the scenario - if they want to have that control, of course.

Imagine the scenario-creating possibilities that this idea can create.

quote:

An overall city-placement routine which directs settlers to an appropriate spot should fix it, too, IMO. It wouldn't be too complex. Placing cities in a grid or holey grid is close enough to optimal to compete with almost all players. In fact, in Smac it pretty much was optimal! It would, in principle, still allow pre-made maps with AI city-locations mapped out, while still functioning on random maps.


Well, it all comes down how much work the AI-programmers at Firaxis are willing to put into it, of course. As long as it good enough to compete with most players. But, I still think they should do something drastic about those disadvantageous figures in my previous post.
And Civ-3 is pretty AI-demanding as it is, so the more map-analysing and AI-city placements calculation that they can squeeze in in conjunction with each map-generation, instead of between turns - the better it is.

[This message has been edited by Ralf (edited April 21, 2001).]
Ralf is offline  
Old April 22, 2001, 23:30   #52
Radagast
Chieftain
 
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Apr 2001
Posts: 90
If this has already been mentioned in the thread, let me know and I'll go back and read the relevant sections....i skimmed it but haven't read every post or word.

A lot of the time when people talk about better AI, they seem to mean "smarter AI" (e.g. "Napolean-like tactical brilliance"). However, I do not see that this is necessarily an improvement. My problem with AI in strategy games is not that it makes BAD moves, but that it makes PREDICTABLE moves (of course, some of the bad moves are a result of a formula that doesn't fit well with an odd situation). But what I relish about playing human opponents is not only their technical and tactical ability, but their quirkiness and occasional howlers. There is nothing so satisfying as waiting for your opponent (especially a good one) to make a mistake, and then dissecting him/her along that fault line. Of course, the same happens to you too . Someone early on said in this thread that what makes humans different from AI is that we have a bird's-eye method of sorting options in which we exclude (possibly not even consider) hundreds of untenable or bad options. Of course, the flip side is that each person has a slightly different birds-eye view, and LOOKS for slightly different salient features/information upon which decisions will be made.
The problem with AI is that often it seems that (especially when one is winning) the game devolves into a sort of war of attrition, where the human player figures out what area to ever-so-slightly outpace the AI in, then (programmitcally) build that strength up and slowly wear the AI down. But wouldn't it be fun if the computer switched strategies, made a stupid mistake, or just did ANYTHING a little odd now and again? Of course, oddness cannot be programmed by its very nature, but maybe mimicked? A few suggestions/questions:

1. Is it possible to set up an AI that will (a) weight certain factors over others, maybe not the BEST factors, but just certain ones, and that (b) from time to time changes its selection of important factors (quite possibly based upon earlier successes/failures). I am NOT suggesting a "learning AI", but rather one with several (10? 50?) "personalities" that will weight different things differently. Failure or success (relative to the AI's opponent(s)) can be checked, and then, if the AI player is doing poorly, a different strategy can be chosen. E.g. if the AI player is falling behind, and is ESPECIALLy far behind in research, a new "personality" could be chosen that weights research and tech possibilities/opportunities, and pays less attention to production. Of course, there is nothing like success to make us complacent, and a successul personality would more likely remain at the helm (of course, this would mean that the burgeoning empire, which got ahead in, say, research, would keep getting further ahead; a good thing, but as human players find the weak spots ignored in the quest for technology, the once mighty empire could (maybe) be cut down by its Achilles' heel). Maybe instead of relative strength, switches or modifications to personality could be tied to relative growth (a weak, but rapidly growing AI player, should continue with the same personality, b/c if growing more rapidly than humans, it should be able to catch up soon). This would go some way toward a more malleable opponent, one that changes in unpredictable ways as the game goes on. Even an occasional personality-switch by a large opponent (a low-prob event) would be interesting---even if random. Consider: you're being mercilessly attacked by a superior player, and they are getting close. All of the sudden, the attack stops, they ask for peace. Granted, the AI may have done this randomly, and without real reason, but it could mimic the human player (ever chatted after a game with a human and said, "you could have destroyed me if you'd have just gone a step further," and they slap themselves, saying something like, "i thought you had a MUCH bigger force stored up at your base...." "nope, I had ONE unit.." "DOHHHHH!!"

Radagast is offline  
Old April 22, 2001, 23:42   #53
Radagast
Chieftain
 
Local Time: 00:54
Local Date: October 31, 2010
Join Date: Apr 2001
Posts: 90
oops, hit send by accident. so i'll take it as a sign and finish up:

My main point: while the AI in the above example did not THINK you had a bigger force, or have any reason for stopping the attack, it LOOKED like it thought it did. Of course, this is still deficient (if it happened to me against a real human, i might be able to figure out his/her mistake and milk the deception for all it was worth).

Another way of saying this: there is no way to program the AI for a BEST strategy, since there are no best strategies. Many people THINK they have the "best," and act like it (and are often taught otherwise), but if there was one best strategy algorithmically speaking, then in any argument, one could make a demonstrative argument for it. Then the game wouldn't be much fun anymore, since eveyone would just follow it.

Of course, I know snot about AI, so something like the above is probably either impossible or has already been done.

One last bit: how about a modular central AI program, that would allow small patches at later dates? The idea being that as players discover good strategies (either in SP or MP games) that were not anticipated in the design stage, the designers could update the AI to include these:

Player on forum: "Hey! lookie what I discovered I can do with this lowly engineer!! Who'd have thunk it?"

Sid and friends: "Hmmmmm, maybe we should have the AI do that too...."

Dominant strategies in strategy games often evolve (read back through BBS!), so why not let the AI reflect it?

Of course, a great idea IMHO, but the main problem is that there is little incentive for producing such new AI modules (unless the central program was designed so that the modules could be relatively small, and then maybe sold over the net for low-cost ($5? $9.99?).
Radagast is offline  
Old April 27, 2001, 00:54   #54
Urban Ranger
NationStatesApolyton Storywriters' GuildNever Ending Stories
Deity
 
Urban Ranger's Avatar
 
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
Sure, it's entirely possible to do that, but the programming must be done in a completely different way.

Right now, the AI are hardwired into the game. Programmers play the game a bit, find out how to do things, and code the AI accordingly. This is a very dumb way of approaching it.

First, the AI should be heuristic, i.e., it learns from past mistakes. That way, it becomes stronger as more and more games are played.

Second, there is no need to hardwire the AI. Once the programming is done, just play against the AI many many times so it starts learning.

Third, playing style and difficulty level can be adjusted by modifying parameters.

Forth, conditions can be added to trigger scripts. This is done to a) further differentiate playing styles b) allow for user tweaking c) allow for easy AI updates.
Urban Ranger is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 20:54.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team