Passive AI

The files deal with AI attitude modifiers (I hate you because of X) and their overall attitude bias (hostile, war, friendly, afraid, etc). There's also attitude biases towards citystates.
 
Hmmm.

I'm uneasy about the piecemeal introduction of AI.

How sure are we that it doesn't then skew our observations of other AI behaviour?
 
So I've been playing a game with the Celts (still working on it). King difficulty, standard map size, communitas map, 12 civs, 24 city states...

I increased the war flavor by 2 for each civ and increased their expansionism by 3 also. The more civs on the map combined with making them a bit more aggressive has been working out very well. I was attacked by Russia. They were angry with me for attacking a city state. I conquered one of their cities then made peace.

Then, I started to peacefully expand into some open land. The Mayans got angry with me for building too many cities too quickly and they launched a sneak attack on me. I had a spy in their capitol and knew it was coming. I then got an ally to declare war on them and beat back their initial invasion and ended up taking 2 of their cities, leaving them just their capitol city. It's late renaissance era now.

Wars take place about how they should now. It's not constant war. I even had 2 trade routes going with the Maya and they still attacked me. Their technology was ahead of me by a bit and they saw me as an easy target who had been angering them with my aggressive expansionism.

The game is 10 times more fun now with those simple changes:
1. Increase expansionism flavor by 3. (for each leader)
2. Increase war flavor by 2. (for each leader)
3. Add more AI civs and city states to the map to make it more crowded leading to earlier wars. The first war took place in the classical era (by me attacking a city state). Russia then attacked me in the early medieval era.


Anyone looking for a more aggressive AI (without making every AI a warmonger) and more enjoyable game I recommend trying those settings out.



BTW, here's the code added to the CEAI_End_Flavors.sql file (in the AI folder of the mod):

--Make AI more aggressive

UPDATE Leader_Flavors
SET Flavor = MIN(10, Flavor + 3)
WHERE FlavorType = 'FLAVOR_EXPANSION';

UPDATE Leader_MajorCivApproachBiases
SET Bias = MIN(10, Bias + 2)
WHERE MajorCivApproachType = 'MAJOR_CIV_APPROACH_WAR';

Add that to the top of the file. Then, add 50% more civilizations and city states to the standard map when setting up the game.
 
I should probably also modify the MINOR_CIV_APPROACH_WAR value as well to make them more aggressive towards city states too now that I think about it.
 
I should probably also modify the MINOR_CIV_APPROACH_WAR value as well to make them more aggressive towards city states too now that I think about it.

Yeah, definitely.

On that topic, have the rewards for conquering a city state been reintroduced yet?

Sounds about right though, but regarding the more civs, upping the numbers normally does a) push city states onto the islands/edges of the map... and b) hinder initial AI expansion.

Ideally, Civs wouldn't be equally distributed over the map (so larger areas for some civs) and they'd chose their strategy not on their leader flavours, but on the terrain available to them. Say Egypt sees that it starts in a "wide" area (= a bit of room, ressources spread around a bit more thinly), it still won't go build many cities, but stay in its capital building wonders nonetheless. Which results in more barbs for them. Say the Mayans start in a "tall" area (terrain with natural borders/City States and some other civs near), they'll still go their Expansionist way and may even build one of their "settler spam" cities where they find place for it, f.e. behind the German Capital from their point of view.

Is that observation true?
 
Thanks, EricB! I'll definitely try those out this weekend. I've been playing with 18 civs on huge maps instead of 12, and can agree that the added number of competitors (along with more city-states) definitely seems to help things out.
 
Hmmm.

I'm uneasy about the piecemeal introduction of AI.

How sure are we that it doesn't then skew our observations of other AI behaviour?

I tend to agree. While it is a relatively urgent issue, the AI is not the right place for a hastily implemented fix. It will be very hard to tell where the possibly weird behaviour comes from.
 
The AI often doesn't clear barb camps even when they have a unit standing right next to them. This requires some kind of AI change, but it might not be something they have access to.

I always just assumed this was the AI trying to build up its xp.

I often see several ships around a camp. They wait till something is spawned then pounce on it. Once a ship reaches max xp it leaves and is replaced with another.

I don't have the patience to do this but as I said... I think that is what the AI is doing.

Perhaps if we add those 1st two promotions in to the AI units they will start taking out camps rather than xp farming them?
 
The AI does not understand the concept of farming barbarians. It isn't doing that deliberately. It just doesn't understand how to clear the camps.
 
The AI does not understand the concept of farming barbarians...

I'd have to say as a concept 'farming barbarians' is right up there with 'milking pirates' and 'shearing brigands'!:mischief:
 
I've started doing significant work on the AI for v3.2.1. I reactivated many more of the AI files from Gem. I also figured out some new things I can do for each personality type. I'm going to release some of the basic stuff tonight or tomorrow, then work on more as we get the Leaders changes back into the game this week.
 
