How AI should improve

rcoutme

Emperor
Joined
Jan 3, 2004
Messages
1,792
Location
Massachusetts
Ok, here is the million dollar question: how to improve the AI (from the programmer's perspective). Since I am not at the level of many of you (I do not play at Sid/Deity level) I will only be giving guesses as to what will improve the AI.

Note: When adding to this thread, try to remember that the AI is not going to be thinking about the entire situation too easily (this would require algorithms that are way too large).

My thoughts:
1. The AI should try to send workers further away than the nearest city when combat troops approach.
2. The AI should actively seek peace when their civ loses several cities and the enemy still has a force capable of taking more.
3. The AI should not be willing to give away cities that they establish nearly as easily (perhaps the chance of these cities culture flipping could be greatly increased, i.e. since you have no military units in them the chance is increased by 200%. This would cause the player to rethink asking for every available city)
4. Different AI civs should favor different research paths. This might help them to catch players who have pulled way ahead in the research area (i.e. the AI civs could trade advances).
5. The AI should not continue wars indefinately against each other. This drains their resources and gives the player too much of an advantage. Instead, unless the conquest victory is the only victory, the AI should have a flag that watches the player. If the player is not at war, then the AI should assess the last 5-10 turns of a war and determine if one faction or the other is actually really gaining ground (capture of 10% of cities or more per 3 turns). If not, the parties involved should be actively seeking peace.

I'll try to add more later. Please add to my suggestions, as I am unlikely to have the best ones.

Edit: In order for a suggestion to work you will need to have the following: 1. A situation that the computer can identify (e.g. player is 3 techs ahead). 2. A tactic that the AI can implement (e.g. AI civs research along different paths and trade techs) 3. Reason why this could/should be done.
 
I think the AI shouldn't treat humans differently. Yes, I know that it would make the AI perform better, but I think it wouldn't be as fun. I absolutely hate it when AI gangs up against human player for no reason.

What comes to the AI, I have already suggested somewhere a point-system that would make it easy to change the parameters and the emphasis of different things the AI did. It would also allow some sort of learning (so that the AI didn't try the same unsuccessful trick five times a row) and even modding of AI, if someone wanted to do that. It would consist of giving different things different values, then emphasizing them. The AI would decide its action according to what points it gets. It is all fine and good for the AI to try to attack a city without defenders, but it should do it only if the city was close. You can easily destroy an AI-army when it races to your capital that you have deliberately left undefended ignoring everything else. If the AI valued an undefended city as 10 points, every turn it takes for the units to get there would divide the number: so four turns away city with no defence would be worth 2,5 points. The exact system should be of course thought carefully.

I think AI shouldn't attack you if it didn't get anything from you. If there are no resources it needs, or no good cities, it shouldn't attack.

The AI should think more of the benefits itself got from trade. It shouldn't value a tech by what YOU got from it so much as what IT got from it. This would allow more lux to lux trade. Only in certain situations it is important to think what you trade to others: for example you shouldn't trade gunpowder to your enemy five turns before you attacked it.

AI should NEVER settle during war near the civ it is at war with. It is absolutely ridiculous to see a settler with one defender trying to cross the 30 tiles of my land during a full-scale war. More workers for me!

In war-declaring, the distance of the two civs should be of greater value. Now why would a civ across a continent declare a war to me, then send its stacks across three civs to arrive in 40 turns? Why does the AI even begin such a war? It wouldn't have any use for my cities. AI should think more of the distance of the cities it built: it shouldn't build cities just everywhere. Hopefully cIV can solve this problem in general - to somehow restrict the size of empires without this aggrevating corruption model. Perhaps the civil wars should do this? Distant cities would break away from your civ. This is off-topic, though.

Well, these are some I came up with. Perhaps more later from me too.
 
Shyrramar, while I agree that the AI should not "gang up on the player", I also note that many of the AI strategies I suggested could be used if a single AI civ had the advantages as well. Thus, if the AI Zulu's were way ahead in the tech race, your French would be included in the algorithm for tech trading by the other AI's.

As for the attempt of the AI to attack undefended cities, I agree with you. in the format that I added (by edit) after your post, it would probably look like this:
1. The AI should value attacking undefended interior cities less.
2. Each turn it takes the AI to get to the city should cut the value of that city by half.
3. This helps to alleviate the exploitation by players of an unrealistic attack by the AI.

For the settler suggestion: The AI should never send a settler near enemy combat units unless the computer has calculated that the defensive units sent with the settler have >50% chance of defeating all enemy units within 5 movement points of the path the settle takes.
 
One more thing about the military tactics of AI. The AI should value more the disconnecting of your resources. When your only oil comes from an island, the AI should storm that island first (as I would most definately do). The AI should also decide the city it attacks more by thinking what it will benefit and what you will lose, not only by the defences. This way the AI wouldn't always attack my tundra-cities with one warrior defending them.

The AI should take into account distances better. It is already coded into the game (go-to tells the number of turns it takes for you to get there). The distance itself is not important, but the number of turns. This way the AI can adapt to your railroads (if the railroads are similar to civ3's RRs). There is actually no point whatsoever to attack an undefended city within an RR-network if you can't reach the city that turn. This should somehow be implemented. I am being careful here, as I assume the first reaction to any suggestions such as this is "too complicated". This was mostly the case in the AI-thread (which you should check out, rcoutme, if you haven't already)...
 
Hi!

Well there is a main "AI - BUG" of trading that can be extremly exploited:

You want some new techs.
You have money and luxuries.

You trade with an AI-nation:

He should give Techs in exchange for Luxuries and GPT and Lump Sum.

After You agreed, you start annoying him with:

"Send Your troops home or declare war."

If he is not polite or so he will declare war after 3 or 4 tries.
Big business, eh?
He gave his techs for almost nothing(lump sum) and he is a
"pact-broker" and your war worriness is good.

Another trading suggestion:
If you fear that someone might attack you(BUT YOU ARE NOT SURE), trade money with him, like:

He gives You Lump sum=X.
You give him GPT=0,0625X(Total for 20 turns will be 1,25X).

So if he attacks you early you will have his money.
Only after the 16th turn will this business be negative, so the AI is obligated to not brake the pact. Well there is a bug that sometimes, let's say, after 4-5 turns, he will declare war on you.
Who knows why????

One more thing:
Why doesn't the AI accept 101 gold for 100?
And sometimes even worse.
Once I offered 100 golds for 1.

These are LUMP SUMs.

That's all.
 
A couple of things

The AI should do better at nonlethal forms of combat, learning to CONCENTRATE their powers better. They seem to keep a few artys inside different cities, which I think doesn't hlep too much. They should put them in their front lines, and bombard the hell out of you (like we do to them).

Another thing the AI does that isn't too bright. After a strong initial attack, if it fails, it keeps on sending small groups which are easily destroyed.

I think in general, the AI isn't too bad. The biggest things I believe it doesn't do well are these two points. If it did, then I wouldn't almost always destroy them if I make it in decent shape to replacable parts.
 
The AI should at least take a look at the world situation before joining MA pacts.

Take my latest game for example. There are 2 major powers on this one land mass (Aztecs and Incas). I (Hitties) am first and have the strongest military and tech. (Second in land size). I have a sizeable presence on the continent although my main production cities are a short 3 tiles away via sea. My cities on this continent are poised like a dagger over the Netherlands. I am at war with the Incas and Aztecs. The Aztecs are also at war with the Incas. (fun). Anyway, the Netherlands and I are in a MA against the Ottomans who are located far away and neiter of us are too concerened. Anyway, the Neterhlands enters a MA with the Aztec aganst me. Makes sense for teh Aztecs because I can not move against them until I deal with the Dutch. Stupid for the dutch because they are now toast. Helped my WW a little though :)
 
the ai shouldnt make war when you refuse to give them 30 gold. especially when you have an equal or better military. in a recent game, the zulu (half a world away on pangea) who were far behind in techs demanded music theory. being completely unafraid, i naturally refused. several turns later, their army, which had apparently been marching across russia prior to making the demands, showed up on the outskirts of my nation. needless to say i was quaking in my boots when i saw the mighty zulu forces consisted of maybe 10 archers and a few impi warriors. after witnessing their military get slaughtered by some medieval infantry and leftover ancient cavalry, they quickly signed a peace treaty. its stupid and irritating when this happens.

also, in this same game, the zulu some how tricked the romans to enter an alliance against me. using my same ancient cavalry and med. infantry forces i took one of their cities on my border and then signed a peace treaty that got me 100 gold. so basically the romans lost a city and 100 gold (i dont know what the zulu gave them, but they didnt have any money and werent much more advanced (if at all) all because they made an alliance with the zulu, who decided to 'teach me a lesson in humility' with their archers because i wouldnt give them music theory. clearly something is wrong with the ai's logic here.
 
Also you shouldn't be allowed to make the AI furious by demanding stuff, then asking them to leave territory (and thus have them declare war on you), just to get a WW bonus in Rep/Dem.
 
This thread is kind of far back but I had some more ideas:

Problem: the AI does not have any trouble seeing your submarines since they can 'see' all units on the map. This is done to enhance they poor combat stragegy.

Solution: disallow the AI to know where stealth units are, but still allow them to know where some (not all) of the other units are. Maybe give the AI a 10 square "seeing" zone so that they will not be too easily caught unprepared against a savvy human player.

Reason for change: I have played the C3C Scenario WWII Pacific and it is beyond frustrating to see AI artiller bombing my 'hidden' submarines!
:wallbash: :wallbash:
 
I get really perturbed when the AI does things that we human types can't. But then it becomes a game to figure a workaround or end run. But since someone asked...

On the subject of submarines, if the AI had different reasons why it couldn't move into a tile, such as 1-already occupied, 2-sea unit can't move onto land, 3-land can't move onto water, and 4-unknown reason! Foreign subs/stealth units would fall into the 4-unknown reason catagory.

Speaking of AI,and sharing of unfounded info with the game engine: The last game I played (72+ hrs, is that normal?) I was in a Right of passage with the Ottomans. I thought I'd try a different tact. When I saw one of his cities tile get polluuted, I moved one of my worker onto that tile as a squatter. The idea was to not let his workers on the tile to clean up the polution and deny him usage of that tile, but peacefully ;-). Much to my dismay the polution disappeared anyway. So either the AI must be psychic, telekinetic, or it could be another bug.
 
I think the AI should be given basic offensive strategies.

For instance say I'm playing the game and one of my AI neighbours decide that they are going to declare war on me, and uh oh their military forces out number me about 2 to 1 in total and about 4 to 1 in the general region. While fear not the AI's lame strategy of creating a slow moving stack of death will be my salvation. All I need to do is mass about 5 to 10 mobile units like cavalry while into two groups and take two AI cities while the AI is still slowly moving with their horde like stack of death towards my cities and I've taken at least two cities from them. One more and they'll be supseptable to a peace treaty, I take another city and they sign the deal.

To me this is extremely lame the AI should be able to have some sort of assesment ability Ie if their military advisor can say "we have a strong military compared to these guys" then they should keep their stack of death marching towards my cities and cause me some havoc. Also when mobility becomes a lot more important and combined arms become important the computer should use those strategies properly. Ie: Bombard my cities, resource or other strategic locations with their bombers, ships and artillery and then move fast moving tanks, cavalry or modern infantry towards them and try to take them. This might even work well if they build railroads towards their objectives and protect their workers with infantry or w/e otr strong def. units, like human players do.

Finally the AI needs to learn how to do a proper naval invasion.
 
1. The AI should have some way to assess every situation it gets into with other players (so assign number values to certain situations and assign ways to modify the numbers depending on the pros and cons of that certain situation).

Example: I have lots of money and heavy-shield-producing cities and have a few defensive units. They would therefore think I am easy to kill and may demand money from me, and if I don't pay would go to war. Of course, they should still analyze other things that could change the situation, such as me possessing railroads between most of my cities (which would mean I could quickly move all of my defensive units to the city/cities that they are going to attack). This would make them heavily modify the value of attacking me, and they would therefore decide not to attack me until they have a large amount of heavy offensive units and a large amount of artillery units.

2. The AI should have several pre-prepared military and diplomatic strategies for different situations.

Example: The AIs have noticed that a player is a warmonger and has recently taken over cities of nearby nations. So, the AIs that are nearby decide to instead of having normal plans, they build up their amounts of defensive units, move their workers to be in the interior of their empire, and fortify more of the defensive units not only in cities that are close to the warmonger, but also on the resources that are important to them, so that the warmonger can't, for example, destroy a road leading to the only oil/uranium/rubber possessed by their civ. Also, they would automatically try to sign MAs with as many civs as possible, and would focus primarily on those nearby the civ in danger or nearby the warmonger.
 
Top Bottom