| [Freeciv-Dev] Re: (PR#12834) amortize()[Top] [All Lists][Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
 
 
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12834 >
--- Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> <URL:
> http://bugs.freeciv.org/Ticket/Display.html?id=12834
> >
> 
> Brian Dunstan wrote:
> > <URL:
> http://bugs.freeciv.org/Ticket/Display.html?id=12834
> >
> > 
> > I noticed that the amortize() function uses a very
> > clever, but complicated, algorithm.  The reason
> > apparently is to save time.  If that is the
> purpose,
> > why not use a more transparent, but slower
> algorithm,
> > and use it to make a lookup table?  Normal calls
> to
> > amorize could just be reading an element from a
> 20- or
> > 100-element integer array, which would be faster
> than
> > what is there now.
> 
> One coder had the idea that ammortization is based
> on the inflation
> rate, and this inflation rate changes with time.  We
> can calculate the
> inflation rate based on certain factors - gold on
> hand (lower
> inflation), danger/war (raises inflation), etc. 
> Then ammortize should
> use this inflation rate.
> 
> There was a huge patch that completely redesigned
> the AI to do this sort
> of thing - it's in RT somewhere.  For anyone
> interested in working on
> this, I'd suggest ripping out the inflation
> calculation, and then using
> it in ammortize.  We can use it elsewhere later of
> course.
> 
> -jason
So in this situation, part of the end of turn AI
calculations would be to determine the interest rate
using some simple method for now.  A table could be
calculated then, and amortize() would use that table.
Brian
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 
 
[Freeciv-Dev] Re: (PR#12834) amortize(), Jason Short, 2005/04/18
[Freeciv-Dev] Re: (PR#12834) amortize(), Per I. Mathisen, 2005/04/18
[Freeciv-Dev] Re: (PR#12834) amortize(), Brian Dunstan, 2005/04/18
[Freeciv-Dev] Re: (PR#12834) amortize(),
Brian Dunstan <=
[Freeciv-Dev] Re: (PR#12834) amortize(), Jason Short, 2005/04/18
[Freeciv-Dev] Re: (PR#12834) amortize(), Vasco Alexandre da Silva Costa, 2005/04/18
[Freeciv-Dev] Re: (PR#12834) amortize(), Benoit Hudson, 2005/04/18
[Freeciv-Dev] Re: (PR#12834) amortize(), Jason Short, 2005/04/18
[Freeciv-Dev] Re: (PR#12834) amortize(), Brian Dunstan, 2005/04/18
[Freeciv-Dev] Re: (PR#12834) amortize(), Jason Short, 2005/04/18
[Freeciv-Dev] Re: (PR#12834) amortize(), Vasco Alexandre da Silva Costa, 2005/04/19
 
 |  |