Some interesting things I found in the CalculationServices for the engine. I think these are bugs that might need to be fixed, but fixing them will break my Bot. 
private int GetFoodConsumption(BotObject bot)
{
return (int) Math.Ceiling(bot.GetPopulation() * engineConfig.UnitConsumptionRatio.Food);
}
private int GetWoodConsumption(BotObject bot)
{
// TODO: Add the heat consumption stuff here
return (int) Math.Ceiling(engineConfig.UnitConsumptionRatio.Wood);
}
private int GetStoneConsumption(BotObject bot)
{
return (int) Math.Ceiling(engineConfig.UnitConsumptionRatio.Stone);
}
private int GetHeatConsumption(BotObject bot)
{
return (int) Math.Ceiling(bot.GetPopulation() * engineConfig.UnitConsumptionRatio.Heat);
}
This means that your wood and stone consuption will always be 1 every day-night cycle, irrespective of your population size, which is not what the appsettings suggests by saying 0.5 wood per person and 0.1 stone per person.
Then, the appsetting says the importance for food is 1.2 and for heat it is 0.9. The calculation for this is:
var heatSurplus = (bot.Heat - GetHeatConsumption(bot)) * engineConfig.ResourceImportance.Heat;
var foodSurplus = (bot.Food - GetFoodConsumption(bot)) * engineConfig.ResourceImportance.Food;
var minResourceSurplus = (double) Math.Min(heatSurplus, foodSurplus);
So only the least of the two between heat and food is taken into consideration for the population growth calculation. Wood and Stone is technically not required for population growth, except when going to a higher tier.
The above calculation is also a bit counterintuitive. Let me explain:
The code also has a section where it caps the minimum resource requirements.
var populationRangeMin = bot.Population * -0.5;
var populationRangeMax = bot.Population * 0.5;
minResourceSurplus.NeverLessThan(populationRangeMin).NeverMoreThan(populationRangeMax);
So for arguments sake, lets let my population be 100. To get maximum growth I need my minimum resource (heat or food) to be on the limit. So the limit is:
100 x 0.5 = 50
So rearranging the above equations I get:
heatSurplus = (bot.Heat - GetHeatConsumption(bot)) * engineConfig.ResourceImportance.Heat
heatSurplus / engineConfig.ResourceImportance.Heat = bot.Heat - GetHeatConsumption(bot)
(heatSurplus / engineConfig.ResourceImportance.Heat) + GetHeatConsumption(bot) = bot.Heat
(50/0.9) + 100 = bot.Heat
156 = bot.Heat
foodSurplus = (bot.Food - GetFoodConsumption(bot)) * engineConfig.ResourceImportance.Food
foodSurplus / engineConfig.ResourceImportance.Food = bot.Food - GetFoodConsumption(bot)
(foodSurplus / engineConfig.ResourceImportance.Food) + GetFoodConsumption(bot) = bot.Food
(50/1.2) + 100 = bot.Food
142 = bot.Food
So even if the importance for food is rated higher in the appsettings, you need less food than heat to get maximum addition of people. CounterintuitiveâŚ