incremental patch discussion

Did you try setting a high iAIObjective for BONUS_SPICE in bonusinfos and setting high positive ImprovementWeightModifiers? I just did a quick test with Advanced Start setting iAIObjective to 900 and giving Leto ImprovementWeightModifier with AiWeight 900 for IMPROVEMENT_HARVESTER. The AI did build Harvesters over all the Spice within range within several turns. What was the main issue with the harvesters, is the problem just that you think it's not placing cities aggressively enough toward where more Spice would be?

BTW Ahriman take a look at the Civ4 Modiki and XML Reference and soon all XML knowledge will be yours!:scan:
 
Did you try setting a high iAIObjective for BONUS_SPICE in bonusinfos and setting high positive ImprovementWeightModifiers? I just did a quick test with Advanced Start setting iAIObjective to 900 and giving Leto ImprovementWeightModifier with AiWeight 900 for IMPROVEMENT_HARVESTER. The AI did build Harvesters over all the Spice within range within several turns. What was the main issue with the harvesters, is the problem just that you think it's not placing cities aggressively enough toward where more Spice would be?

Interesting. The main issue is that harvesters are not being built outside city's BFCs I believe. In your screenshot all those harvesters are within the city BFC, so we can't be sure that the issue is resolved.

I think we don't want to use the iAIObjective in BonusInfos because I believe that affects where the AI places cities - the issue being that spice is temporary - it appears from Spice Blows and disappears after a period of time. The AI could pick a great site from a Spice perspective than turns into a really poor site a few turns later.

This ImprovementWeightModifier however seems like something we should test before we abandon the Corporation-less method for Spice income. Do you have time to run some tests on this Ahriman?
 
I the latest version, the AI is hardly building harvesters at all, even within the BFC.

I suspect that some of this may well be fixed by an improvement priority issue, but also by the fact that the AI just doesn't build quite enough workers.

I won't have any time to work on this until the weekend, but I could do some tests then, sure.

I worry though that setting it too high will have the AI prioritize harvesters over water-generating improvements, which probably wouldn't be a good thing.

I'd be fine for them to prioritize harvesters over cottages/mines/turbines/solar plants though.
 
If much of the issue is just general to insufficient Workers you could titrate iAiWeight in UnitInfos until you feel it's building an appropriate amount. It could make sense to include one Worker in the starting units, that's always the first unit I build and could help keep the AI from falling behind. Anyway more direct testing is a good idea, be sure to spy on it closely in WorldBuilder, I can't count the # of time I was convinced the AI suffered from some certain problem but was totally misinterpreting it.
 
Thanks for the suggestions. The main drawback to increasing iAIObjective is that this causes the AI to value it very highly for trade also. It makes little sense for the AI to give away 2-3 good resources in exchange for one spice.

We can certainly increase the ImprovementWeightModifier on spice for all the leaderheads; that may improve the number of harvesters built inside BFCs. However, up till version 1.7, spice yield for commerce was on a corporation, where in 1.7.1 it is on a building using a custom xml tag. The vanilla AI is successful at building harvesters outside city BFC when it can see that there is a corporation yield for it. So up till 1.7, the AI would build many harvesters outside city BFC. In 1.7.1 it never does, because I was not able to figure out how to tell the worker AI to be interested in building improvements outside city BFC.

I will put back the corporations, and that will make the AI much more interested in building harvesters everywhere. This will not directly address Ahriman's feedback that the AI would do better with more workers. Perhaps some experiments to increase iAIWeight on the worker unit would be helpful. For now, these experiments could use 1.7 instead of 1.7.1 so that the workers would have "normal" interest in building harvesters.
 
I tried using just an AiObjective of 1 (equal to the existing Groundwater and Ice) with or without ImprovementWeightModifiers, it actually seems to be perfectly fine with building Harvesters well outside of the BFC. You can also use iAITradeModifier if you need to adjust any trade behavior, but it didn't seem to be a problem. Also the AI city placement didn't look overly affected by nearby spice. Well, try some tests with various combinations of values and see what the results show.

I gave it Workers in my test and added culture buildings to push the borders past BFC, so it actually might still be just a generic Worker problem like Ahriman thought, or even something unrelated like not discovering the Tech quick enough.

I think another possibility is AI Workers being scared away from many desert tiles by the huge Strength of the roaming Sandworm units, I think that had happened with the Settlers at one point.
 

