4

Sometimes I get higher production when I select default or food focus than I get when I select production focus. If I remember it correctly, I have seen the same thing but with food.

Why is this? It seems completely illogical. The only reason I can think of is that it is a bug, but of course it can be something else I have missed.

To clarify my concern. I know that "max production" does not mean producing as many hammers as possible without restrictions. For example, if possible, the city will avoid starvation. I would be perfectly ok if food and production focus gave equal amounts of either food or production. But I cannot see ANY reason whatsoever that production focus should yield LESS production than any other focus, even if it is only one hammer.

  • IIRC production focus still maintains at least basic food levels to prevents population decline. Maybe check if you have enough food when manually assigning workers to production? – Polygnome Dec 19 '18 at 17:45
  • @Polygnome Sure, but that does not explain this. – klutt Dec 23 '18 at 16:46
  • It does in some situations, since it will assign workers to food instead of production to prevent starvation / pop decline. Without seeing the situation you are facing directly at hand, its hard to say. If I had all the answers, I'd have posted an answer ;) – Polygnome Dec 24 '18 at 11:12
  • @Polygnome No, that does not make sense. I assume that all the different priorities have the same rules for avoiding starvation. Let's assume that choosing food gives you 56 hammers without starvation. So there is absolutely no reason at all why choosing max production should not yield at least that amount. – klutt Jan 15 '19 at 1:27
  • Can you show screenshots of the city with the focus set to food and production? I have never seen the behavior you describe in that way. – Polygnome Jan 15 '19 at 8:27
2

Other comments (and the answer) are correct, but you are dismissing them as not making sense. But I think you're missing part of the logic here.

At first sight, your observation is correct that production focus should focus more on production. However, you're forgetting about the impact that tiles with multiple resource types have.

For example, consider a city with 6 pops, and access to the following tiles:

  • 2 Food 2 Gold (x6)
  • 1 Food 2 Prod (x6)
  • 3 Food (x6)

You need 12 food to sustain your population.

For example, if you were to put your city on a gold focus, it would assign all pops to the food/gold tiles. They make enough food (12) to survive and it also favors the gold. Total output: 12 food, 12 gold.

Now let's say you push your focus to production. You may initially think that the game would then assign all pops to the food/prod tiles, but that wouldn't work. You'd only be getting 6 food, not 12, because there is less food on the food/prod tiles than there is on the food/gold tiles.

To account for the loss in food, the logic will need to assign some pops to the food tiles, which has a dramatic impact: 3 pops on the food tiles, 3 pops on the food/prod tiles. Total output: 12 food, 6 production.

This isn't your exact scenario, but it's a simple example that showcases the point. By having the AI favor prod tiles over any other tiles, they are likely going to end up on tiles which generate less food in total, which means that some pops now need to be diverted to high-food yielding tiles to ensure the population doesn't starve.


When you get into the nitty gritty of pop assignment, you will see that the algorithm isn't perfect. This is why a lot of high level players tend to micromanage their cities, at least in a stage where city resources are scarce and a few points here and there can make a large percentage swing in city output.

The algorithm's imperfection can cause issues here. For example, consider that the city looks like this:

  • 2 Food 2 Gold 1 Prod (x6)
  • 1 Food 2 Prod (x6)
  • 3 Food (x6)

Now, there is a better solution, the same as when you were on a gold focus. Putting all 6 pops on the food/gold/prod tiles nets you a total of 12 food, 12 gold and 6 production.

However, this might not be how the algorithm is built. For example, I can imagine a simple algorithm that does the following:

  • Rank all tiles according to [focus] and assign all pops to the top tiles.
  • While there is starvation, unassign 1 pop from the assigned tiles with the least food, and assign it to the tile with the highest food yield.
  • Ignore all other unmentioned resources.

Of course, I have no idea what the internal Civ V logic is, this is just an example.

This would on average give you a fairly accurate assignment for maximizing your focus. However, it would lead to the initial solution of (3 pops on the food tiles, 3 pops on the food/prod tiles. Total output: 12 food, 6 production) and it will completely miss the solution of (6 pops on the food/gold/prod tiles. Total output 12 food, 12 gold and 6 production). This means you lose 12 gold without actually gaining anything in return!

Like I said, I don't know the exact algorithm used, and the example I used here has simple numbers for clarity's sake; but you can see how the assignment logic can miss things that seems obvious to humans, simply because the algorithm doesn't test for every possible combination. What I can conclusively say is this:

If tiles never had more than one resource, your observation would be mathematically and logically correct. However, when tiles have multiple output types, the additional resources can cause side effects which can have a dramatic impact on the outcome (the bigger the city, the more impact this can have on the final numbers).

  • While it is true that it may be like this I found it hard to believe. The reason is that it would be very easy to write an algorithm that took this into account. It's kind of a beginners task in constraint programming. It could basically look like this: currentMax = getHighestPossibleWithoutConstraints(); while(! solution = getSolutionWithConstraints()) currentMax--; – klutt Jan 15 '19 at 15:07
  • In English that means that you start with finding how high the production could be if there are no constraints at all. Then you try to find a solution that fulfills that while satisfying the constraints. If such a solution cannot be found, try finding one with one less production. Continue until you find a solution. – klutt Jan 15 '19 at 15:09
  • @Broman: You are omitting a whole lot of complexity that is the core part of the issue. In broad terms, the algorithm is easy. The finer points, however, are not as easy (it requires weighting the resources). Your pseudocode example does not actually tackle the hard part, it's simply the pseudocode equivalent of "keep trying". – Flater Jan 15 '19 at 18:26
  • Still, I cannot see how it can make any sense that production focus could ever yield less production than food focus. Unless of course there is a bug somewhere. I would understand equal but not less. – klutt Jan 15 '19 at 22:45
  • @Broman: It would be easier for you to simply look at the assigned tiles and do the math yourself. Without a picture with all yields and tile assignments, it's impossible to provide an answer that fits your exact case. – Flater Jan 16 '19 at 6:52
-1

Not sure if I can shed light on this, but recently while playing I set the focus on "Production" and was initially confused as to why there was a tile being worked that had "1 food, 1 production and 1 gold" rather than another tile which had "2 production". I realized that the city would actually grow in 2 turns, thereby allowing me to then work the tile with 2 production. The unit I was building was created in less turns by taking the tile with food so that my city could grow, thereby allowing me to work the "2 production"tile. From what I saw in my scenario was that the city's estimation in regards to amount of turns to complete a unit/building took into consideration the growth and added tile that would be worked. This would make sense as to why you put the focus on "production" but ended up with more food.

I assume the computer did those calculations and it's not a bug, but not sure.

Not sure how it would work the other way around (i.e. Food production focus and got more production). Maybe the computer knows you're building a granary which will get u +2 food then the tile available which might only give u +1 food? Loll

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.