Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2000:
[Freeciv-Dev] Re: Patch: generalized granary size (PR#635)
Home

[Freeciv-Dev] Re: Patch: generalized granary size (PR#635)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Patch: generalized granary size (PR#635)
From: Andrew McGuinness <andrew_mcguinness@xxxxxxxxxxx>
Date: Sun, 24 Dec 2000 15:29:08 +0000

On Sun, Dec 24, 2000 at 12:03:20PM +0100, Thue wrote:
> On Sunday 24 December 2000 04:32, mike_jing@xxxxxxxxx wrote:
> > >So in a city of size 1 food has a value of 57, while in a city of size 2,
> > >whire it takes 50% more to make the city grow, the value of
> > >food is only 2/3*57 = 38. Then you would expect the next value to be
> > > 3/4*38 = 28.5, but apperantly the author of this code miscalculated
> > >(used 2/3 instead)...
> >
> > It doesn't sound unreasonable.  Of course, one can't be sure without some
> > kind of testing or unless the author suddenly reappears.
> 
> Well, looking in the Changelog I can see that on May 24 the way to calculate 
> the foodbox width changed, but the food_weighting() function was not updated. 
> So assuming it to be wrong is not a bad guess.
> It is also IMO generally bad karma to assume an uncommented function that 
> doesn't make sense to you to be perfect and therefore refuse to follow your 
> own good sense. With the amount of legacy code the AI contains we will then 
> never get anywhere. But you should of course test it in an actual game before 
> commiting.
> 
> -Thue
> 

The values fixed in correspond to 76 / city_size, except that the value
for size 1 is 57 instead of 76.  This looks like a manual tweak.

As Thue points out, prior to May 1999, fooxbox_width was = city_size.
(instead of city_size+1)

What this means is that prior to the May 1999 change, 
the AI valued each unit of city growth the same, except that 
getting size 2 was worth only 3/4 as much
(because of the first value being 57 instead of 76).
-- 
Andrew McGuinness     Luton, UK        andrew_mcguinness@xxxxxxxxxxxxx



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