AI city distance?

Perhaps the reason that my Mod is getting results with the values I stated- is because I have greatly improved all non-luxury Food-type resource tiles with +3 total (various Food/Production/Gold) to make them more interesting and worthwhile to settle next to, since they cannot be traded... so maybe that is helping the Fertility distance variable in my Mod as opposed to vanilla tiles which cannot help it decide as easily?

of course it could all be placebo and random success, so I will keep testing, but so far so good. the slow and steady spread I am seeing is night and day compared to the ICS before. if anything, the AI is too weak now (in a lack of cheating bonuses kind of way).

Amazingly, in my last separate test, the AI wasn't even settling on far-off empty tracks of good land (it was somewhat near City-states who might have detered settling nearby)! I was actually disappointed that the AI was nerfed in that respect... was playing on 'King' difficulty though, so it could be it wasn't getting enough bonuses.

perhaps unrelated, I have started getting very long turn times which I never got before... I think it might have to do with more calculation based on my new city distance settings [that, or a result of the most recent 'hotfix' / patch for crashes which didn't help remove crashes]. The long turn times seem like the usual frozen 'Not Responding' Windows application, but are in-fact, just really long. of course, many would say my computer is to blame, yet it did not happen before, and I have a top-of-the-line system... and this is on standard map-size even.
 
I think the increased turn times is partly imagination when running autorun trials, certainly...

But I think it's also somewhat real, when you increase the distance cap and there are sesttlers trying to decide where to go.

I sometimes watch my test runs on Strategic view, and I've seen an odd phenomenon, just wondering if anyone has seen similar.... Settlers wandering out of borders, sometimes into the middle of ocean, and then sitting there rather than go for a pretty good nearby location. I get them just a little nearer the location by hand, and the AI will put them down. The weird thing is this is a difference between 5 and 10 hexes or so, well under the cap. Possibly an interaction between the dropoff and the minimum fertility, I suppose.
 
I think the nuclear sub is something they did as a sort of "Ding I'm done!" message from the game. There's that distinctive sound effect when a unit's created even if another window's in front of CiV. A sub's a great way to handle it without interfering with the autoplay, since it can be dropped under ice on a remote part of the map.
It only seems to happen when autorunning higher than 50 turns; also, it appears as belonging to a player that isn't in the game, and if you scrap it, the game behaves like you lost all your units and cities... game over. Very strange. But rather tangential at this point.
 
Boosting ALREADY_OWNED_STRATEGIC_VALUE to -1M seems to increase the preferred distance to 4 instead of 3, which is quite decent and definitely better than raising the minimal city distance
 
Boosting ALREADY_OWNED_STRATEGIC_VALUE to -1M seems to increase the preferred distance to 4 instead of 3, which is quite decent and definitely better than raising the minimal city distance
1M as in 1,000,000? Wow. That's... frightening. I'll experiment with that in addition to my existing changes later this afternoon/evening.
 
1M as in 1,000,000? Wow. That's... frightening. I'll experiment with that in addition to my existing changes later this afternoon/evening.

Yeah, I figured since it's -1000 already I'd better add a few more orders of magnitude for testing... it doesn't seem to take into account enemy-owned territory, however
 
Of course, if we send it too far it will probably suddenly act really weirdly... I'm seeing odd results in my latest test at -2M, which is odd, because it looked good on the last one, and I've not changed much else since, desiring a vaguely scientific approach.
 
What kind of odd?
3 hexes-in-between got less common, with most of the difference going into 2 hexes-in-between (the minimum), but some seemingly going into 4 (edit: and a noticeable, but small, increase in more-than-4).

I have a test running with a negative dropoff modifier now... got slightly worse results with dropoff modifier of 150
 
The fruits of my tests (and integrations of all the tips from others here) are contained in the mod "Saner AI City Locations" on the ModHub, with places with more details (that will be updated) linked in my sig. However, for folks here, this is my summary:

Made food, happiness, etc multipliers closer to eachother:
Spoiler :
<Update>
<Set Value="10" /><!-- original: 15 -->
<Where name="SETTLER_FOOD_MULTIPLIER" />
</Update>
<Update>
<Set Value="10" /><!-- original: 8 -->
<Where name="SETTLER_HAPPINESS_MULTIPLIER" />
</Update>
<Update>
<Set Value="9" /><!-- original: 3 -->
<Where name="SETTLER_PRODUCTION_MULTIPLIER" />
</Update>
<Update>
<Set Value="9" /><!-- original: 2 -->
<Where name="SETTLER_GOLD_MULTIPLIER" />
</Update>
<Update>
<Set Value="3" /><!-- original: 1 -->
<Where name="SETTLER_SCIENCE_MULTIPLIER" />
</Update>
<Update>
<Set Value="4" /><!-- original: 3 -->
<Where name="SETTLER_RESOURCE_MULTIPLIER" />
</Update>
<Update>
<Set Value="3" /><!-- original: 1 -->
<Where name="SETTLER_STRATEGIC_MULTIPLIER" />
</Update>

Made ring 1 and ring 2 equal, and reduced the amount ring 3 is reduced by, relative to them:
Spoiler :
<Update>
<Set Value="12" /><!-- original: 12 -->
<Where name="CITY_RING_1_MULTIPLIER" />
</Update>
<Update>
<Set Value="12" /><!-- original: 6 -->
<Where name="CITY_RING_2_MULTIPLIER" />
</Update>
<Update>
<Set Value="9" /><!-- original: 2 -->
<Where name="CITY_RING_3_MULTIPLIER" />
</Update>

Enhance likelihood of settling at a distance (the first of these will make the decision slower, but not a major effect in my tests):
Spoiler :
<Update>
<Set Value="50" /><!-- original: 20 -->
<Where name="SETTLER_EVALUATION_DISTANCE" />
</Update>
<Update>
<Set Value="170" /><!-- original: 75; at 200 distant city building seems more frequent; at 05 infrequent -->
<Where name="SETTLER_DISTANCE_DROPOFF_MODIFIER" />
</Update>

Encourage building on the coast (due to the frequency of idiotic placements one tile in from the coast):
Spoiler :
<Update>
<Set Value="75" /><!-- original: 25 -->
<Where name="SETTLER_BUILD_ON_COAST_PERCENT" />
</Update>

This one seems to make it very reluctant to settle at the minimum distance:
Spoiler :
<Update>
<Set Value="-1000000" /><!-- original: -1000 - going to -5000 made no difference to settling -->
<Where name="ALREADY_OWNED_STRATEGIC_VALUE" />
</Update>

Make the AI re-evaluate city specialisation more frequently:
Spoiler :
<Update>
<Set Value="25" /><!-- original: 50 -->
<Where name="AI_CITY_SPECIALIZATION_REEVALUATION_INTERVAL" />
</Update>

And finally, not sure if this actually affects settling, but it certainly doesn't appear to harm it:
Spoiler :
<Update>
<Set Value="50" /><!-- original: 75 -->
<Where name="AI_STRATEGY_AREA_IS_FULL_PERCENT" />
</Update>

Feedback on the whole thing welcome, but of course particularly relevant here is discussion of the actual variables and values.

I still think there should be a tunable factor to de-value any hex that's already in a city-radius, greater for ring1 and less for ring3, of course (I usually build my cities with an overlap at ring3). But as I can't add that, this is what I've managed so far.
 
Having ALREADY_OWNED_STRATEGIC_VALUE at 10000 also made the AI settle 3 tiles away instead of 2.
 
Having ALREADY_OWNED_STRATEGIC_VALUE at 10000 also made the AI settle 3 tiles away instead of 2.
Good to know - I'll trim some orders of magnitude from my value...

I do think that tweaking of others has made a difference as well. I've seen more 'grabbing more resources' city placements since equalising rings 1 and 2, for instance, rather than always wanting to be next to as many resources as it can get, even if it then is out of reach of others. The increased weighting for the coast is also a benefit. However, all testing has been by impression, of course, rather than anything scientific.
 
@SamBC I have downloaded your mod for a try, thanks for sharing it. Also I have decided to change the value which Alpaca has noted to 10,000. As you are going to trim away with your mod values would you be changing the one that you have uploaded to the ModHub..?
 
<Update>
<Set Value="12" /><!-- original: 12 -->
<Where name="CITY_RING_1_MULTIPLIER" />
</Update>
<Update>
<Set Value="12" /><!-- original: 6 -->
<Where name="CITY_RING_2_MULTIPLIER" />
</Update>
<Update>
<Set Value="9" /><!-- original: 2 -->
<Where name="CITY_RING_3_MULTIPLIER" />
</Update>

Could you set that to 4-4-3 and get similar, if not the same, results? I assume their value only has meaning relative to each other. If so it may still have the effect of changing how the others values interact with them.
 
Could you set that to 4-4-3 and get similar, if not the same, results? I assume their value only has meaning relative to each other. If so it may still have the effect of changing how the others values interact with them.
They're not just relative to one another... all of the relevant values are multiplied together, best as I can tell, although some are percentages. However... everything has something in each ring, and every hex being considered is in some ring... I can't think clearly for certain either way. I'll find common factors and trim orders of magnitude later this evening (UK time) and upload the new version as V3.

Of course, I was trying lots of things, and it may be you can get equivalent results changing fewer of them. I'm pretty happy with current results, though, within the limitations that seem to exist.
 
They're not just relative to one another... all of the relevant values are multiplied together, best as I can tell, although some are percentages. However... everything has something in each ring, and every hex being considered is in some ring... I can't think clearly for certain either way. I'll find common factors and trim orders of magnitude later this evening (UK time) and upload the new version as V3.

Of course, I was trying lots of things, and it may be you can get equivalent results changing fewer of them. I'm pretty happy with current results, though, within the limitations that seem to exist.

Care to post some screens?
 
Care to post some screens?
Next time I have the opportunity I'll take some, assuming PrtScrn works for me inside CivV... otherwise it'll be longer until I get around to finding free screen capture software that works.
 
Back
Top Bottom