AI Development: What is a forward settled city?

I think that the AI should have resources/monopolies in mind when somebody forward settles. I often look for an opportunity forward settling in an attempt to grab resources (yummy land) that would naturally be a part of another player monopoly. Sometimes the opportunity arise to completely block the AI from having his own monopoly, at the same time giving me access to two future monopolies - which is great.

So the annoyance of another player should scale with the 'possible' number of resources grabed (within 3 tiles of a city) from what the AI considers to be it's monopoly.

1 is noted.
2 is starting to become upset
3 becomes angry
4+ TOTAL WAR for the reminder of the game! :lol:

I just think that this greedy behaviour of mine should have consequences. :)
 
My take on this:
The "close to home" zone should be defined by the union of the N_t_c hex distance ring around your cities, where N_t_c is the 3 + the number of eras the city has been founded, union any luxury/strategics within 4 hexes of your cities.
 
I think that the AI should have resources/monopolies in mind when somebody forward settles. I often look for an opportunity forward settling in an attempt to grab resources (yummy land) that would naturally be a part of another player monopoly. Sometimes the opportunity arise to completely block the AI from having his own monopoly, at the same time giving me access to two future monopolies - which is great.

So the annoyance of another player should scale with the 'possible' number of resources grabed (within 3 tiles of a city) from what the AI considers to be it's monopoly.

1 is noted.
2 is starting to become upset
3 becomes angry
4+ TOTAL WAR for the reminder of the game! :lol:

I just think that this greedy behaviour of mine should have consequences. :)
43 civs monopolies are shared between civs. Even in normal version monopoly resources can spawn really near another civ's capital.
 
Since the hexagonal grid has an X-Y axis, and the AI can determine the distance between two cities, then I'd view this as a statistics issue.

Basically, imagine the cities as points on a scatter plot: Outliers that are closer to the AI's cities (especially if there are strategic or luxury resources within borders of the outlier city) than the player's cities are probably forward settled cities. Or something like that, I'm not sure how (or if) any type of statistical analysis could be implemented in the code.

Or you could go the route of just saying "Tiles that are X distance from a player's capital are considered a player's natural 'home territory', tiles that are Y distance from a player's capital are considered possible 'home territory', and tiles Z distance away are ignored." If a player starts encroaching on an AI's natural 'home territory' or prioritizing possible 'home territory' close to an AI, then it's probably forward settling. Again, no idea if this could be implemented (or if it's even a good idea to formalize it like this).
 
I think that the AI should have resources/monopolies in mind when somebody forward settles. I often look for an opportunity forward settling in an attempt to grab resources (yummy land) that would naturally be a part of another player monopoly. Sometimes the opportunity arise to completely block the AI from having his own monopoly, at the same time giving me access to two future monopolies - which is great.

So the annoyance of another player should scale with the 'possible' number of resources grabed (within 3 tiles of a city) from what the AI considers to be it's monopoly.

1 is noted.
2 is starting to become upset
3 becomes angry
4+ TOTAL WAR for the reminder of the game! :lol:

I just think that this greedy behaviour of mine should have consequences. :)
I don't think that should be part of "forward settling" logic. I think it should be part of the general logic towards the AI wanting to get a monopoly. In general, if it can't get a monopoly on a resource that it should have been able to get, then its aggressiveness should be very high in its efforts to secure it.
 
It is an idea I guess. Since the AI already evaluate possible settling locations, perhaps that is what should be used or be part of the system to evaluate if it's a forward settle or not. After all if the AI doesn't value that piece of land very highly it might not care as much. I'm not saying the system should be all based on that, but it might be a compliment to the distance thing. Still I think it's mostly going to be a distance thing, distance to cities and distance to capitals. If then perhaps the valuation can come in, after all if you just settle a spot that the AI had next on it's list of desirable locations then yes they might be a tad upset about that to.
 
I am assuming this thread is general is to iron out some of the 'confusing' and seemingly 'illogical' quirks around the AI being annoyed during expansion phases.

Thank you for all the input, everyone, lots of good stuff here.

"Forward settling" and "settling too near the AI" are distinct from each other. The latter triggers the expansion warning, the former will trigger additional aggression for your bold move.

If an expansionist AI were to pop up and complain about the player being in the way of their forward settling, that should be its own message (the AI being an aggressive jerk, not "you're settling too near me").

Separating out the two, i would define settling too near the AI as any city which would interfere with or with a potential initial ring of cities around a capital city therefore if we took a simple straight line, any city settled within 14 tiles of a capital city.
Which i would consider their basic sphere of expected influence and is worked out as the new city tile(1) plus potential sphere of that city(3) plus forward sphere (or potential sphere) of ring city(3) plus ring city tile(1) plus rear sphere of ring city(3) plus sphere of capital(3).
If not going tradition this could possibly be reduced to 10 tiles as cities are likely to be clustered much closer to each other and borders of cities are likely to be smaller when not going tradition.



I would say any city settled more than 7 tiles away from the settlers nearest city should be classed as forward settled and come under the umbrella of 'wary of your forward settling'.
If that city is not particularly close to them but potentially prevents them from expanding or moving through the area. e.g. a city planted in a bottle-neck which prevents them from freely moving from one area to another then it should be seen more negatively (not sure how much the AI can or does calculate/plan that far forward in time).
If the city is settled with 7 tiles of one of their cities i would add on 'border tension'.
If the city actively blocks the AI's expansion plans. i.e. it prevents the AI from settling a city it planned to settle then it would come under 'settling too agressively' with an increased malice if the AI now has no where else to settle because of that city.



Looking specifically at some of the (potential) quirks.
Most malice should be calculated when that city is settled with the exception of 'border tension' which has a broader remit really. Debuffs should not occur because the AI settled a city or captured a city which brought it too close to a city you already settled.
I make an exception for 'border tension' but i would say this should only be the case if the AI still has plans to expand. I see it as illogical that the AI should settle a city near another civ and then get 'border tension' if they have no plans to expand further and instead in the case the AI wants to expand futher i would see a debuff of 'AI covets your lands' as a much better description.
If a 3rd party city is captured which brings us under this general umbrella then 'forward settling' should not be a consideration at all but this should come under potential 'border tension' and factor in relations between the two parties. If the two parties are friendly and particularly if they are both at war with the 3rd party then there should be no issue unless the AI was planning to take that city and then may feel slightly agrieved you took it first.
If your not on friendly terms then they now have a potentially agressive neighbour on their border and this would obviously come under 'border tension'
 
A flexible/dynamic pseudocode that's simple:
City C being founded is integer Nth city founded by a Civ....
Set X{};
Foreach Civ do:
foreach CivCity(j) do:
if CivCity is Nth city founded do:
float fl = averageDistanceToAllOtherSameCivCities(j);
X.put(fl);
}
If X.size < (numCivs * 0.5) do:
run above foreach loop for n-1

float avg = {average set X's contents}
float Cavg = averageDistanceToAllOtherSameCivCities(C);
if (Cavg > avg*1.33) do:
give them a penalty, scaling with the ratio

Basically, you're finding what the average "settling distance" for all civs in the game up to that point has been for their nth or n-1th city, relative to the rest of their cities, then comparing a global average of each of those civ averages against the player's new city relative to all the player's prior cities.
I'm sure there's additional tweaks to be made, but that seems the fairest approach, and scales with era/number of cities being settled, map sizes, etc.
 
Top Bottom