How does the AI play?

Kallikrates

Prince
Joined
May 30, 2012
Messages
480
Location
VRBS ANSEATICA
I know that there are threads on the Leaders, Diplomacy and especially theire likelihood to declare war. Also some tech preferences.
But some things I am not so sure about, e.g. how do the AI treat each other, how hard-coded are their "win" (or lose)-Strategies?

- Religious nuts: Some seem to be hard-coded to try all the religions they can get, even if they have already one or two, they will go for another. In a current Immortal game I am playing, Brennus founded 4 or 5, built missionaries and actively spread at leas the two earlier ones (Hindu and Judaism) to most of my cities (Thank you, and I will get your shrine at some stage as well...)

- Wonder-whores. Just that I don't get them. But are they planning a culture victory? I think some AI do, but it is probably not correlated to wonders.

- warmongers. We all know them. But I wonder if they are as aggressive to the other AI as they are to the human player. And do they really try for domination? (I don't think so)

- techers. Probably will try for a space victory, but often lack the # of cities of infra. Or get swallowed by some warmonger.

- what about the diplo victories? I have been duped when trying this, because I didn't know how friendly they have to be to vote for me and in some rare cases someone else won. And it seems that AI relations tend to be better among themselves (not only religious love-fests). They will pursue the respective wonders (to deny them to the human), but do they pursue the victory?

-suicidals. In some situations the AI behaves cowardly, in others they will attack with rather pitiful stacks or declare out of spite, even if the human is more powerful and they do not have a chance to gain anything from that war. Do they act like that among each other as well? I have the impression that this is mostly to make it more annoying for the human. Also vassaling seems to go much faster among the AI, does it?

I also wonder whether all AI play under the same conditions. Do the unit-spammers or wonder whores get special discounts or do they have to save the hammers/money somewhere else? Where?
 
Hey, I can help on the suicidals...in my current game, Washington, who was second from bottom on score list, DOW Ghandi, who was currently in third place. Nothing much happened, as they were an ocean apart from each other, but after a while, Washington became Ghandi's vassal. I dont know why ole' George DOW'd, didnt make sense at the time, as he was safe on an island all by himself.

Sorry, cant help on the rest.
 
'Ole GW can declare if you refuse even one of his demands. Ghandi probably did that, GW sent a few units over that got killed, and Ghandi could vassalize him. Stupid AI.
 
The factors that make define an AIs nature are found in the leaderhead XML tags and values, if you've read articles on diplo and war you may have heard of some such as Maxwarrand, peaceweight, NoWarAttitudeProb, but there are loads of them, even how likely they are to contact you for a trade is defined here.

The odds (yes odds, building choice is random) of an AI building a wonder are dictated in part by <iWonderConstructRand>, which differs across AIs, but are boosted if an AI is in the culture strategies.
Kallikrates said:
- warmongers. We all know them. But I wonder if they are as aggressive to the other AI as they are to the human player. And do they really try for domination? (I don't think so)
Peaceweights have a major impact on AI-AI relations, AIs with high peace weights (Gandhi, Mansa the wimp crowd mostly) tend to be hated by those with low peace weights (Shaka, Monty types) which usually leads to the wimps getting targetted and killed. The big anomoly however is Sitting Bull, who has a high peace weight with a decent unitbuildprob (builds a lot of units) and is Protective, so ingame he acts as a lightening rod for warmongers thats extremely hard to move which often makes games with him in easier as it causes a lot of waste in AI resources.

There is no specific strategy or serious conditions made for an AI to target domination. Though there are a few little things that may help it a little, such as an auto refusal of peacebribes when they are 2.5 times bigger than you in land (so big its almost pointless having it!), and a slightly higher chance of declaring war when nearing the dom threshold.
Kallikrates said:
- Religious nuts: Some seem to be hard-coded to try all the religions they can get, even if they have already one or two, they will go for another. In a current Immortal game I am playing, Brennus founded 4 or 5, built missionaries and actively spread at leas the two earlier ones (Hindu and Judaism) to most of my cities (Thank you, and I will get your shrine at some stage as well...)
This is tied up in flavours and strategies so,

A major part of how AIs make decisions are AI flavors, its a term you have likely seen but may have attributed to being descriptions of AI tendencies, but actually they are valued weights used in a lot of (usually) part-random decisions. Here for example are Hattie's flavours
Spoiler :
Code:
			<Flavors>
				<Flavor>
					<FlavorType>FLAVOR_RELIGION</FlavorType>
					<iFlavor>2</iFlavor>
				</Flavor>
				<Flavor>
					<FlavorType>FLAVOR_CULTURE</FlavorType>
					<iFlavor>5</iFlavor>
				</Flavor>
			</Flavors>[/QUOTE][/SPOILER] They are weights used alongside random numbers to decide what to build, research and strategies to pursue. There are a few different ones, Military, Religion, Expansion, Production, Culture, but I haven't looked into them much so don't know them all. AIs normally have two, usually with values 5 and 2, but some only have one. Some unsuprising examples would be Shaka has just Military and a value of 10 for it, while Gandhi has 10 in culture.

Which brings me on to AI strategies.
These are found in the C++ and set out a bunch of modifiers and conditions an AI will follow when in specific strategy, i.e. AI_STRATEGY_MISSIONARY causes odds of building missionaries to go up and blocks AI_STRATEGY_DAGGER which is a sudden DoW without preparation time.
Strategies also contain the only true AI plan to win which is culture having multiple culture strategies that it proceeds through (basically to allow different behaviours at different times in the culture run).
War plans (current and future) cause WHEOOHRN, an increase in chance to build units and will give weights on the types of units created.
DanF5771 made an [URL="http://forums.civfanatics.com/showpost.php?p=7223693&postcount=100"]enlightening post[/URL] on strategies in [URL="forums.civfanatics.com/showthread.php?p=7223693"]"Is there any logic in AI War DoW?"[/URL] though for obvious reasons its centered around war, specifically DAGGER.[QUOTE=Kallikrates]- what about the diplo victories? I have been duped when trying this, because I didn't know how friendly they have to be to vote for me and in some rare cases someone else won. And it seems that AI relations tend to be better among themselves (not only religious love-fests). They will pursue the respective wonders (to deny them to the human), but do they pursue the victory?[/QUOTE] Again no strategy here, the resolutions they pick are random and I don't think they have any weightings leading to situations where they put up a peace resolution after declaring war on you 5 turns ago :lol:

The true values for AI-AI relations are difficult to gauge as AIs of similar peace weights get a bonus which can be quite sizeable.[QUOTE=Kallikrates]-suicidals. In some situations the AI behaves cowardly, in others they will attack with rather pitiful stacks or declare out of spite, even if the human is more powerful and they do not have a chance to gain anything from that war. Do they act like that among each other as well? I have the impression that this is mostly to make it more annoying for the human. Also vassaling seems to go much faster among the AI, does it?[/QUOTE] War declaration decisions are random with weights that change from AI to AI and in different situations theres no bias between AI and player. In the cae of units suiciding into stronger defenders then its randomly driven weighted by the AIs courage.
[QUOTE]I also wonder whether all AI play under the same conditions. Do the unit-spammers or wonder whores get special discounts or do they have to save the hammers/money somewhere else? Where?[/QUOTE] Same rules between AI, but some of the rules are lolworthy.

One particulary infuriating one is how the AI trade resources between themselves. One contacts the other offering a resource, the other counteroffers a random resource and the intitiating AI accepts if its of equal or great value (the one counterprorposing cannot refuse!)...... 
I'm sure you've been the victim of that bit of lunacy before, so I don't need to describe what it leads to :lol:

....and while I haven't looked into it I have a bad feeling that tech trades may work in a similar fashion....
 
Kallikrates said:
- Religious nuts: Some seem to be hard-coded to try all the religions they can get, even if they have already one or two, they will go for another. In a current Immortal game I am playing, Brennus founded 4 or 5, built missionaries and actively spread at leas the two earlier ones (Hindu and Judaism) to most of my cities (Thank you, and I will get your shrine at some stage as well...)
Oh yeah, the Tacky-Mango investigated AI missionary behaviours here.
 
I'll offer some incomplete information, hope it helps -

Cultural (re wonders, and religions):
* It's possible that there are AI rules for beginning a culture strategy part way through the game (perhaps if they conquer a civ that was going culture?) but last time I checked, AIs make a major/important decision about whether they'll take a shot at going cultural on turn 1, based on their personality and a random number - actually, a number computed from the coordinates of their capital, which was a hack to make that information store-able in saved games.
* By mid-game, 3+ religions spread to every city is a reliable indication of when an AI is going cultural.
* This might be off-topic, but an important thing to know is that AIs will abandon the culture strategy if they lose their capital (I believe it's precisely, if their palace is in a different location). So capturing their capital is an effective way to stop them, even (I think) if they get it back.

AI-AI vs. AI-human:
* the invisible peace/war personality sliders are significant for AI-AI relations, as was described.
* Another important thing that's different is, you know how you look at an AI's attitude about you and see +2 this, -3 that? When an AI looks at a human player, they don't get the information. So they make requests/demands of human players as a way, the best way they can, of sussing out how the human "feels" about them - or at least, how far the human is willing to go to help them. They rarely (I think never, actually) make requests or demands of other AIs.

Suicides:
* I don't have much insight into how suicide stacks relate to AI strategy decisions. But I can tell you that war decisions are based on a variety of factors including the AI's attitude toward its target and army size. And one thing that's different with humans, in practice, on high levels, is that the human will usually have a small army.
* If you're interested in seeing AIs that do less suiciding on cities, you can try either K-Mod, or Fall from Heaven with More Naval AI, (or maybe the latest Better AI, not sure, and maybe others.) I don't know much about K-Mod but I know do that the AIs will, for example, choke other players with warriors or archers if they think they can. It's more like multiplayer and it's potentially annoying depending what you like and what level you play it on. In FFH MNAI the AIs are psychotic, but are pretty good (not perfect) at calculating whether a stack attack or city attack would be suicidal and choosing not to do it if it is. The odd thing about the way that AI behaves right now is that it's not actually very good or aggressive about choking or pillaging - sometimes it does it, sometimes not - so sometimes it just parks a big stack by your city, kind of choking you, but basically not doing much. So anyway, if you're interested in seeing that, you can check those out. My main point with this is kind of to say that, having seen other AIs, I think maybe I personally prefer an AI that will suicide stacks on your cities, even though it's "dumb". (There might be other designs that I'd enjoy more, but I haven't seen them.)

Domination -
* AIs can go for domination but they're not great at it, and my experience is that in practice they tend to win space or "diplonation" (victory by UN vote, with the help of prior conquest) before they achieve the domination condition, both of which are conditions that they can win without explicitly trying for them, just by making unplanned decisions every turn and being successful. I have seen AIs win domination, but very rarely (granted, the "sample" of games I've seen is very biased by me abandoning games that are going badly for me long before the AIs win any victory condition.)
 
Better than Civ V. Ironically, that isn't really saying much, but at least IV hides it a bit better.
 
Thanks a lot for all the enlightening comments so far! I might get back with some more specific questions later, but it has been very interesting and helpful.
 
Top Bottom