Version 0.80 discussion thread

Last post by glider said RevDCM would be updated in a couple of weeks. jdog has been very focused on the UP and BBAI recently and all that needs to be ported over to RevDCM, plus there are a couple critical bugs reported in RevDCM that need to be debugged. And there are the ever prevelant improvements to RevDCM that glider and jdog work on. If these things weren't enough BUG just got updated to 4.0, and needs to be merged in, plus there are the CAR mod performance improvements as well. So all in all with everything going into the next build, it's a lot of work to get it updated.

For what it's worthI hear you, I myself am eagerly awaiting a release. The UP, CAR, BUG 4.0, and BBAI updates themselves are going to make the next RevDCM update quite a jump, and I'd like to get these things incorporated in LoR. But I know that it takes time, and alot of time given all that is involved in the next version.
 
It is truly astounding all the improvements that the group here have made to this game. I mean, I went over to a buddies house, and played BTS (just plain-old BTS). And its truly un-playable without this. And to think all the work that has gone on, and now there is a "mega-merge" going on with all the new work compiled here, BUG, CAR, etc. Truly great work. It very much does not go unappreciated. If anything, I hope some of this group has earned the RIGHT to be acknowledged and to have the opportunity to do some real-actual PAID work on Civilization V.
 
I just found a serious bug in BtS ... take a look (from CvCityAI::AI_chooseProduction):

Code:
	if (iNeededWorkers < iExistingWorkers)
	{
		if ((AI_getWorkersNeeded() > 0) && (AI_getWorkersHave() == 0))
		{
			if (!bChooseWorker && AI_chooseUnit(UNITAI_WORKER))
			{
				return;
			}
			bChooseWorker = true;
		}
	}

The shock, the horror ... iNeededWorkers and iExistingWorkers mean what their names suggest for the continent where the city is, while AI_getWorkersNeeded() and AI_getWorkersHave() are local to the city. This should really read:

Code:
if (iNeededWorkers [B]>[/B] iExistingWorkers)

As it stands, the AI builds 1/2 the workers it thinks it needs ... then, if somehow it ends up with too many it might build more! (insert joke about putting the I in AI here)

I had looked at this line before quizzically and thought it must have been a special case ... should have searched for all uses of iNeededWorkers then. This specific bug was introduced in BtS, although the pre-BtS city production AI was pretty weak anyway.

So, if you ever wondered why an AI city with no worker around and an obvious need for improvement was languishing for turn after turn, well now you know.

Definitely will make its way to the Unofficial Patch as well.
 
That's a pretty terrible bug. If the AI became competent at improvements after fixing this, it would be like raising the difficulty another half bar. Excellent work.
 
Once again, great find!

Thank you! :goodjob:

Agreed. :)

Finding bugs like these and subsequently fixing them probably does more for improving the AI than actual AI tweaks, not to detract from the significance of the improvements in Better AI! If these sorts of bugs make it into the Unofficial Patch, perhaps it should be called Fixed AI, and then this mod is Better AI. :p :lol:
 
Great find. :goodjob:

Does the AI always build the workers chosen by this code locally? Some small cities are far from ideal for worker production.
 
Yes, this is purely local.

There is another code block where high production cities will build workers based solely on area need, not local need. I think that this other block fills most of the worker slots.

Since this section has basically never activated, it may need some tweaking ...
 
Yes, this is purely local.

There is another code block where high production cities will build workers based solely on area need, not local need. I think that this other block fills most of the worker slots.

Since this section has basically never activated, it may need some tweaking ...

I think it's preferable that the area block worker code is activated in most cases to supply the worker need. Only when a worker is required on a remote island and wasn't shipped there and isn't going to be shipped there in the near future, it might be easier for the AI to create it locally. It's probably a bit hard to teach the AI, to efficiently ship workers in the exactly right quantities to all remote colonies. I can't recall seeing the AI ship workers to it's remote colonies, but then that's not something that is typically seen by the human player as it's outside of the human players vision range.

I would in general hate it when the AI creates a worker in its just founded second city while the capital is building other stuff. The undeveloped second city will need some 15 turns (normal speed) to construct the worker while a well developed capital might do it in 4 turns (without chopping). Workers are such high priority for new cities and are crucial at making new cities productive in a short time span that you typically don't want new cities to inefficiently build them themselves while they can't grow. This might thus mean that the area code needs to be strengthened a bit.

You're right that we've never witnessed the interaction between the area code and the local code so as players we don't have ingame experience of how it works. But you might be able to guess how they'll interact by looking at the code.
 
Top Bottom