[Freeciv-Dev] Re: (PR#14923) Stupid AI Building Wants
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14923 >
On 12/20/05, Benedict Adamson <badamson@xxxxxxxxxxx> wrote:
>
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=14923 >
> The AI considers a Granary (EFT_GROWTH_FOOD effect) to be more
> worthwhile in cities with large food surpluses. That is possibly the
> wrong way around; Granary helps a city grow faster, which is most
> helpful in cities that grow slowly because they have a low food surplus.
No, it is correct. A big city with one food surplus will hardly ever
grow, so the granary will have practically no effect. For big city
sizes ;-) the granary essentially doubles the food production; for
small cities it is even more because a granary of size 20 will after
growing to size 30 be filled with 15 food. So the correct multiplier
for food is:
food lost with granary = granary size before growth - half granary
fsize after growth
food lost without granary = granary size before growth
granary effect multiplier= food lost without granary/ food lost with granary
e.g. granary effect multiplier= 20/(20-15)= 4
Meaning that such a size one city with 3 food surplus would, give or
take one, benefit from a granary by 3x(4-1) food minus 1 gold upkeep
for granary. Now what the actual value of food vs gold vs shields is
yet another tricky question.
> The want for the protection that city walls afford the civilians inside
> (EFT_UNIT_NO_LOSE_POP effect) depends on the number of units in the
> city, which makes no sense to me. The effect is most useful for very
> small cities, which are in danger of being destroyed because of civilian
> casualties.
On the other hand, a small city is not worth as much in some respect,
unless you think of the cities it protects by offering a first line of
defense. However it seems to me the AI is unable to detect threatened
cities and builds city walls everywere instead - one problem is that
detecting outer cities is a CPU-intensive operation of at least O(n^2)
unless you do some complicated algorithm.
> The want for barracks (EFT_VETERAN_BUILD effect) depends on the number
> of units in the entire empire. An AI with a large empire will want to
> build barracks everywhere, even in cities that are not productive enough
> to be useful. The building want should depend on how productive the city
> is: its shields surplus.
Yep. I want to add my pet peeve here: When a barracks was the last
building in a queue, could the city advisor code switch from buildings
to military units?
--Peter
- [Freeciv-Dev] Re: (PR#14923) Stupid AI Building Wants,
Peter Schaefer <=
|
|