Complete.Org: Mailing Lists: Archives: freeciv-ai: September 2004:
[freeciv-ai] Re: (PR#10110) AI underestimates Temples

[freeciv-ai] Re: (PR#10110) AI underestimates Temples

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mstefek@xxxxxxxxx
Subject: [freeciv-ai] Re: (PR#10110) AI underestimates Temples
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Sep 2004 09:51:38 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: >

Marko Lindqvist wrote:
> <URL: >
> Jason Short wrote:
>>At its core granary just increases food output.  It allows 50% of food 
>>to be saved when certain things happen.  Thus it basically grants extra 
>>food at an ammortized rate of food_surplus/2.
>   Why division by 2? Food_surplus gives only 50% of total food - just 
> like granary.

Huh?  food_surplus gives the excess food per turn.

>   Also, when food_surplus < 0, granary has positive impact, not negative 
> - but which kind of math we should use there (without granary city may 
> shrinks every turn once food_storage <= 0, with granary only once every 
> foodbox/2/-food_surplus turns)

Yeah...without granary we lose foodbox_size food per turn (once famine 
begins).  With granary we lose foodbox_size/2 food every 
-foodbox_size/(2n) turns.

Note that this is with amount==50.  The amount does not have to be 50%.

Although at this point exact calculations are rather useless.  Once we 
have famine it's too late to build a granary.  A WAG is probably a 
better bet.  However the goodness should go up based on the city size.

   v += (c - 1) * 4 + (amount / 7) * pcity->size;

and it should only be applied if EFT_FOOD_GROWTH isn't present!  We 
don't want to build granaries if we already have pyramids, even if the 
rules allow it.


[Prev in Thread] Current Thread [Next in Thread]