[Freeciv-Dev] Re: MORT
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Thue Janus Kristensen <thue@xxxxxxx> wrote:
> > I have done some testing, and determined, contrary
> to
> > my expectation:
> >
> > 1) The code is correct, even for large "d"
> > 2) It is slightly quicker than the straightforward
> > method using doubles, even on a Pentium II
> >
> > Gosh!
>
> How much. If it really is only slightly I think we
> should change back to
> 1) make the code cleaner
> 2) make it possible to experiment with changing MORT
> How much faster excactly?
>
It's only about 10% quicker, but if someone somewhere
is running freeciv on (say) a 486sx, it's likely to be
a much bigger difference.
I could send a patch with some explanatory comments.
I have started writing an "ai-hackers-guide.txt" to
describe how the current AI does its various
evaluations and decisions.
If you want to change MORT, then apart from the
((23/24)**12)=(3/5) hack, you would have to deal with
the various hardcoded values in city_desirability. I
don't 100% understand where they came from yet (the
comment says
/* all of these kluges are hardcoded amortize calls
/* to save much CPU use -- Syela
)
I think MORT represents "the number of turns that an
investment takes to pay for itself". Is there an
accountant or an economist in the house who can tell
us if this is standard terminology?
=====
Andrew McGuinness Luton, UK
andrew_mcguinness@xxxxxxxxxxx
__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com
|
|