The Governor

Ralgar

Warlord
Joined
Dec 13, 2006
Messages
133
How does the build governor work? I know Blake explained the queue somewhere (deep hidden in the 91 pages topic?) but I can't find anymore.

I ask because my cities sometimes switch to 'reasearch', although there are some useful buildings not yet built (banks...)
 
What was your research % at the time? If it was 100% research, the bank would have done nothing (+50% of 0 is still zero) so it'd make sense for the AI governor not to waste hammers on a bank.
 
No, Im lazy and almost always leave the rate at 70%. But here is an example with more buildings available (almost all). The year is 1600, so the game is only half time and the colony could still be productive.

researchzp7.jpg


Forschung = research. I rushed a lighthouse and the governor switches to research next. After 3 turns it changes to a more reasonable courthouse.
 
In one of my games with the 1/30 I noticed similar behaviour. For testing out the gov, I had most of my cities on build-governor for most of the time. It surprised me how often the cities would set themselves on build wealth.
Like in your game, there were usually more important buildings, IMO, to build.
I did happen to have very little gold for a lot of the time (usually less than 70 or so), so perhaps it's the gov-AI trying to get the player more gold? Especially when it can't assign many merchants.
Could we perhaps have the build governor not choose research or wealth only because it thinks the player is running out of money or is low on beaker research? It should trust the player knows what he's doing with his income, and instead choose what's best for each individual city. Or perhaps just tone down the likeliness to build research or wealth when there are other economy-boosting buildings available.
 
It's a flaw in the logic for whether a building is worth building or not - the governor doesn't recognize that the city will grow, so it sees like a city with 1h, and thinks a forge wont do anything... even though the city will have grown to like size 10 long before the forge is completed. I can fix this pretty easily.
 
That would make sense because it was a game where I used whipping a lot. Of course, now that I think about it more, the cities did tend to switch off of wealth sometimes, presumably on the turns the cities grew a population point!

Thanks for fixing this!

EDIT... By the way. A city need not have hammers for a forge to be worth building. The happiness boost (which comes from easily available resources) and the fact that rushing also is helped by forges means it's worth building more often than not. But I'm guessing one of the patches removed this rushing feature from forges so they became less powerful. In that case, just consider the benefit of the happiness boost I guess.
 
The happiness boost from a forge is recognized (ie if the AI wants a happiness building, it sees a forge providing +2 happy as a building providing +2 happy, there is no special significance put on the +25% production), but in a small city with a happy cap much higher than the population it wont see it as needing the happy boost either.
 
The happiness boost from a forge is recognized (ie if the AI wants a happiness building, it sees a forge providing +2 happy as a building providing +2 happy, there is no special significance put on the +25% production), but in a small city with a happy cap much higher than the population it wont see it as needing the happy boost either.

The AI doesent recognize the main bonus of the building?? Is that what i understood?
 
No *special* significance. In other words it puts equal significance on all aspects of the building, as situationally appropriate.

The distinction of what the main bonus is is blurred - take for example a Marketplace, if it provides +2 or more happy from resources then the happiness is probably going to outweigh the +25% gold.

The AI doesn't think of the forge as a production building, it thinks of the forge as a building with +25% production, -1 health and +X happy. If asked to build a production building it'll look for things with production modifiers on them, if asked to build a happy building it'll look for things with happiness modifiers - a forge will work for both (assuming appropriate resources).

In short, the code looks *only* at modifiers, there are no "building classification" in the XML. It's mega flexible in that way, which is one of the reasons why drydocks are(were) troubling, it just looks at modifiers and there's nothing particular troubling about +4 domain-specific exp (bear in mind the barracks is a +3 domain-specific exp build!!! in the original code the barracks looked like a cheaper and weaker drydock!).

Buildings are the modifiers they provide, nothing more and nothing less.
 
No *special* significance. In other words it puts equal significance on all aspects of the building, as situationally appropriate.

The distinction of what the main bonus is is blurred - take for example a Marketplace, if it provides +2 or more happy from resources then the happiness is probably going to outweigh the +25% gold.

The AI doesn't think of the forge as a production building, it thinks of the forge as a building with +25% production, -1 health and +X happy. If asked to build a production building it'll look for things with production modifiers on them, if asked to build a happy building it'll look for things with happiness modifiers - a forge will work for both (assuming appropriate resources).

In short, the code looks *only* at modifiers, there are no "building classification" in the XML. It's mega flexible in that way, which is one of the reasons why drydocks are(were) troubling, it just looks at modifiers and there's nothing particular troubling about +4 domain-specific exp (bear in mind the barracks is a +3 domain-specific exp build!!! in the original code the barracks looked like a cheaper and weaker drydock!).

Buildings are the modifiers they provide, nothing more and nothing less.

Aha hum, OK, thx for the explanation :)
 
What was your research % at the time? If it was 100% research, the bank would have done nothing (+50% of 0 is still zero) so it'd make sense for the AI governor not to waste hammers on a bank.
Actually even in this situation, if you have a holy city with a popular religion (and esp. if you have built the Spiral Minaret) you may want to build banks to get Wall Street available in the holy city.

The same issue arises with several buildings (Forge/Ironworks, Courthouse/ForbiddenPalace, etc.) So, a related question, does the AI take this (i.e. requirements for national wonders) into account when choosing buildings?
 
Back
Top Bottom