 |
|  |
 |
|
Nikolai
|
 |
Bergen, Norway
Oct 2000 time: 06:32
|
|
Introduction
The AI. What often makes a computer game playable, if it's made properly. This is the place to read for finding ideas relating to this concept.
-List Threadmaster Nikolai
Summary
All in all, the thing people are most interested in, is a more "intelligent" AI. An AI that can defend itself, attack in a smart way, recognize a good deal when it sees it etc. People clearly thinks the AI isn't nearly as good as it should be.
Table of Contents
1 - AI madness
2 - Automation
3 - Treatment of civs
4 - AI performance
5 - Treatment of military matters
6 - Diplomacy
7 - Moddability
The ideas
1 - AI madness
1.1 Agessiveness
Too prone to AI maddness.
"EVERYONE DECLARE WAR ON PLAYER!
OK!"
"Everyone please declare war on Russia. Remember, Russia nukes all of your cities - Player.
Uh, no. How about we declare war on you instead? - AI" (Posted By Comrade Tassadar)
1.2 - No unit movement without a reason
One thing: the AI should NOT move its units all over the place for no reason. It's really completely silly to see the AI constantly move its stuff for no reason...
(Posted by Trifna
2 - Automation
2.1 - Units and cities
I want to be able to automate settlers to build cities in good spots without worrying about them, but I don't want those cities to automatically go on governor like in SMAC. I want automated land units and transports to work together, if they don't already.
(Posted By Brent)
3 - Treatment of civs
3.1 - Treat all civs alike
I really hope they make the AI stop treating the player differently from the other civs. It's the only thing that really bothered me in Civ3. It can't be that hard to code a proper AI, hire better programmers if you can't do it They did it in Galactic Civilizations (granted, it's a different game). For me it really breaks the mood of the game when you notice that the AI-civs gradually start giving you crappier deals even if it would hurt them more. And for no apparent reason. Theoretically, in the deity level, it shouldn't be too hard to code the AI to make "best possible" moves and give them a long term plan according to their civilization characteristics.
(Posted By KorvaKikkeli)
3.2 - Small civs vs big civs
Fear & domination. I find it wierd when a 2 city Civ right at my doorstep refuses my demands. The AI should be adjusted so that these weak Civs can be "controlled" & manipulated by larger one's without losing their independence.
(Posted by Strider_479)
4 - AI performance
4.1 - Overall AI performance
The AI should be able to handle every concept of the game with a decent skill
(Posted By TheBirdMan)
Make it better!
(Posted by skywalker)
4.2 - Adaptive AI
One idea I have seen being suggested is altering the AI's priorities, based on your actions.
For example; if start researching tech x each time you start and get it first because the AI never really was interested in it, it would change it's behaviour to start 'copying' your style and try to beat you at your own game. Therefore ruining your playing style and forcing you to change your game. (this will probably be more effective on higher levels then on, say chieftan but it a start)
(Posted by alva)
4.3 - Harder on higher levels
On a Diety, or whatever they decide to call the highest level, the AI should be able to beat me, the worst Civ player ever.
(Posted by POTUS)
4.4 - AI recognizing reasons to events
Give the AI the ability to recognize if events leading to deals with them getting canceled were out of your control or deliberately player-caused.
I'm tired of trading with one computer civ only to have some crazy war break out somewhere that disrupts my trade route with them. After this no other civs will trade with me; they're all "RAR WE REMEMBER WHAT YOU DID TO FRANCE WE'RE NOT DUMB SO WE'LL NEVER TRADE WITH YOU"
(Posted by ixnay)
4.5 - Multi-threaded AI
Perhaps that to consider a multi-threaded AI like in GalCiv would be a good idea. In the case of GalCiv, it permits an overall better AI.
(Posted by Trifna)
It makes a huge difference, and should DEFINATLY be done.
(Posted by Fosse)
5 - Treatment of military matters
5.1 - Military Decision Making
5.1.1 - Improve AI Military Decision Making
Improve the AI's military behavior by improving the methods to how it builds it's strategy.
(Posted by Shogun Gunner)
5.1.2 - Weighing Decision To Go To War
The AI civ should weigh all factors that humans consider before evening deciding to go to war: relative strength of civ versus targeted civ; probablity to get an ally to join the war; risk of being attacked by other civs; desire for luxury/critical resources; assessment of targeted civ's military; evaluation of geographical features/avenues for attack.
(Posted by Shogun Gunner)
5.1.3 - Picking Military Objectives
If the AI civ decides to go to war it should decide what the objectives are, picking several, and select one as the primary objective. A set of objectives could be: reduction of bordering civ's presence; obtaining a luxury/resource from targeted civ; willingness to call off hostilities if tech/gold/city is handed over; taking away a city with a Wonder.
(Posted by Shogun Gunner)
5.2 - Military Strategies
5.2.1 - Devising a Military Strategy
Before war is actually declared, a strategy should be devised to reach the primary objective. The AI should analyze the strength of the known defense, location of objectives and pick a set of units it will attack with. The set of units available would be all the civ's units MINUS the units kept for defense of borders/cities and battle plan devised using these units in a concentrated, orderly fashion. Additionally, the AI should determine what are acceptable losses and cease attacks when the has been exceeded.
(Posted by Shogun Gunner)
5.2.2 - Program Classic, Historical Military Strategies
The AI should be programmed with classic military strategy techniques. For example, if the targeted civ has a lot of units, setup a trap inside the civ's borders, move units out of the way, when enemy units enter the kill zone, attack and concentrate on destroying units. Another concept is a diversionary attack away from the real objectives, wait one/two turns, launch attack with massed forces towards real objective.
(Posted by Shogun Gunner)
5.2.3 - Evaluate Progress, Reassign Priorities, Modify Strategy
Every turn during war, the AI should re-evaluate the full series of considerations and adapt by readjusting priorities and/or strategies.
(Posted by Shogun Gunner)
5.2.4 - Fronts
Make the AI think in terms of "Fronts". So if its at war on three fronts, it first analyzes each position, says "I'm good here" or "Little help please" and the AI then distributes reinforcements, but the battle strategy is figured out on an individual front basis. This allows the AI to work much faster because the scope of its calculations is narrower.
(Posted by wrylachlan
5.2.5 - NOT fronts, but targets
This ruined the MoO3 AI. It tryed to spread its forces over many fronts, meaning it was never a real threat on any of them. The Ai should think TARGETS, not fronts. It should have a goal like : get Athens, and defend Rome with x troops. Simple.
(Posted by Jamski
5.3 - Employ Combined Arms
All unit types should be used to bring maximum force onto the enemy. If the AI has sealift capability, it should load troops to attack either as a diversionary attack, or the main attack WHILE a land attack is occuring. Paratroopers and other units with special abiliites should be used in concert.
(Posted by Shogun Gunner)
6 - Diplomacy
6.1 - AI always open to talk
I want the AI to ALWAYS be open to talks, even directly after a DoW. Of course the AI should accept peace if there's been no actual fighting, or if its clearly losing. If the AI declares war, you should be able to contact it straight away and ask "what do you want to call off your dogs?" Those times where the AI DoWs you out the blue and won't even talk until x cities have changed hands really makes me MAD!
(Posted by Jamski
6.2 - Ask for help when in war
If the AI is under attack by another AI, it should contact all civs, including the player, and ask for help. Depending on situation it could ask for trade embargo, cash, alliance etc.
(Posted by Jamski
6.3 Right of Passage treaties
If the AI wants to move through your territory all the time it should also want to PAY for a RoP agreement. As it is, it keeps wandering through, and then wants you to pay THEM for the RoP.
(Posted by Jamski
6.4 - Always negotiation before a DoW
Before declaring war the AI should always make a final demand.
"Give me Athens/Gunpowder/Furs or I WILL declare war"
You should be able to make a counter-offer
"How about instead of Athens I pay you 8gtp?"
Then the AI says, "hmm... offer a bit more and I'll leave you in peace"
(Posted by Jamski
6.5 - World War triggering
World-war triggering. The AI embarks on a world war if it "feels strong enough" (more than 25% of the worlds forces or something, adjusted by number of civs alive at the time) and attempts to take on everyone. It contacts all civs with the offer,
"Pay huge sum/cities/tech or join me in war against xyz, or I DoW you."
This results in either a killer AI, or at least a huge war with multiple civs on each side.
(Posted by Jamski
6.6 - New agreements
6.6.1 - Research pact
research pact. You and the AI civ agree to share all your research. If one civ has a better research rate, then the agreement is "worth more" to the one with the lesser tech rate, and they may offer additional trades (luxuries, money, troops)
(Posted by Jamski
6.6.2 - Favored trade partner
Favored trade partner. This gives you +1 gold in each town connected to the AI's cities, +2 in each city and +3 in each metropolis. The AI gets the same benefits. You can only have one trade partner at a time. It make that AI like you more, and makes other AIs dislike you more. Breaking the agreement lowers your reputation with all civs EXCEPT if you break it by signing the agreement with another civ, who then think you are great.
(Posted by Jamski
6.7 - Trading
6.7.1 - Restrict tech trading
Neither you or the AI can trade a tech in the turn you get it. This cuts down on tech whoring AND the "feature" if you trade a tech to the AI in its turn, it then trades it to all the other civs immediatly. Should slow the tech rate marginally.
(Posted by Jamski
6.7.2 - New trade
UNITS! Make all units except UU's tradeable just like workers are now. Mercenary units from another civ cost double gold or something to support. The units appear in you capital.
(Posted by Jamski
7 - Moddability
[b]7.1 - Rule based and moddable
I believe the AI should be rule-based, and importantly should moddable by the community.
(Posted by Merp
--------------------------------------------------------------------
Respectfully compiled - Nikolai
With special thanks to: Asmodean
Last edited by Nikolai on 11-08-2004 at 17:41
|
|
|  |
 |
|
Shogun Gunner

|
 |
Potomac Falls, Virginia
Oct 2000 time: 00:32
|
|
How can we improve the AI's abilities when it comes to warfare? Maybe this could be 4.2
Well it shouldn't be that hard....although improved in C3C, it is still mindboggling the decision making of the AI during warfare.
The AI military behavior has the appearance of being totally random:
- Attacking with one unit against a stack
- Attacking with a weakened unit, instead of regrouping and/or reinforcing.
- Why won't the AI build armies? That threat alone would change the human player's strategy.
- Not pressing advantage when it should
- Failing to devise a strategy. For example, the AI should think to itself: "Player 2 controls some land which strategically threatens my empire. I'm going to take cities A, B and C if I don't lose more than x units." or "I know that Player 3 has only one source of iron. I'm going to attack and control that resource. At the same time, I'm going to make an embargo against player 3 with civ 4 who has iron, so he can't trade for it"
- AI does a good job on defense in cities (that's easy), but lacks sophistication when guarding a perimeter. Does the AI build forts and barricades? Forts sometimes...barricades I haven't seen yet.
- Boy, does that AI love the cavalry charge. It just goes gangbusters when it has lots of that unit. How come it can't use it's air force well? How about the navy? It won't bombard your shore improvements, instead taking one or two shots at units in your city which just heal in one turn. That seems like an easy fix.
- Paratroopers? Yea, right. I've never seen the AI use this unit.
- Helicopters? Well we can't blame the AI here, I mean I never have used the helicopter -- what's it good for anyway?
- Proper use of alliances. As stated in the first post, the strategy here is maddening. Can greater sophistication be developed for AI player to set *reasonable* goals and plan/script some actions to achieve those goals?
|
|
|  |
 |
|
MrBaggins
|
|
adaptive solutions usually use a genetic system. You couldn't use a genetic system in a Civ game. It has irreducible complexity. The entity times choice space is too large to model for a static gene string.
|
|
|  |
 |
|
Shogun Gunner

|
 |
Potomac Falls, Virginia
Oct 2000 time: 00:32
|
|
Improve AI Military Decision Making
Improve the AI's military behavior by improving the methods to how it builds it's strategy.
Weighing Decision To Go To War
The AI civ should weigh all factors that humans consider before evening deciding to go to war: relative strength of civ versus targeted civ; probablity to get an ally to join the war; risk of being attacked by other civs; desire for luxury/critical resources; assessment of targeted civ's military; evaluation of geographical features/avenues for attack.
Picking Military Objectives
If the AI civ decides to go to war it should decide what the objectives are, picking several, and select one as the primary objective. A set of objectives could be: reduction of bordering civ's presence; obtaining a luxury/resource from targeted civ; willingness to call off hostilities if tech/gold/city is handed over; taking away a city with a Wonder.
Devising a Military Strategy
Before war is actually declared, a strategy should be devised to reach the primary objective. The AI should analyze the strength of the known defense, location of objectives and pick a set of units it will attack with. The set of units available would be all the civ's units MINUS the units kept for defense of borders/cities and battle plan devised using these units in a concentrated, orderly fashion. Additionally, the AI should determine what are acceptable losses and cease attacks when the has been exceeded.
Program Classic, Historical Military Strategies
The AI should be programmed with classic military strategy techniques. For example, if the targeted civ has a lot of units, setup a trap inside the civ's borders, move units out of the way, when enemy units enter the kill zone, attack and concentrate on destroying units. Another concept is a diversionary attack away from the real objectives, wait one/two turns, launch attack with massed forces towards real objective.
Employ Combined Arms
All unit types should be used to bring maximum force onto the enemy. If the AI has sealift capability, it should load troops to attack either as a diversionary attack, or the main attack WHILE a land attack is occuring. Paratroopers and other units with special abiliites should be used in concert.
Evaluate Progress, Reassign Priorities, Modify Strategy
Every turn during war, the AI should re-evaluate the full series of considerations and adapt by readjusting priorities and/or strategies.
|
|
|  |
 |
|
MrBaggins
|
|
Again goal-oriented models like this are great to consider, until you get to the point of valuation.
Its simple for an instant... within a certain turn, but when you start introducing time, and evolving situational data into the equation, you start getting problems. Its tricky to assign a value to whether you should build an army and attack to get, say 2 towns, or more beneficial to delay and build up your own cities.
This leads to a whole host of problems including determining reasonable target goals (with infinite possible goals, whats a reasonable army size to aim for and what are reasonable conquest/defense goals, for instance), solving indescision (illustrated in the quoted passage below) and understanding when and how to abort a goal.
"The Civ3 siege model builds an attack stack and sends it to rout a city. The weaker city. A player can cause it to keep changing its mind by ferrying."
Having said that... the concept of victory/strategic/tactical hierachy is probably the best "real" solution. No current AI designs "out there" have solved these issues. I know Clash is going this route, but is better structured this way. Its not solved all these issues yet, either, however.
Civ "decision space" is just to monumental to be able to "solve", completely.
So whats happening at the moment is more and more sophisticated heuristic designs.
CtP1 was interesting in its use of a fuzzy design. It however, used the fuzzy system with largely binary choices, and by all accounts, bad defuzzification, making it essentially heuristic, even if you could extend it yourself.
|
|
|  |
 |
|  |
 |
|
Jamski
|
 |
lol ED&D is officially full PvP LOL
May 2002 time: 05:32
|
|
Diplomacy AI :
I want the AI to ALWAYS be open to talks, even directly after a DoW. Of course the AI should accept peace if there's been no actual fighting, or if its clearly losing. If the AI declares war, you should be able to contact it straight away and ask "what do you want to call off your dogs?" Those times where the AI DoWs you out the blue and won't even talk until x cities have changed hands really makes me MAD!
If the AI is under attack by another AI, it should contact all civs, including the player, and ask for help. Depending on situation it could ask for trade embargo, cash, alliance etc.
If the AI wants to move through your territory all the time it should also want to PAY for a RoP agreement. As it is, it keeps wandering through, and then wants you to pay THEM for the RoP.
Before declaring war the AI should always make a final demand.
"Give me Athens/Gunpowder/Furs or I WILL declare war"
You should be able to make a counter-offer
"How about instead of Athens I pay you 8gtp?"
Then the AI says, "hmm... offer a bit more and I'll leave you in peace"
World-war triggering. The AI embarks on a world war if it "feels strong enough" (more than 25% of the worlds forces or something, adjusted by number of civs alive at the time) and attempts to take on everyone. It contacts all civs with the offer,
"Pay huge sum/cities/tech or join me in war against xyz, or I DoW you."
This results in either a killer AI, or at least a huge war with multiple civs on each side.
Restrict tech trading : Neither you or the AI can trade a tech in the turn you get it. This cuts down on tech whoring AND the "feature" if you trade a tech to the AI in its turn, it then trades it to all the other civs immediatly. Should slow the tech rate marginally.
New agreement : research pact. You and the AI civ agree to share all your research. If one civ has a better research rate, then the agreement is "worth more" to the one with the lesser tech rate, and they may offer additional trades (luxuries, money, troops)
New trade : UNITS! Make all units except UU's tradeable just like workers are now. Mercenary units from another civ cost double gold or something to support. The units appear in you capital.
New Agreement : Favored trade partner. This gives you +1 gold in each town connected to the AI's cities, +2 in each city and +3 in each metropolis. The AI gets the same benefits. You can only have one trade partner at a time. It make that AI like you more, and makes other AIs dislike you more. Breaking the agreement lowers your reputation with all civs EXCEPT if you break it by signing the agreement with another civ, who then think you are great.
-Jam
|
|
|  |
 |
|  |
 |
|
Trifna
|
 |
of anchovies
Jul 2001 time: 13:32
|
|
Perhaps that to consider a multi-threaded AI like in GalCiv would be a good idea. It apparently got good results for GalCiv, but I don't know technicals alot to say it's also good for Civ4. In the case of GalCiv, it permits an overall better AI.
Someone knows?
PS: I hardly know what a multi-threaded AI is technically, but it's one of the unique elements of GalCiv, helping the AI (which was praised by many).
Last edited by Trifna on 19-12-2003 at 14:44
|
|
|  |
 |
|
Fosse
|
|
U.S.A.
Mar 2002 time: 23:32
|
|
"multi threaded" just means that the AI is "thinking" while you are taking your turn.
It makes a huge difference, and should DEFINATLY be done.
|
|
|  |
 |
|
wrylachlan
|
|
Make the AI think in terms of "Fronts". So if its at war on three fronts, it first analyzes each position, says "I'm good here" or "Little help please" and the AI then distributes reinforcements, but the battle strategy is figured out on an individual front basis. This allows the AI to work much faster because the scope of its calculations is narrower.
|
|
|  |
 |
|
7EA
|
|
Denmark
Jul 2001 time: 06:32
|
|
quote: "multi threaded" just means that the AI is "thinking" while you are taking your turn. |
Does that mean that if I finish my turn fast the AI will make more stupid moves?
|
|
|  |
 |
|
Peter Triggs
|
|
Gone Fishin, Canada
Jan 2000 time: 05:32
|
|
quote:
Does that mean that if I finish my turn fast the AI will make more stupid moves?
|
Depends how many keys you can press per millisecond. (joke/response: groan)
But seriously, GalCiv originally came out in 1993 and even then had AI multithreading:
quote:
One characteristic of the early GalCiv was multithreaded AI (a technology possible even in early versions of OS/2), and the newest incarnation makes good use of it as well. While most strategic games have to do a terrific amount of number crunching to run the AI after you press “next turn”, GalCiv is uniquely different: the AI is running all the time in separate ‘threads’ in the background. In fact, GalCiv has been hailed as the first computer game to use Intel’s new hyperthreading to good effect. (Note: you don’t need a hyperthreaded processor to run the game, but if it’s available the multithreaded AI will take advantage of it to run even faster.) When you hit “next turn” - even in the later game stages on huge galaxies where hundreds of ships and planets are all doing their thing - it processes quickly, even with the meager minimum / recommended system requirements.
|
Multithreading is not restricted to AI, it's basic stuff. I suspect that what's at least as important with regard to GalCiv's AI is that it probably uses different techniques. (I'm only going on what I've read on the Net.) Here's an old interview with Brad Wardell where he talks about AI:
http://www.geocities.com/TimesSquar...v_wardell1.html
And here's a later (long) one where he talks about GalCiv's development (and also mentions AI):
http://www.gamespy.com/articles/may...civpostmortempc
edit: Update. Just got an e-mail from GameSpy who have named GalCiv as the PC turned based strategy game of the year:
http://www.gamespy.com/goty2003/pc/index13.shtml
Last edited by Peter Triggs on 20-12-2003 at 09:02
|
|
|  |
 |
|
Fosse
|
|
U.S.A.
Mar 2002 time: 23:32
|
|
quote: Originally posted by 7EA
Does that mean that if I finish my turn fast the AI will make more stupid moves? |
Possibly, but what it should mean is that if you take long turns then the AIs will already be finished, and have made better moves than with standard Civ-type AI. If you take short ones, you'd have to wait a little longer.
What it could mean is that the AI is able to be more complex, and make better decisions, without technically being faster, since it's thinking during the player turn.
|
|
|  |
All times are GMT. The time now is 05:32. Apolyton Time is 00:32. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|