[GS] I think AI is having some problems when it comes to resource improvement

Bitterman

Warlord
Joined
Mar 1, 2018
Messages
264
Location
Granada, Spain
So this is not the first time I observe this weird behaviour, but is the first time I documented it so others can see and compare if this is happening in their games as well. The thing is AI's have some odd preferences when it comes to resource improvement. Namely they will not improve some resources no matter what happens through the game because some reason.

As you will see, it does not matter wether they have workers or not, or if the city in which the tile is in is new or one of their first settlements. In the same games, some AI's will improve some particular resources while other will not and vice-versa. Sometimes is so obvious that it doesn't make sense at all. This is emperor, standard, and with some mods but none of them touch the AI as far as I know (and I'm fairly sure I've seen this before in complete unmodded games). Playing cree was a huge factor here since their UA allows me to see what others are doing with its shared vision.

Let's go with the first example: red dots are for things I consider priority, pink for those not so important. You can see they didn't even improve some of their luxuries. They didn't improve many of their bonus, specially stone. One can either improve ir or harvest it, but leave it as it is doesn't make much sense, right? AI's seem to be biased against stone for some reason. Also no horses. Note that this is CLOSE to their capital on turn 218 standard (although with 8 ages of pace) so this is even worse. On the other hand, they spammed their UI and have some farms close to Madurai. Don't understand.



Second example: this time is Sweden. Again they don't like improving their bonus. Look at Helsingborg; granted is a new city (or maybe not so much since is in the desert) but why would you make 3 Alcázares and not sheep? Why is there cows and horse literally 2-3 tiles away from their capital and they don't take it? What's with the Furs to the south? Why do they have those +5 rices there on the top with a dam and don't improve them? City is already at 14 pop ok but why not harvest them then or something?



Third example with Greece: not so bad but again what's so bad about stone that they don't touch it even if is so close to one of their oldest cities? Why they don't improve or harvest the copper close to Sparta? Why building that Alcázar (or whatever that thing is) in Olympia but not taking advantage of the deer?



And here we go with last one Japan: again they seem to hate furs even if they happen to be so close to their capital. Didn't touch the bananas either no matter there are farms on each side and don't make talk about the deer again. Also the whales to the nort although there may be that those are not in reach for a citizen to work and thus AI consider them as not worth improving. Note that they have some workers around too.



My question is: is this happening only with me or have any of you observed similar things? I'm not the most experienced player out there but this seems as buggy behaviour to me. Maybe someone could try to see what triggers this in a more 'controlled' space, idk.
 
OT, but the AI’s unit spreads in these pictures are also pretty bad. Japan is okay - swords and Samurai. Not sure why they’ve got so many catapults though. Anyway. Greece is undefended. Sweden are doing that thing where they have a couple of advanced units and then way too many obselete units (Chariots), I assume because Cree lack resources. India has some units, but they’re all Heffalumps and really you want to build other units not just Heffalumps.

City layouts seem a bit rubbish too, but I can’t quite see properly.
 
@Bitterman
Improvements are built via a behavior tree Build City Improvement and Build Trigger Improvement. The latter is used mainly for getting eurekas, the former is the main one triggered as part of city operations. The key part of that tree is getting a unit i.e. a builder. This is where things might get stuck - a builder simply may have a too low priority in the city queue.
Please note that there are barely any builders on the screenshots. Also, some improvements have been built, so it is not like "AI doesn't know how to build them". It knows. The balancing needs to be changed a bit.
If you now how to mod the game, then put this somewhere and check results.
Code:
UPDATE PseudoYields SET DefaultValue = 4.0 WHERE PseudoYieldType = 'PSEUDOYIELD_IMPROVEMENT'; --    0.5, 13.5 too much
This is from my Real Strategy mod.
 
I do have your mod installed but never checked specially for this so I will probably be starting another game with it and the Cree (maybe the same if I feel like it).

But I do not agree with the builder part. I don't know how the AI's check priorities but the builders are there, and that's the most painful part for me. There is only one in the first screenshot, but 3 in the second, 2 on the third and 5 on the fourth. I rarely have more than 2 at the same time.

You are the one who messed with this and really knows, but from my point of view the problem is in which order they improve things (maybe?). I mean, maybe they improve one stone for the eureka and after that priority for improving stone just plummets in favor of something else. Or maybe once they got a luxury the next copies of it are set to very low priority, I don't know.
 
@Bitterman
Those trees are a bit more complex, so there are more places when the process may stuck. E.g. there is a step to escort a builder to this place, and when no military is available, it will also get stuck.
What matters is that modders have only limited ways to influence this. E.g. entire scoring of which tile to improve is hidden in the DLL. Cant do anything about it. What can be done is to increase the generic value of an improvement, and this is what the SQL I posted does.
Another thing - the screenshot doesn’t show the dynamics. E.g. is the builder moving or just standing doing nothing. If it stands then you would have to see the logs, find the tree that governs it and see which step is blocked.
When I was working on Real Strategy I simply noticed that builders are inserted into the city build queue but are not built because other things are scored much higher.
 
@Bitterman E.g. there is a step to escort a builder to this place, and when no military is available, it will also get stuck.

Yes, that's also a big problem for many city states - they loose their initial army in wars (or don't start with a new after getting liberated), while their improvements and districts have been damaged...they react initially correct by first getting out a builder, but then the problem starts: It sits idle becaue of no escort and no escort is made ever, because the CS lacks any working economy to produce units (instead using the low production for ages to repair the district). Of course the high costs for district repair fuel the problem.
 
Very early in a game I came upon Persia and he had 3 cities a campus with library, 2 holy sites one with a shrine and 6 or 7 improved tiles and this was about the same time I produced my first settler ~3200BC on marathon. I was playing on Emp level, but the game thought it was playing Diety in other words. I pillaged all his horsehocky and then ~2000 years later he hadn't fixed any of his pillaged tiles, but the library was back up.
 
I have noticed this as well, since GS was released. At first I thought the AI was just really bad at recovering after disasters, but it seems too widespread for that.
 
Hmm, now that I’m looking in my current game I’m noticing this too. I have noticed generally, the AI struggling to keep up on tech and civic advancement. If they are struggling to improve simple features than that would explain the slower advancement.

I’ve also noticed the AI never builds water parks, like ever. It’s weird what they simply won’t do at times.
 
I’m browsing the map I’m noticing the AI seems to neglect developing Stone the worst. I see several undeveloped Niter resources too.

It’s weird because when I look at China in my game, they have Niter and Stone developed in several places, but not others. I bet the builder not having an escort could be an issue why some resource tiles get skipped for 100’s of years if not forever, or the AI prioritization of certain resources is too low.

I’m on turn 410/750 on Epic, so at this point I really shouldn’t be seeing this at all.

Out of curiosity I loaded up an old save from before the June update that was also Epic speed around turn 400 and the AI was definitely developing Stone (which it should, Stone is one of the first strategic resources)

This is a bummer, I was enjoying this patch and up until now I hadn’t noticed this major issue. Now it’s hard not to see it, and it makes a huge negative impact on the AI.

*sigh*
 
Top Bottom