So I played some more today on that game I mentioned above. Progressed up to the point of transitioning from the industrial era to the modern era. I've never played this far into the tech tree on BNW so the whole ideology thing is new to me.

I'm #3 in tech right now. The number 1 tech civ is Greece. They are allied with every city state in the game. I'm part of a coalition of civs that continually denounces Greece. They are dominating the World Congress big time with all those city state allies. I got sick of them after they banned one of my luxuries even though I did everything I could to stop them from doing it, so I built up a navy, sailed it over to them and attacked them. First, I took out one of their city states. It was a huge city so absorbing all that unhappiness was tough. I then took Sparta, their 2nd city since it was coastal. They struck back with planes, which is a tech I don't have yet. Holding the city was never in doubt though since I had such a large navy.

The next plan of attack was to liberate Constantinople. I was hovering around 0-5 in happiness and couldn't absorb another city. I started to sail my navy around the continent to that city then out of the blue they offered me a peace treaty giving up Constantinople for peace so I took the deal. Soon after I hit the modern era and choose an ideology. Then another civ hit the modern era and BAM! -16 happiness for me from that.

I also disabled the time victory option when setting up the game. I always play that way. Time victories are lame. Plus, sometimes the pace of the technologies doesn't match what year it is so that way what year it is doesn't matter anymore.

The AI is still easy to beat militarily, but this is the first BNW game I've played where it wasn't a blowout by the renaissance era. Still likely to win in the end with probably a science victory. I could go domination but I'd have to anger a lot of friends to do that and it would take forever to go conquer 9 other civs. 2 of the starting 12 have already been eliminated by other civs. I just have to beat Greece down. They were starting to pull away from me in techs. It said they were six techs ahead of me last I checked. Losing Constantinople and Sparta will knock them down a notch. Plus, once I have the chance to regroup I'll bash them some more. Definitely been more fun than games before.
 
I haven't been seeing the issue of the AI not clearing barb camps as much as some suggest - a number of times I've gone to clear a camp and the AI was right there and cleared it just before I got to it. They have trouble with clearing island camps of course (but that was always the case ime) and recently I cleared a camp near Alex, but it was deep in the mountains and he was probably either worried because he could only get one unit in range to fight it or never actually found it.
 
So I've played a couple more CEP 3.2 games and I noticed that the biggest problem now is the negative GPT issue which is probably why the AI falls behind in tech mid game. Before the happiness, barbarian, aggression, or expansion issues is this. Below are some GPT values I took from my game after I picked up my ideologies. It seems like some of the AI can't pay for the giant armies that they are fielding or too many cities with too many buildings.

Code:
                   Japan   Aztecs  Venice
Total GPT:          227     353     494
City Tiles:         163     219     329
Trade Routes:        27      85     127

Maintenance Costs:  259     368     192
Units:              184     217      66
Buildings:           61     123     127
 
So I've played a couple more CEP 3.2 games and I noticed that the biggest problem now is the negative GPT issue which is probably why the AI falls behind in tech mid game. Before the happiness, barbarian, aggression, or expansion issues is this. Below are some GPT values I took from my game after I picked up my ideologies. It seems like some of the AI can't pay for the giant armies that they are fielding or too many cities with too many buildings.

Code:
                   Japan   Aztecs  Venice
Total GPT:          227     353     494
City Tiles:         163     219     329
Trade Routes:        27      85     127

Maintenance Costs:  259     368     192
Units:              184     217      66
Buildings:           61     123     127

Are people seeing this in the base game as well, or is it an effect of the mod?
 
Buff the city trade connection values (to 40% population at least). I think that's probably crippling their economic value as the AI should be pretty good at hooking up cities.
 
Are people seeing this in the base game as well, or is it an effect of the mod?

That's the thing. The AI performance is so hard to test for. I mean in my game the AI was keeping up until the mid game where I suddenly shot past them in science. But there were a bunch of early wars on the other continent (that eliminated a civ) that could have justified the larger army. But during peacetime they still had negative GPT. I've seen this in BNW but not to the extent of 4-5 civs with negative GPT. On second thought I'm not sure if this was a fluke of my game or not. I would run more test games but my computer isn't the best and performance suffers.

It's hard to say where the problem really is. Is it the barbarians harassing the AI? Is it the AI not finding enough sources of happiness? Is it the AI building too many units or wonders?


Buff the city trade connection values (to 40% population at least). I think that's probably crippling their economic value as the AI should be pretty good at hooking up cities.

The AI around this time had 40-50 GPT from city connections. So 40% of that would be around an additional 16-20 GPT.
 
@stackpointer
We can mass test AIs from the "Game" tab of the tuner. Select "return as" a non-observer because observer seems to break things. Then click the 100 turn autoplay button. Take a break, come back to check, then autoplay some more.

I think the problem with AI gold is they're not building enough villages. I usually see them mass farms. We might try changing YIELD_GOLD's AIWeightPercent to an extreme value like "500" in CEC_Data.xml and see what happens. I think that controls their priorities, but I don't remember exactly.
 
Top Bottom