[Freeciv-Dev] Re: [patch] amortize
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I believe there have been several rounds of this in the past.
The main points are:
1) It doesn't really matter what the accuracy of this function is.
It is absolutely non-critical in the sense that this is just used
to generate convoluted weighting factors. If two such weights are
even close to each other it is still a tossup as to which is a
preferable move. One that doesn't even come close might be better :-)
2) This consumes a lot of CPU. The last fixes tried to reduce this by
marginal factors of 5-10%.
3) No one really understands it without a lot of brain strain, but it
is actually typical of a lot of functional approximations found in
many applications. It does just enough and no more than needed.
Cheers,
RossW
=====
At 12:21 PM 01/10/29 +1000, Chris Guest wrote:
>Amended patch for amortize, against CVS-26-Oct. Uses math.h pow
>instead of integer calculations. Improved accuracy, cleaner code, but
>ai/settler routines perform 2-7% slower.
>__________________________________________________________________
>Get your free Australian email account at http://www.start.com.au
>
>Attachment Converted: "c:\program files\eudora\attach\amortize_diff"
|
|