private void computeUtility(Bundle resources) {
		utility = 0.0;
		for (ResourcePile pile:resources){
			if (pile.type == Resource.food) utility += Math.max(0.0, preferences.get(Preference.foodUtil)*Math.log(pile.amount)+0.02);
			else if (pile.type == Resource.goods) utility += Math.max(0.0, preferences.get(Preference.goodUtil)*Math.log(pile.amount)+0.02);
			else if (pile.type == Resource.crafts) utility += Math.max(0.0, preferences.get(Preference.craftUtil)*Math.log(pile.amount)+0.02);
		}
		utility += (home == null?0:home.currentImprovement) * preferences.get(Preference.homeUtil);
	}