You know that there is not much difference with just (1 / NumberOwnCities), right?
Leave it at (1 + 0.01 * NumberOwnedCities), the scalers should do the rest.
This is not the same. Currently, an AI with 10 cities get 5 times more hammers for entering a new era than an AI with only 2 cities. This favors wide empires much much more than tall empires.
In my suggestion, a 5 city empire would gain 100+50 yields in total, split on 5 cities, so its 30 for each city. A 10 city empire would gain 100+100 yields, split on 10 cities this is only 20.
Wide empires still get more yields (+33%), but per city, it is more effective on tall cities (+50%), which is in my eyes a good compromise.
So, a player with really big tall cities might be losing food, instead of gaining it?
"AverageOwnCitySize / AverageGlobalCitySize" goes from 0 to infinite, though it's more likely to go from 0.5 to 2.
Leave it at "(AverageGlobalCitySize / max(AverageOwnCitySize, 1))" as a factor, so the bigger AI cities are respect to the world average, the fewer the food the AI gets.
Ok, your way removes the need for another function, which checks for a maximum and minimum. But you have made a little mistake, I think, what you mean is this:
"(AverageGlobalCitySize / max(AverageOwnCitySize, AverageGlobalCitySize))"
But it also could mean that the player stance is WAR and the player invested a whole lot in units and not in buildings. With this change such players would not benefit from production after investing in an army, not ideal for AI that are not that good at conquering other AI.
My first idea was to check for the average number of buildings in each city, but I didnt knew if it is possible to count only the "standard" buildings, and not buildings from tradition policy tree, national wonders or religious buildings. If its possible to count only the standard buildings, then I would prefer that solution.
These scalers factor the strengths of humans vs AI in every era. Scaling only with the city size will not match the human player progress correctly.
As written, if the yields didnt scale well enough into the late game, a soft era scaler (0.9 + 0.1 * era) could be integrated.
Stalker showed, that it is no problem to track the additional yields for each AI over the length of the game. If we can track also the medians for each yield type (should be easy too), I am able to calculate a function which give similar yields over the length of the game to each AI.
I'd prefer a bonus that's consistent for all AI players regardless of how well or poorly they're doing.
A 5 city empire entering a new era would get 5 times culture, while its policy cost has increased to 140%.
A 20 city empire entering a new era would get 20 times culture, while its policy cost has increased to 290%.
The wide empire has to pay double as much culture to get a new policy, but it gets four times more culture. The "well" doing empire benefits more, so the current system misses that aim and favors runaways.