MadmanAtW
Knight
: It would be best to disallow the AI from building anything that would cause immediate unhappiness or unhealthiness. For that, the AI needs to know the actual unhappiness and unhealthiness effects and the current health and happy status of the city - and it would need to check against it. Also Factories probably need a lower AI value, and power plants need a higher one - even more importantly the values for plants when the city already has power should be close to zero. (Coal Plant info needs to be corrected to say +4
) Higher priority for Medicine might be a good idea too. The basic idea though would be to keep the AI from building a factory and most importantly a coal plant before it gets of fission or plastics. At least I am always waiting for that ..
First off, which is it? Is a coal plant +2
with the factory already having +2 just for coal, or is the coal plant +4
? I don't currently have a game in the right era to just build and check, and I've seen both asserted by trusted parties. As for when to/not to build unhealth causing buildings... I guess for the most part I agree that maybe the AI shouldn't begin construction of a building that would cause the city to be unhealthy. But I wouldn't say it's always true- certainly, the AI would not be able to make best use out of Sid's Sushi if it followed such a rule entirely. So I might argue that the calculation should involve food in excess of what is required to reach the happy cap being counted as though it was health. After all, what we really care about isn't whether the city is healthy (unless we want to try to specifically set it up so the city can have We Love the Foo days), but whether it is starving or being denied useful growth.
The next step would be, if the formula for deciding what to build calls for a
producing building such that the above calculation would dictate it not be built, the city instead builds a
producing building it has available to it. If there are none... here I'm not sure of order of operations, but the AI should attempt to trade for more health, which I assume it can't do while in the middle of deciding what to build, so that implies the build would get postponed in favor of something else.None of that would require memory beyond a turn. Oh, one additional thing- if the AI is currently in WHEOOHRN, any health benefits derived from trades with the proposed target should be considered to not exist for purposes of determining whether there is enough health to build. After all, you know that you're about to cancel those trades! And you shouldn't make decisions based on the assumption that you are going to successfully conquer health resources.

)