Attachments

  • d1.jpg
    d1.jpg
    290.7 KB · Views: 82
  • d2.jpg
    d2.jpg
    187.7 KB · Views: 97
  • d3.jpg
    d3.jpg
    305.7 KB · Views: 77
I tried using just an AiObjective of 1 (equal to the existing Groundwater and Ice) with or without ImprovementWeightModifiers, it actually seems to be perfectly fine with building Harvesters well outside of the BFC. You can also use iAITradeModifier if you need to adjust any trade behavior, but it didn't seem to be a problem. Also the AI city placement didn't look overly affected by nearby spice. Well, try some tests with various combinations of values and see what the results show.

More interesting findings, thanks orlanth.

I thought that AiObjective was a boolean value anyway - I could be wrong. I would also has thought that if AiObjective does effect trade it would make the AI less likely to trade it away and more likely to try and obtain it via trade.

It makes sense that AiObjective isn't affecting city placement as David has replaced the vanilla algorithm with custom code for Dune Wars.
 
@david: If you are assembling a 1.7.2 patch then you might as well include this improved leaderhead I did for Erlin Malky. It would probably be more appropriate for Rhombur, but I'd need to find another one for Erlin in that case.
 
OK, 1.7.2 is out. Next, I'll take Ahriman's xml from post 954 above, merge them, and see what happens. This will change the economy a lot, so I will try a few of the "pick your leader" standard positions and see what happens.

@ deliverator, it should not be too hard for you to merge your changes onto 1.7.2; the main file I changed was buildinginfos to re-add the corporation buildings in one chunk. But other files had minor changes to be merged.
 
Ok, I have resintalled 1.7, music patch, 1.7.2.

Next it would be good to merge in Deliverator's changes, and then we can try to combine some of my economy changes (cottage, turbine, solar plant, polar terrain) with some tweaks to the tech tree (swap Way of liet and Planetary Ecology, change which improvement bonuses are at which techs) and buildings (remove weather scanner building and change spotter control).

It sounds like Deliverator's patch can't be merged straight over 1.7.2, so I will hold off on any further changes. Once we have this, I can do tech flavor and beaker cost tweaking.
 
Ok, here are XML files with some changes then that could go into a patch. [Sorry, not in the right subfolders]

This was back at post #954. I have tried this on top of 1.7.2. It works, with no crashes. There was one spelling error which caused the game not to start, but it was easily fixed. This set of changes includes the buildinginfos file, which is also changed in 1.7.2 to add back the corp buildings.

I did a couple of autoplays. It seems the only improvement built, anywhere, is solar farms. This plus the right civic gives 4 hammers on any tile, and it seems to me that the total hammers of cities is quite huge.

In case anybody wants it, I have merged these changes into 1.7.2. Let us call this 1.7.2.1. The work is all Ahriman's, except a few minutes of merging.

Next I will look into deliverator's tech tree work, and see if I can reproduce the problem Ahriman is having with crashes.
 
I did a couple of autoplays. It seems the only improvement built, anywhere, is solar farms. This plus the right civic gives 4 hammers on any tile, and it seems to me that the total hammers of cities is quite huge.

This is probably partly because the tech changes have not happened yet; before then, the solar plant and turbine are in separate techs (wind power, solar power), and you only need research one or other. With the tech changes, they are merged into the same tech, which should make both available. But until then they may not be researching the turbine tech (wind power).

Solar farms should be giving 1h1c, eventually rising with tech to 2h1c in the midgame and then 3h1c in the very late game.
Solar farms are buildable on flat and graben, and turbines are 2h rising to 3h and then 4h, but buildable only on mesa. So what we should observe is a mix of windtraps and turbines on mesa, and a mix of cottages and solar farms on flatland, and then bonuses. Mines should be worth building only on bonuses or in the very early game, or with slavery civic (though I was investigating slavery changes).

There are no civics (that I recall??) that boost solar farms.
So I don't see how you could be getting 4h on any tiles until the extremely late-game (military industrial complex tech), unless there is a typo in my files. You used to be able to get this from solar farms too, its just that the AI wouldn't do it because of the -1 water penalty, it didn't understand that the penalty had no impact on tiles that had zero water yield.

Unfortunate though if the AI is only building solar farms. They give 1h1c, whereas a cottage adjacent to a well gives 2c rising eventually up to 5 commerce, with further boosts from civics.

When I did a few tests, the AI was still building plenty of cottages.

But the AI has a known issue to over-value hammers.
 
