[Freeciv-Dev] Re: (PR#2650) Overflow in military_amortize
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 26 Dec 2002, Gregory Berkolaiko via RT wrote:
> I was thinking more in the direction of fixing the overflow.Well,thanks for
> turning me around.What you say makes perfect sense.We wait for comments for
> some time and then I commit, ok?
Ok.
> Two remarks: average production (over the whole nation) canbe very different
> from what we have in this given city.But I guess we shouldn't bother about it,
> it'sall relative anyway.
Well, there isn't a problem that can't be solved with a few extra
parameters! We can pass pcity or find_city_by_id(punit->homecity) to
military_amortize() and use that city's shield_surplus instead of an
average value.
This avoids the pathological case of most-cities-have-zero-surplus, which
means the one city with lots of surplus shields will think "gee, it takes
1243928 turns to build that tanks and drive it to the enemy, so lets
not!", even though it could build it in 3 turns and drive it there in 1!
See the attached patch which implements this.
> There is a danger that changing amortize in such a brutal way will unsynch the
> weight in other areas (like tech want).But I wouldn't bother about it either,
> we won't learn until we break it.
I would guess the maintainer to commit such a patch would do some play
testing and comparisons of it, though ;)
> > The big question is if we need this at all. Simpe amortize might just get
> > the job done, too.
>
> With what delay?
We might just ignore build_cost altogether, as I think your comment in
military_amortize() hinted at.
- Per
- [Freeciv-Dev] Re: (PR#2650) Overflow in military_amortize,
Per I. Mathisen via RT <=
[Freeciv-Dev] Re: (PR#2650) Overflow in military_amortize, Per I. Mathisen via RT, 2002/12/27
[Freeciv-Dev] Re: (PR#2650) Overflow in military_amortize, Per I. Mathisen via RT, 2002/12/27
[Freeciv-Dev] Re: (PR#2650) Overflow in military_amortize, Per I. Mathisen via RT, 2002/12/27
|
|