Complete.Org: Mailing Lists: Archives: freeciv-ai: May 2002:
[freeciv-ai] Re: README.AI
Home

[freeciv-ai] Re: README.AI

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] Re: README.AI
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 May 2002 17:06:29 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, May 02, 2002 at 12:36:26PM +0100, Gregory Berkolaiko wrote:
> On Wed, 1 May 2002, Raimar Falke wrote:
> 
> > On Wed, May 01, 2002 at 02:43:18PM +0100, Gregory Berkolaiko wrote:
> > > Suppose we have a constant rate of inflation, x percent.  Then in five
> > > years time 10$ will buy as much as 10*(100/(100+x))^5 will buy today.
> > > Denoting 100/(100+x) by q we get the general formula, N dollars Y
> > > years from now will be worth N*q^Y in todays money.  If we will
> > > receive N every year starting Y years from now, the total amount
> > > receivable (in todays money) is N*q^Y / (1-q) --- this is the sum of
> > > infinite geometric series.  This is exactly the answer that amortize
> > > gives.  Note that the factor 1/(1-q) does not depend on the parameters
> > > N and Y and can be ignored.  In this setting, the current value of
> > > MORT = 24 corresponds to the inflation rate (or rate of expansion of
> > > your civ) of 4.3%
> > 
> > Can you say how 4.3% is calulcated?
> 
> Yep.  amortize multiplies N by ((MORT-1)/MORT)^Y, which in my speculation 
> corresponds to q^Y.  So
>       (MORT - 1) / MORT = q = 100 / (100 + x)    (*)
> and from here
>       x = 100 * MORT / (MORT - 1) - 100
> 
> Do you want me to perhaps include line (*) ?

Or both.

> > > Building a brand-new attacker is more complicated.  Firstly,
> > > ai_choose_attacker_* functions are charged to find the "best
> > > prototype" attacker we can build here.  The prototype is selected
> > 
> > "best prototype"?
> 
> Is "first approximation to the best attacker" better?
> 
> Maybe I should give an example:
> 
> First ai_choose_attacker_land selects a dragoon because it's strong and
> fast.  Then find_something_to_kill finds a victim for the (virtual)
> dragoon, an enemy musketeer standing right next to the town.  Then
> process_attacker_want figures out that since the enemy is right beside us,
> it can be taken out easier using an artillery.  It also figures that
> howitzer would do this job even better, so bumps up our desire for
> Robotics.

Include it.

> > > * City tile values could be cached.  However, caching was tried by
> > > Raimar in CMA and was deemed unsuccessful. 
> > 
> > Has nothing to do with CMA.
> 
> Is this better:
> However, caching was tried by Raimar and was deemed unsuccessful.

Ok.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "- Amiga Y2K fixes (a bit late, wouldn't you say?)"
    -- Linus Torvalds about linux 2.4.0 at 4 Jan 2001


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