Flavors: What do they do?

Evalis

Prince
Joined
Mar 2, 2009
Messages
507
So when making a new building or a new civ you can assign a flavor to them.. but what exactly does a flavor do? If I make it high for civs it makes them more likely focus on that strategy right? Of course this in itself says very little.. there are AI econ and military strats.. but exactly how does this affect them? If I make it high for buildings does it also make them more likely to build them? Is it some combination? Like factories are set at 100.. does that mean they always prioritize a factory when they need production? Or does their production have to equal a certain ammount first, and do other buildings (like the workshop) add to this ammount?

Knowing how to make the AI function better would be awesome. Does anyone have any insight into this?
 
As far as I can make out, flavours are higher for things that are more likely or a stronger influence. Techs and resources also have flavours. I think they may be used for advisors as well as AI.
 
I'm guessing flavors tell the AI what the unit/building/tech is for, and how effective the item is at each of its specified roles.

With this information, the computer players can then decide when and how to use said item.
 
Yes, flavors directly translate to "weights" for the AI. I believe the absolute value of most weights has no meaning - it's the relative value that's important. So in other words, from what I've seen I think the AI will favor 6 vs 3 the same as 20 vs 10.

When I was experimenting with these, I set the flavor value of food yields to 100. The AI built solely farms (on terrain that supported them).
 
The value for terrains use a different system than buildings I think.. as in they value each point of food to be equal to x, which is why the computer loves mines. Hmm.. do they value the buildings at each point of production it takes to make them?
 
Well I believe I managed to answer my own question. Flavors simply assign a priority to the AI with the highest being the first action the AI will take. It does not take into consideration production times for it's choice. I tested this on a number of autoturned modern era runs basing the factory vs a new building I made. The new building had a 50 higher hammer cost and 1 point more flavor (from 100 for the factory). The computer consistantly built the new building first. When I lowered it to 99, it consistantly built the factory first. I made sure the computer got coal and iron at the same time to get this to work...

This is problematic of course.. as setting a flavor of something with a high cost will cause the computer to build that item first in it's queue, which is probably not a good idea, even if the building is better in the long run. It might be a good idea to give buildings prereqs of basic buildings first to prevent the AI from doing something stupid, while preserving a high flavor to encourage it to build it right away once basic infrastructure is in place.
 
Well I believe I managed to answer my own question. Flavors simply assign a priority to the AI with the highest being the first action the AI will take. It does not take into consideration production times for it's choice. I tested this on a number of autoturned modern era runs basing the factory vs a new building I made. The new building had a 50 higher hammer cost and 1 point more flavor (from 100 for the factory). The computer consistantly built the new building first. When I lowered it to 99, it consistantly built the factory first. I made sure the computer got coal and iron at the same time to get this to work...

This is problematic of course.. as setting a flavor of something with a high cost will cause the computer to build that item first in it's queue, which is probably not a good idea, even if the building is better in the long run. It might be a good idea to give buildings prereqs of basic buildings first to prevent the AI from doing something stupid, while preserving a high flavor to encourage it to build it right away once basic infrastructure is in place.
It builds the item with the highest flavor for the flavor type it has chosen to focus on, I presume you mean... it won't build a factory if it is focussing on research, for example.

Personally, I'd have hoped that it would try to balance between priorities partly using costs and flavors... like "I can get a 50 benefit to X for A production, or a 40 benefit to Y for B production"... if the behaviour is as you describe (and the described test isn't quite conclusive), then the AI is disturbingly simplistic, even though there's data for a more sophisticated behaviour engine.
 
Yes I meant when they focus on a certain element. Of course I don't know if the items are additive, multiplicative or simply use the highest value (such as for buildings that have both growth and gold) Though I'm fairly certain it's at least additive. I've also yet to determine precisely how the flavors of the leaders are calculated, so this is really for buildings only.

The computer does - not - take benefits of the building into consideration. This part is conclusive. The benefit was practically non-existant on the building, and the computer built it anyway. This makes sense though, as it's easier to program the AI to understand Military value 50 > Military value 40 as apposed to 15xp > 20% military production.
 
Back
Top Bottom