Roland Johansen
Deity
It does to me too. But mostly because I keep forgetting parts.There are a lot of little minor details that it's easy to overlook if you aren't focused on them.
Yes, but you at least have all the pieces of the puzzle. I only have those that you give me.

Without getting into the mechanics of it, it basically checks how big the city could get (based on "useful" tiles), and how much food the city has based on the current tile improvements + base. If the current food isn't enough to get it to its target size, it'll prioritize food.
Sounds good.
Usually, yes. But I've seen the AI put it in the 40-50% range, especially after using a GSpy on them. It doesn't make sense that the AI would be emphasizing commerce heavily when it's already producing a fair amount - it's just mainly going into Espionage. Especially when the mechanic to check for commerce production seems to have overlooked it.
Yes, in that case, it would again cause the AI to tear up hammer improvements to increase commerce production for the temporary high espionage production. That's not a good idea.
True. I can't tell from the way the function is set up whether it's getting the amount based on the slider, or the total amount.
I hope it is the slider because that would tell more about how healthy the AI economy is.
Take a standard tile - let's say a normal plains tile. It produces 1and 1
. So the "value" based on the above would be 1x10 + 1x6 = 16, meaning that tile wouldn't be counted. On the other hand, take a river grassland tile. It produces 2
and 1
. 2x10 + 1x4 = 24, so that tile would be counted.
Not really, as mentioned above, it does take squares beyond what is being used into consideration. So, really, this is more of a way of making sure that some of the first improvements for a city are hammers (ie, a prioritization system).
Ah, it counts only interesting tiles for a potential 10 hammers of production, that makes sense. And between the increase of the valuation of food when the city can grow and the increase of the valuation of hammers to get some early production going, it seems like a good way to quickly start a city. Commerce comes a bit later.
That's really not a good idea, imo. The AI should be much more likely to replace a cottage tile than a town tile. Doing it that way, if a city had both a town and a cottage tile, the AI would be just as likely to replace the town as the cottage.
Yes, I know. I mentioned that in my original posting. It should choose to replace a cottage before a town, but when replacing a cottage, it should in my opinion still consider the end goal of the cottage as by replacing tile improvements, the AI is fine-tuning the city and thus maximising the potential end result of the city. So it should consider the end result of the cottage improvement.
You could do that in multiple ways, for instance this way:
The base value reduction when replacing a cottage/hamlet/village/town is based on the value of a town. An additional value reduction is based on the time the cottage has grown. This is a very minor value, but still enough to make it more attractive to replace a cottage than a town (of course scaled for the game speed effect on the time it takes for a cottage to grow).
As I understand it, the present code when building a cottage makes the AI think it is building an improvement with a value halfway in between a cottage and a town. However when replacing it, it just reduces the value of the new improvement with the value of a cottage. That a very natural cause for the AI to start continually re-improving its terrain and one that is easily overlooked. When building the cottage improvement, the AI thinks it gets a great improvement, but when replacing it, it's actually just the very poor cottage improvement.
So lets say (for example) value (cottage) = 10, value (workshop) = 20, value (town) = 40. When building a cottage, the AI thinks value = (10 +40)/2=25. Then after building the cottage, it looks at the tile again and sees an improvement with a value of 10. The value of the workshop is 10 higher, so it replaces it with the workshop. Then after building the workshop, the AI looks at the tile again and sees an improvement with a value of 20. However, when building a cottage, it has a value of 25, which is higher than 20, so the AI replaces the workshop with a cottage again. Again a perpetual cycle caused by the AI valuing a cottage higher when it is being constructed than when it's being replaced.
I think in general, it's a good idea to value an improvement a tiny bit higher when it's already present than when it's considered to be constructed. That is probably already happening because the value is negatively modified by the time it takes to construct the new improvement. In the case of the cottage improvement, I think it's even more important to value it higher after construction than before. The time it takes to grow is an investment that can't be easily replaced (agree with Krikkitone here).
If the value of an improvement is the same when it's already present than when it's considered to be constructed, then the effect of modifiers for low food/ low hammers / low commerce could cause another tile improvement to be preferred after a tile improvement change has been made. If the value of an improvement is a lot higher when it's already present than when it's considered to be constructed, then tiles will never get replaced and the AI could get stuck with bad tile improvements.
In general, it's a very bad idea to value improvements lower when it's already present than when it's considered to be constructed. That's just asking for a perpetual re-improvement cycle.
Not really true, I'm afraid. The improvements are "queued", which means that it counts them even if they haven't actually be built (just planned). Moreover, I've seen the AI continually replacing the improvement of a single tile.
Hmm, I guess the major mood swings (

It's one of those "I'm not sure" scenarios. I mean, effectively you could compare it to how well the AI improves a human player's city when they don't turn on any of the emphasis buttons. I haven't done that in a long time, so I couldn't really say how well that is.
Could you see if an earlier version of civilization (unpatched vanilla) has the modifiers for the emphasis settings?