Ran some autoplays with this patch. AI certainly seems to be building turbines (if its not in slavery; otherwise it uses mines), cottages and harvesters.

I cannot reproduce your "only builds solar plants".

Eg:
Spoiler :

patch1.jpg



Spoiler :

patch2.jpg



Spoiler :

patch3.jpg



These are after 150 games on quick speed.

Can you describe the circumstances where you observed only solar farms?

I suggest we remove the mine bonus from slavery and make it +X% hammers (10%?) and +1 unhealth, and then test, and I bet we'll get a good mix of good mix of cottage, turbine and solar plant, with mines in the early game and on bonuses.
 
@ deliverator, it should not be too hard for you to merge your changes onto 1.7.2; the main file I changed was buildinginfos to re-add the corporation buildings in one chunk. But other files had minor changes to be merged.
...
Next I will look into deliverator's tech tree work, and see if I can reproduce the problem Ahriman is having with crashes.

If you like, I can do the work of merging the tech tree changes with 1.7.2/1.7.2.1 this evening (approx. 10 hours time).

With regards to the corporations, I think we should bear in mind orlanth's findings about setting AIObjective to 1 for the spice. Perhaps when we have the tech tree rework complete and things more settled we can revisit this.
 
I cannot reproduce your "only builds solar plants".

My result was after 495 turns on normal. I guess we agree these changes are an intermediate point and deliverator's tech tree changes should be used as well; so it may not be too important to investigate more.

deliverator said:
With regards to the corporations, I think we should bear in mind orlanth's findings about setting AIObjective to 1 for the spice.

I think we agree that in 1.7, before 1.7.1, the AI was giving sufficient weight to building harvesters both inside and outside the BFC. That is because the AI does understand how to value improvements that affect corporation yield, without tweaking AIObjective. The goal of 1.7.2 was to put back that behavior, so AIObjective should not be needed.
 
I think we agree that in 1.7, before 1.7.1, the AI was giving sufficient weight to building harvesters both inside and outside the BFC. That is because the AI does understand how to value improvements that affect corporation yield, without tweaking AIObjective. The goal of 1.7.2 was to put back that behavior, so AIObjective should not be needed.

Understood. But if the required behaviour can be achieved without the need to spend one turn building a Spice HQ then that would be still be desirable. In other words, the reason why we wanted to scrap the corporations in the first place is still valid.
 
My result was after 495 turns on normal. I guess we agree these changes are an intermediate point and deliverator's tech tree changes should be used as well; so it may not be too important to investigate more.

I am guessing that what happened was the AI developed as normal, and then once they developed M.I. complex they paved over their cottages with solar plants.

Hmm. It could be that in the very end game, the AI sees 3h1c as superior to cottages 4c/5c.

Possible solution: give a bonus to cottage yield at some very super-high tech level, so that it still looks good relative to the solar plant?
Secondary solution: change the solar plant yield to go from 1h1c to 2h1c to 2h2c rather than 1h1c to 2h1c to 3h1c?

But that reduces the distinction between solar plants/turbines as hammer boosters and cottages as commerce boosters.

I still think (as demonstrated in the screenshots) that the patched version does better in promoting diversity than the old version, at least up until this MI complex point.
 
If you like, I can do the work of merging the tech tree changes with 1.7.2/1.7.2.1 this evening (approx. 10 hours time).

I made one attempt at this, but gave up. I think I had everything right except for unitinfos and buildinginfos. I lost confidence during unitinfos, and gave up on buildinginfos. I will drop back to 1.7.2.1 and re-test the human player with spice corps.
 
I made one attempt at this, but gave up. I think I had everything right except for unitinfos and buildinginfos. I lost confidence during unitinfos, and gave up on buildinginfos. I will drop back to 1.7.2.1 and re-test the human player with spice corps.

OK, I'll have a go myself. Hopefully, Beyond Compare 3 and some concentration will do the job. I'll aim to put up a new incremental patch that includes the missing civ infos spice corp entries as well as the tech tree changes.
 
I have verified locally that adding the spice corp buildings to civinfos solves the problem of the human player building the spice corp. Also, I have found a couple of spelling errors in the religion flavors, which doesn't appear to harm anything but means it won't quite work right either. (One FLAVOR_Quizarate in techinfos, and two FLAVOR_IMERIAL in leaderheadinfos.)

Shall I put up a 1.7.2.2 or perhaps 1.7.3 with these two changes only?
 
Back
Top Bottom