Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [patch] amortize
Home

[Freeciv-Dev] Re: [patch] amortize

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Chris Guest <chris.guest@xxxxxxxxxxxx>
Cc: "freeciv-dev@xxxxxxxxxxx" <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [patch] amortize
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Mon, 29 Oct 2001 20:21:40 -0500

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"




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