[151.9] Giant AI Bug

Seek

Deity
Joined
Aug 7, 2010
Messages
3,773
I started a small/standard/immortal/pangea game this morning and everything seemed to be working perfectly: The AI was building wonders, growing, expanding and accruing culture correctly! Unfortunately, this didn't last - around turn 60 the AI just went south and ceased to be any threat. I played for a while before launching the Have Fun mod (where you can take control of any player in a game) and was horrified to see that the AIs' cities were majorly bugged - almost every one had only a fraction of their production, science and culture actually being applied, and one city building a settler wasn't getting the production from food at all.

Wanting to take some screenshots, I exited to the main menu to take Civ out of fullscreen (I can't take SSs without an external program). When I loaded the game back up everything was working properly for the AI again. This really needs to be fixed asap.:)
 
Something has been off for a while now, but your experience explains why I could play an occasional game where everything seems fine (or fine enough), and then the mod seems to revert to grossly sub-par AI performance.

We have had some fairly recent major shifts based on group opinion that the mod was too easy or too hard, but I'm assuming that Thal made those adjustments in a familiar and transparent manner whose effects could be easily understood and adjusted. The problem at hand could be a simple typo in the code, but common sense also indicates that something this big was caused by an equally big change in the mod.

More recently we added Opportunites, caused the AI to spend its gold, decentralized production, and reduced initial production in favor of gold. Somewhere in that time frame, the AI variously lost its original level of GW and CS competitiveness, and occasionally its overall productivity, including its expansion rate. I don't think the solution to the meta-problem is just adjusting bonuses and preferences. One guess is that some combination of those changes (not Opportunities) are responsible. But if they're not, I would put my money on a coding error as opposed to further tinkering with the sliders, so to speak.
 
Oh, I did notice that on one of the rankings that pops up every so often, this one being the 'most productive', that the AI with the lowest production was at -1. Can this even happen?

EDIT: Think it was version 151.4 or there abouts
 
I suspect this is going to be very difficult to fix. It probably has no formal error message, it's reset by loading a save, only affects the AI, and occurs unpredictably. At least I can narrow it down a bit... it's likely a problem in the yield library.

If you see the problem again, check if the same thing happen if you switch to an AI with this method:

  1. Open the tuner's Game tab.
  2. Click an AI.
  3. Click "autoplay 1."
This can let us rule out the possibility of the other mod causing a problem.
 
I have a very busy day today, but I will try that when I can (though I am very doubtful that the other mod is related - this is an issue that we've been getting reports about for some time).

I will also go back to my v149 game and see if I can reproduce the bug there. That was the first time I played against the lackluster AI, but after some searching, the earliest mention of it was by Gunnergoz, about v148.6:
Spoiler :
I'm playing a Terra map on King as Spain using v148.6 and despite fighting 3 wars (I was DOW'd by 2 other countries each time, for expanding too much, apparently) my score is in the mid 500's while everyone else is in the 200's at best. One of the worst showings is England, which has yet to expand past London even though there is plenty of land and luxury items within easy reach. I have deliberately left the land open to see what it would do and Elizabeth sits there passively. That is just plain not right. What can be done to goose Britannia?

I seem to recall Txurce being the first to post about about small city sizes, but I can't find the post now. Nevertheless, from anecdotal evidence it seems the bug first popped up around v148, but I just noticed this entry from 145.4:
WWGD
  • Added the AI starting workers back into the game, to assist production of world wonders.
so it's possible the bug began earlier.

My first guess for a place to search for the origin of the bug is the new Trade Screen.
 
The only part of the project which modifies yields is the yield library (change/set yield stored for cities/players). If there's a problem there, it's likely been around for months.
 
The only part of the project which modifies yields is the yield library (change/set yield stored for cities/players). If there's a problem there, it's likely been around for months.

That's disheartening, but makes sense: it could have been hidden by the rampant AI gold spending we were dealing with.

Logic and intuition are telling me the same thing. The following is a chronological list of player reports and mod changes. It shows how far back at least some of the problems go. Is it possible that, for example, making changes to the AI approach to CS or GW inadvertently led to their overall issues?

Or am I over-complicating, something I am prone to do?

142x: reports AI not building GWs nearly as much as it should.
143: reports that AI CS gold spending is now down to a little subpar (from very high).
144.6: reduced AI CS gold spending by 50%.
145.4: reinstated starting workers to help AI with GW building; pushed back improvements due to excess human production early.
146: fixed AI yield bug.
146.6: reduced early AI bonuses.

147.2: report that AI CS influence still broken.
148.6: report that AI declarations are out of whack; report that game works fine.
150.2: report that AI is generally falling behind.
 
For one thing, you're forgetting that from 148/149 a lot of people were getting the "AI not expanding" issue.
 
England has popped up numerous times as having SERIOUS issues. In one of my games London was size 2 at turn 90 with fully improved tiles. Txurce reported something similar as well as Gunnergoz, mentioned above. I would start there.
 
As of t32 in a hotseat game, 3 AI civs have 2 cities apiece: good news. But Ottomans have only their capital (size 2) and Korea their capital (size 1).
 
Thal - A quick search on the site brought me to v142.10 where under "misc" it reads "v.3 Fixed a bug with the central Yield Library." This looks like the only recent edit (or mention) of the Yield Library. I have both 142.0 and 143.0 on file, I'll do some testing to see if the bug occurs on 142.

Is there anything else I can do? I have the basic debug log enabled, is the "Enable AI logging" going to give useful information? Also, once I select the "autoplay 1" as requested, what should I look for?
 
Seek, wasn't that the bug where after a time all VEM yields (especially noticeable were culture, and research agreement per turn science) would stop leaving us only with vanilla yields?
 
The v142.10 change is not related to this. I don't think "enable AI logging" would provide useful information.

Clicking "autoplay 1" puts you in control of the selected leader.
 
After 62 turns, I built the Temple of Artemis and the GL in my capital, staying only on Liberty.

On the other continent in this hotseat game, Korea still only has one city, but is now size 8. The Ottomans are still size 2 in Istanbul. They have built two workboats, but refuse to fish the waters next to the capital.
 
Back
Top Bottom